Post Reply 
Shuts down on startup
20-06-2022, 10:30
Post: #31
RE: Shuts down on startup
Thansk for letting me know about this. Although the symptoms are similar, this is not related to the issue reported by the OP for this thread.

In this case, the sequence of events appears to be:

1) DSM calls start_stop_status start to start MinimServer
2) A short time later, DSM calls start_stop_status status to check whether MinimServer is running
3) The minimserver.pid file has not yet been created by step 1, so start_stop_status status reports that MinimServer is not running

This can only happen if step 1) is taking an unusually long time to start the MinimServer process. Immediately after the MinimServer process starts running, the minimserver.pid file is created. Perhaps there is a lot of other system activity at this point in DSM startup (creating Docker containers?) and this is taking priority and delaying startup of the MinimServer process.

On DSM 7, MinimServer does not have any prerequisites that must be started first. On DSM 6 the Java8 package is a prerequisite but this does not apply on DSM 7.

I don't think there is anything that MinimServer can do to make step 1) go faster as this is entirely dependent on other activity within DSM startup. By the time the MinimServer process has started running, the error has already occurred.

It would be possible to do something about step 3). The MinimServer startup script could write a placeholder value into the minimserver.pid file to indicate that startup is in progress. The start_stop_status script could check for this placeholder and delay for up to 15 seconds to enable the MinimServer process to start.

Please run a test by changing your "sleep 60" in start_stop_status to "sleep 15". If this enables MinimServer startup to work reliably, I will send you a test build with the above change. If this does not work reliably, is "sleep 30" any better?
Find all posts by this user
Quote this message in a reply
20-06-2022, 13:59
Post: #32
RE: Shuts down on startup
Thanx for your immidiate reply and the basic explanation of your startup-routine.

After some test I can report that even "sleep 10" does it's job (rebooted 2 times now), possibly even "sleep 5" would be enough.
Unfortunately I can't figure out which activity is delaying the MinimServer startup process. Of course there's heavy disk activity on startup, but I can't identify which processes are responsible.
I know some docker containers need a while before being active, if manually started. Maybe your assumption regarding docker is correct.

I am happy to assist if any testing is required.
Find all posts by this user
Quote this message in a reply
24-06-2022, 15:36
Post: #33
RE: Shuts down on startup
This turned out to be an issue with an Entware startup script making an incorrect change to the /etc/profile file.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)