-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Spring boot application may fail to start with init.d due to race condition in start-stop-daemon #4524
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
Comments
@Choene What OS are you running on? |
Ubuntu 14.04, 64 bit Linux tuebingen03 3.16.0-53-generic #72~14.04.1-Ubuntu SMP Fri Nov 6 18:17:23
Symonics GmbH |
Thanks. I'm surprised we haven't seen this in our testing, I guess we've just got lucky with the timings and never managed to trigger the race condition. This would appear to be a known issue when |
Is this limited to Debian-based OS's? |
Also experiencing this issue. |
same issue with Debian: 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u5 x86_64 GNU/Linux |
I was using the launch script with Amazon linux and it was working fine. I can confirm the issue with ubuntu 14.04 as well |
Reopening to fix some issues reported by Shellcheck. Thanks, @php-coder |
Is there a way to apply the fix to current versions of boot via gradle? |
Check the documentation on repackage configuration. You could include the current version of the script in your project and use |
Thank you @vpavic |
Hello,
I am starting a spring boot application as a service with /etc/init.d/
However, the init.d script stops with return code 1 and the message "failed to start".
To my understanding, the start-stop-daemon does not produce the pid file immediately.
Thus, "pid=$(cat "$pid_file")" is returning an empty string. I added a sleep 1 before this line, that helps for the moment.
The text was updated successfully, but these errors were encountered: