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

lorawan-server doesn't properly shutdown in docker container #843

Open
lcse66 opened this issue Nov 25, 2023 · 2 comments
Open

lorawan-server doesn't properly shutdown in docker container #843

lcse66 opened this issue Nov 25, 2023 · 2 comments

Comments

@lcse66
Copy link

lcse66 commented Nov 25, 2023

Hi everyone.

The server running in the docker environment does not respond correctly to the shutdown request, but it is killed at the end of the timeout. A longer timeout produces no advantages.
This behavior also causes side problems, including permanent errors in connectors when the connected service (e.g. mqtt broker) is running on the same server, and the server is being stopped. See also #771 #772.
The issue can be verified by stopping the Lorawan container and measuring the shutdown time, which will be approximately 10 seconds (corresponding to the timeout for stopping the containers).

I know that this project is no longer being maintained for now, and I hope that it will be maintained again in the future. Best regards to @gotthardp for the excellent project.

lcse66 added a commit to lcse66/lorawan-server that referenced this issue Nov 25, 2023
The lorawan-server script doesn't forward TERM signal to underlying process. 

Normally the underlying process must be started from the starting script with "exec", but only if it is a binary executable (which "erl" is not; from tests carried out it works, but two "zombie" processes remain active). In this modification, a trap is activated that forwards the term signal.

In solution to gotthardp#843 issue
@hugosantosbessa
Copy link

Hi @lcse66.
I have the same error in the connectors when using an mqtt broker. When connecting the server it stops working. Did you make it work?

@lcse66
Copy link
Author

lcse66 commented Nov 30, 2023

Hi Hugo (@hugosantosbessa)
Sorry but I didn't understand the problem well. The mqtt connector works fine for me. The only problem is (was) that during the host shutdown the Lorawan server closes late, after the mqtt broker has stopped, and this causes a permanent error on the connector which requires manual reset (deleting the "badarg" flag by the connector configuration). With the change #844 that I proposed, the problem never recurred.

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

2 participants