Skip to content

supervisor run error After supervisorctl reload command execute twice #858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zhuqiuyang opened this issue Dec 3, 2016 · 1 comment · Fixed by #885
Closed

supervisor run error After supervisorctl reload command execute twice #858

zhuqiuyang opened this issue Dec 3, 2016 · 1 comment · Fixed by #885

Comments

@zhuqiuyang
Copy link

why supervisorctl reload cmd will lead supervisor report err and shut down.
i prepare use it to daemon my golang application.
image

@mnaberez
Copy link
Member

Reproduce Instructions

Start supervisord in the foreground with this config:

$ cat supervisord.conf
[supervisord]

[inet_http_server]
port = 127.0.0.1:9001

[supervisorctl]
serverurl = http://127.0.0.1:9001

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

$ supervisord -n -c supervisord.conf 
2016-12-29 14:09:05,033 INFO Increased RLIMIT_NOFILE limit to 1024
2016-12-29 14:09:05,044 INFO RPC interface 'supervisor' initialized
2016-12-29 14:09:05,045 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2016-12-29 14:09:05,045 INFO supervisord started with pid 22137

While supervisord is still running, in another terminal:

$ supervisorctl -c supervisord.conf reload
Restarted supervisord

$ supervisorctl -c supervisord.conf reload
Restarted supervisord

After the second reload, supervisord will crash:

2016-12-29 14:11:49,406 INFO RPC interface 'supervisor' initialized
2016-12-29 14:11:49,406 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2016-12-29 14:11:49,406 INFO supervisord started with pid 22235
2016-12-29 14:11:50,741 INFO RPC interface 'supervisor' initialized
2016-12-29 14:11:50,741 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2016-12-29 14:11:50,741 INFO supervisord started with pid 22235
Traceback (most recent call last):
  File "/usr/local/bin/supervisord", line 11, in <module>
    load_entry_point('supervisor', 'console_scripts', 'supervisord')()
  File "/path/to/supervisor/supervisord.py", line 361, in main
    go(options)
  File "/path/to/supervisor/supervisord.py", line 371, in go
    d.main()
  File "/path/to/supervisor/supervisord.py", line 82, in main
    self.run()
  File "/path/to/supervisor/supervisord.py", line 99, in run
    self.runforever()
  File "/path/to/supervisor/supervisord.py", line 214, in runforever
    r, w = self.options.poller.poll(timeout)
  File "/path/to/supervisor/poller.py", line 176, in poll
    kevents = self._kqueue.control(None, self.max_events, timeout)
OSError: [Errno 9] Bad file descriptor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants