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

daily2 server restart hangs when run with CRON #2

Closed
Nielk1 opened this issue Oct 4, 2019 · 2 comments
Closed

daily2 server restart hangs when run with CRON #2

Nielk1 opened this issue Oct 4, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@Nielk1
Copy link
Owner

Nielk1 commented Oct 4, 2019

The daily2 script successfully restarts the server every night, but when it does so the server partially hangs. It is unclear what is occurring, as the server does respond the basic information PING packets but will not respond to SYN with SYN-ACK and thus cannot be joined. Running the daily2 script manually does not have this problem.

The scripts involved had some bugs due to being so old, but these were fixed, however this issue still occurs. The current suspected cause is a permission difference between the CRON and normal user execution, though both appear to use the same user account.

@Nielk1 Nielk1 added the bug Something isn't working label Oct 4, 2019
@Nielk1
Copy link
Owner Author

Nielk1 commented Oct 4, 2019

Note: An attempt was made for the server to auto-detect this state in the restart2 script which is run every 5 min to restart the server if it is offline and correct it. A special program syntest2 will attempt a SYN, SYN-ACK, ACK handshake with the server and if it fails, trigger a restart. Like the daily2 script, this fails to start the server in a functional state when run via CRON but works when executed by user. This script does however properly detect the server is in this inaccessible state in both cases.

@Nielk1
Copy link
Owner Author

Nielk1 commented Jan 27, 2020

This is caused by the CRON not properly keeping shell variable scope. The scripts can be adjusted to work around this, but it is only an issue if using shell vars to work around automatic IP detection issues.

@Nielk1 Nielk1 closed this as completed Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant