You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dolphinscheduler.apache.org by Rick Cheng <ri...@gmail.com> on 2022/10/10 02:55:40 UTC

[DISCUSS] Fix the errors when starting 2 times with dolphinscheduler-daemon.sh

Hi all,

If the user starts DS twice (or more) using dolphinscheduler-daemon.sh, the
pid file will be overwritten, making it impossible to stop the initially
started DS cluster.

# How to fix:
* Use pid to check the status of the server
* If the server is already started, cancel this launch

# Discuss
* The script currently uses filtering through `grep` to determine the state
of the process and check the pid file when killing the process.
* But I think the script should take the same approach to get the process
when checking the process status and killing the process (grep ... or check
the pid). And I personally prefer to check the pid file because it's a way
used by a lot of programs on linux.

Any comments and suggestions are welcome!

Related PR: https://github.com/apache/dolphinscheduler/pull/12118



Best Regards,
Rick Cheng