Second AS2 process deleted the lockfile

Hello,

My host system crashed while mendelson opensource AS2 was running.
After rebooting I tried to start AS2 again, but got the message regarding lockfile "mendelson_opensource_AS2.lock":

"An instance of mendelson opensource AS2 seems to be already running.
It is also possible that the previous instance of the program did not exit correctly.
If you are sure that no other instance is running please delete the lock file ..."

This newly started AS2 process P2 terminated immediately afterwards.
So far it was a behaviour as I could have expected it, I guess.

However, it looks like the same process P2 deleted lockfile "mendelson_opensource_AS2.lock" before terminating itself.
Is this really as it was meant to be ?

I think this happens in block "catch (Throwable e)" in method main in class de.mendelson.comm.as2.AS2.
Wouldn't it be a good idea to specifically check for this kind of situation/exception ("server.already.running") ... and not to delete the lockfile ?

Regards

Forum
AS2

Comments

Profile picture for user service

xtown99b,

thanks for the hint. We fixed it in the codebase by adding a special Exception if the server detects an existing lockfile. The related catch will not delete the lock.

Regards