Skip to content

Spring boot application may fail to start with init.d due to race condition in start-stop-daemon #4524

Closed
@hoene

Description

@hoene

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions