Apache DolphinScheduler is a distributed, decentralized big data workflow scheduling system that supports big data task scheduling. To set DolphinScheduler to start automatically upon system boot, you typically need to configure it as a system service. The following are general steps, which may vary depending on your operating system:

Linux System

  1. Create a system service file:

[Unit]
Description=DolphinScheduler Service
After=network.target
[Service]
type=exec
ExecStart=/opt/module/dolphinscheduler/bin/start-all.sh
ExecStop=/opt/module/dolphinscheduler/bin/stop-all.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

2. Start the service, and set it to start on boot:

systemctl daemon-reload
systemctl start dolphinscheduler.service
systemctl enable dolphinscheduler.service

3. Verify the service status:

systemctl status dolphinscheduler.service

Windows System

  1. Create a batch file:

2. Add the batch file to the Startup folder:

3. Restart Verification:

Please note that the above steps may need to be adjusted based on your specific environment and the DolphinScheduler version. Ensure you have sufficient permissions and a good understanding of system services to avoid potential service conflicts or system instability.

If the DolphinScheduler service briefly shows as green (indicating the service is running) after restarting and then changes to a non-green state (typically indicating the service is no longer running), but the related processes are still running, this may be because the service manager (systemd) thinks the service has stopped because it does not detect a continuously running main process.

This situation usually occurs in the following cases:

  1. Service Script Issues: If the service script (start-all.sh) completes without keeping any process running in the background, systemd will think the service has stopped.

  2. Incorrect Service Type Configuration: In the systemd service file, the Type configuration may need to be corrected. If the service is set to simple, it should be forking or oneshot, systemd might think the service has stopped as soon as the script finishes executing.

  3. Process Exit Code Issues: If the service script correctly starts all necessary processes but exits quickly (e.g., because the commands in the script finish soon), systemd might determine the service status based on the script's exit code.

To resolve this issue, you can try the following steps:

systemctl daemon-reload 
systemctl restart dolphinscheduler.service

Finally, the configuration works well.