Open akats opened 9 years ago
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
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!