Skip to content
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

Cannot terminate swampdragon with supervisor #166

Open
akats opened this issue Oct 15, 2015 · 1 comment
Open

Cannot terminate swampdragon with supervisor #166

akats opened this issue Oct 15, 2015 · 1 comment

Comments

@akats
Copy link

akats commented Oct 15, 2015

Hi,

When I do sudo supervisorctl restart all, swampdragon fails to restart. I see the following message in the log:

Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.4/dist-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.4/dist-packages/django/core/management/init.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 393, in run_from_argv
self.execute(_args, *_cmd_options)
File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 444, in execute
output = self.handle(_args, *_options)
File "/usr/local/lib/python3.4/dist-packages/swampdragon/management/commands/runsd.py", line 11, in handle
run_server(host_port=host_port)
File "/usr/local/lib/python3.4/dist-packages/swampdragon/swampdragon_server.py", line 63, in run_server
app.listen(PORT, address=HOST, no_keep_alive=False)
File "/usr/local/lib/python3.4/dist-packages/tornado/web.py", line 1788, in listen
server.listen(port, address)
File "/usr/local/lib/python3.4/dist-packages/tornado/tcpserver.py", line 126, in listen
sockets = bind_sockets(port, address=address)
File "/usr/local/lib/python3.4/dist-packages/tornado/netutil.py", line 187, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 98] Address already in use

Here is the relevant supervisor config:
[program:swampdragon]
command = /home/ubuntu/mosaic/server-setup/swampdragon_start.sh
user = ubuntu
stdout_logfile = /home/ubuntu/log/swampdragon_supervisor.log
redirect_stderr = true
stopsignal=INT

In order to restart swampdragon, I have to
ps -aux |grep runsd
kill the process
sudo supervisorctl swampdragon start.

All of this is on AWS Ubuntu.
Thanks!

@ZuSe
Copy link

ZuSe commented Nov 1, 2015

Are u using the upcoming supervisor for Python3 or the one from the official repository?
I am using version 4.0.0.dev0 installed via pip under Ubuntu 14.04, everything works with it.

Here is my config:

[supervisord]

[program:xxxx__swampdragon]
command=/home/django/xxxx/venv/bin/python /home/django/xxxxserver.py 127.0.0.1:900%(process_num)01d
user=django
autostart=true
autorestart=true
stderr_logfile=/home/django/xxxx/logs/sd.log
stdout_logfile=/home/django/xxxx/logs/sd.log
stopsignal=INT
process_name=%(program_name)s_%(process_num)01d
numprocs=12

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

No branches or pull requests

2 participants