Skip to content

Programs always try to restart #1673

@MrWiffer

Description

@MrWiffer

My supervisor.conf is as follows:

[supervisord]
nodaemon=true
logfile=/xxx/logs/supervisord.log
logfile_maxbytes=256MB
logfile_backups=10
redirect_stderr=true
loglevel=info
pidfile=/xxx/logs/supervisord.pid
identifier=supervisor

[program:jupyter]
command=/xxx/launch_jupyter.sh
autostart=true
autorestart=false
exitcodes=0
redirect_stderr=true
startretries=10
startsecs=60
stdout_logfile=/xxx/logs/jupyter.log
stdout_events_enabled=true
stderr_events_enabled=true

[program:code-server]
command=/xxx/launch_code_server.sh
autostart=true
autorestart=false
exitcodes=0
redirect_stderr=true
startretries=10
startsecs=60
stdout_logfile=/xxx/logs/code-server.log
stdout_events_enabled=true
stderr_events_enabled=true

[eventlistener:stdout]
command=/xxx/bin/supervisor_stdout
buffer_size=268435456
events=PROCESS_LOG
result_handler=supervisor_stdout:event_handler

[include]
files=/etc/supervisor/conf.d/*.conf

After executing supervisord -c supervisor.conf on the terminal, supervisord.log is as follows. It seems that even though I set exitcodes=0 and autorestart=false, the program still keeps trying to restart.

2025-01-15 19:07:01,673 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2025-01-15 19:07:01,673 WARN No file matches via include "/etc/supervisor/conf.d/*.conf"
2025-01-15 19:07:01,674 INFO supervisord started with pid 537
2025-01-15 19:07:02,677 INFO spawned: 'stdout' with pid 538
2025-01-15 19:07:02,678 INFO spawned: 'code-server' with pid 539
2025-01-15 19:07:02,679 INFO spawned: 'jupyter' with pid 540
2025-01-15 19:07:02,682 WARN exited: jupyter (exit status 0; not expected)
2025-01-15 19:07:03,196 WARN exited: code-server (exit status 1; not expected)
2025-01-15 19:07:04,197 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2025-01-15 19:07:04,198 INFO spawned: 'code-server' with pid 566
2025-01-15 19:07:04,199 INFO spawned: 'jupyter' with pid 567
code-server stdout | [2025-01-15T11:07:03.180Z] info  code-server 4.95.3 b0c935a6e0742adde9f7a5f6e5816553ee0e7ffb
code-server stdout | 
code-server stdout | [2025-01-15T11:07:03.182Z] info  Using user-data-dir /xxx/.local/share/code-server
code-server stdout | 
code-server stdout | [2025-01-15T11:07:03.186Z] error listen EADDRINUSE: address already in use 0.0.0.0:10000
code-server stdout | 
2025-01-15 19:07:04,203 WARN exited: jupyter (exit status 0; not expected)
code-server stdout | [2025-01-15T11:07:04.671Z] info  code-server 4.95.3 b0c935a6e0742adde9f7a5f6e5816553ee0e7ffb
code-server stdout | 
code-server stdout | [2025-01-15T11:07:04.672Z] info  Using user-data-dir /xxx/.local/share/code-server
code-server stdout | 
code-server stdout | [2025-01-15T11:07:04.676Z] error listen EADDRINUSE: address already in use 0.0.0.0:10000
code-server stdout | 
2025-01-15 19:07:04,685 WARN exited: code-server (exit status 1; not expected)
2025-01-15 19:07:06,687 INFO spawned: 'code-server' with pid 593
2025-01-15 19:07:06,688 INFO spawned: 'jupyter' with pid 594
2025-01-15 19:07:06,692 WARN exited: jupyter (exit status 0; not expected)
code-server stdout | [2025-01-15T11:07:07.156Z] info  code-server 4.95.3 b0c935a6e0742adde9f7a5f6e5816553ee0e7ffb
code-server stdout | 
code-server stdout | [2025-01-15T11:07:07.158Z] info  Using user-data-dir /xxx/.local/share/code-server
code-server stdout | 
code-server stdout | [2025-01-15T11:07:07.161Z] error listen EADDRINUSE: address already in use 0.0.0.0:10000
code-server stdout | 
2025-01-15 19:07:07,170 WARN exited: code-server (exit status 1; not expected)
2025-01-15 19:07:10,174 INFO spawned: 'code-server' with pid 620
2025-01-15 19:07:10,176 INFO spawned: 'jupyter' with pid 621
2025-01-15 19:07:10,179 WARN exited: jupyter (exit status 0; not expected)
code-server stdout | [2025-01-15T11:07:10.641Z] info  code-server 4.95.3 b0c935a6e0742adde9f7a5f6e5816553ee0e7ffb
code-server stdout | 
code-server stdout | [2025-01-15T11:07:10.643Z] info  Using user-data-dir /xxx/.local/share/code-server
code-server stdout | 
code-server stdout | [2025-01-15T11:07:10.646Z] error listen EADDRINUSE: address already in use 0.0.0.0:10000
code-server stdout | 
2025-01-15 19:07:10,656 WARN exited: code-server (exit status 1; not expected)
2025-01-15 19:07:14,661 INFO spawned: 'code-server' with pid 647
2025-01-15 19:07:14,662 INFO spawned: 'jupyter' with pid 648
2025-01-15 19:07:14,665 WARN exited: jupyter (exit status 0; not expected)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions