You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
below is my conf to run a JAVA service:
···
[program:logplatform_service]
command=/bin/sh /data/service/st-logplatform-service/run.sh start
autostart=true
autorestart=true
startsecs=10
startretries=3
user=root
···
but the log in supervisord.log is like:
....
[root@log_service supervisord.d]# tail -f /var/log/supervisor/supervisord.log
2025-01-06 14:53:21,619 INFO supervisord started with pid 923709
2025-01-06 14:53:22,624 INFO spawned: 'logplatform_service' with pid 923739
2025-01-06 14:53:24,500 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:25,505 INFO spawned: 'logplatform_service' with pid 923871
2025-01-06 14:53:27,343 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:29,349 INFO spawned: 'logplatform_service' with pid 924035
2025-01-06 14:53:31,278 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:34,285 INFO spawned: 'logplatform_service' with pid 924243
2025-01-06 14:53:36,131 INFO exited: logplatform_service (exit status 0; not expected)
.....
does anyone know how to fix it, how can i run my java service?
i can start my java service well just run:
2025-01-06 14:53:22,624 INFO spawned: 'logplatform_service' with pid 923739
2025-01-06 14:53:24,500 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:25,505 INFO spawned: 'logplatform_service' with pid 923871
2025-01-06 14:53:27,343 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:29,349 INFO spawned: 'logplatform_service' with pid 924035
2025-01-06 14:53:31,278 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:34,285 INFO spawned: 'logplatform_service' with pid 924243
2025-01-06 14:53:36,131 INFO exited: logplatform_service (exit status 0; not expected)
supervisord is trying to start the program but every time it does so, the program exits quickly. The configuration above has startsecs=10, which means the program must stay running for 10 seconds to be considered a successful start. It does not, so supervisord says the exit is not expected. Since startretries and autorestart are also configured, supervisord tried to start the program again when it exits unexpectedly.
Either the program is running into some error that is causing it to exit quickly, in which case it may have printed something to stdout or stderr that may have been captured in the logs, or the program is daemonizing.
If you run this command and your shell prompt returns, but your program is now running in the background, it means that your program has daemonized. For a program to run under supervisord, it must not daemonize. The program must run in the foreground.
The Supervisor developers do not have enough bandwidth to assist with running individual programs under supervisord. This issue tracker is used mainly for bugs in supervisord itself.
below is my conf to run a JAVA service:
···
[program:logplatform_service]
command=/bin/sh /data/service/st-logplatform-service/run.sh start
autostart=true
autorestart=true
startsecs=10
startretries=3
user=root
···
but the log in supervisord.log is like:
....
[root@log_service supervisord.d]# tail -f /var/log/supervisor/supervisord.log
2025-01-06 14:53:21,619 INFO supervisord started with pid 923709
2025-01-06 14:53:22,624 INFO spawned: 'logplatform_service' with pid 923739
2025-01-06 14:53:24,500 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:25,505 INFO spawned: 'logplatform_service' with pid 923871
2025-01-06 14:53:27,343 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:29,349 INFO spawned: 'logplatform_service' with pid 924035
2025-01-06 14:53:31,278 INFO exited: logplatform_service (exit status 0; not expected)
2025-01-06 14:53:34,285 INFO spawned: 'logplatform_service' with pid 924243
2025-01-06 14:53:36,131 INFO exited: logplatform_service (exit status 0; not expected)
.....
does anyone know how to fix it, how can i run my java service?
i can start my java service well just run:
The text was updated successfully, but these errors were encountered: