Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown hangs if mqtt server already shutdown #575

Open
PhilDay-CT opened this issue Feb 9, 2022 · 0 comments
Open

Shutdown hangs if mqtt server already shutdown #575

PhilDay-CT opened this issue Feb 9, 2022 · 0 comments

Comments

@PhilDay-CT
Copy link

PhilDay-CT commented Feb 9, 2022

  • [ X] The issue is present in the latest release.
  • [X ] I have searched the issues of this repository and believe that this is not a duplicate.

What happened?

During shutdown, if the mqtt server shuts down first the the network server hangs in its shutdown. That it turn means that postgres can't do a clean shutdown as the network server still has an open connection, and forcing a postgres shutdown can lead to corruption.

What did you expect?

Since the Network server has logged the mqtt connection error it should skip the unsubscribe and shutdown cleanly

Steps to reproduce this issue

Steps:

  1. On a running system
  2. stop mqtt
  3. stop network server

Could you share your log output?

2022-02-09T12:58:26.901423+00:00 2ad7594528e4 /supervisord: mosquitto 1644411506: mosquitto version 1.6.12 terminating
2022-02-09T12:58:26.901690+00:00 2ad7594528e4 /supervisord: chirpstack-network-server time="2022-02-09T12:58:26.901415463Z" level=error msg="gateway/mqtt: mqtt connection error: EOF"


2022-02-09T12:58:41.521347+00:00 2ad7594528e4 /supervisord: chirpstack-network-server time="2022-02-09T12:58:41.520241392Z" level=info msg="signal received" signal=terminated
2022-02-09T12:58:41.521424+00:00 2ad7594528e4 /supervisord: chirpstack-network-server time="2022-02-09T12:58:41.520350935Z" level=warning msg="stopping chirpstack-network-server"
2022-02-09T12:58:41.521455+00:00 2ad7594528e4 /supervisord: chirpstack-network-server time="2022-02-09T12:58:41.520392122Z" level=info msg="gateway/mqtt: closing backend"
2022-02-09T12:58:41.521486+00:00 2ad7594528e4 /supervisord: chirpstack-network-server time="2022-02-09T12:58:41.520410623Z" level=info msg="gateway/mqtt: unsubscribing from event topic" topic=gateway/+/event/+


Your Environment

Component Version
Application Server 3.16.10
Network Server 3.14.0
Gateway Bridge 3.12.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant