mirror of https://github.com/zulip/zulip.git
run-dev: Make address-in-use errors more obvious.
This seems to be a common enough pitfall to justify a bit of extra handling. Example output: $ ./tools/run-dev.py Clearing memcached ... Flushing memcached... OK Starting Zulip services on ports: web proxy: ... Note: only port 9991 is exposed to the host in a Vagrant environment. ERROR: You probably have another server running!!! Traceback (most recent call last): File "./tools/run-dev.py", line 421, in <module> app.listen(proxy_port, address=options.interface) File "/srv/zulip-py3-venv/lib/python3.5/... server.listen(port, address) File "/srv/zulip-py3-venv/lib/python3.5/... sockets = bind_sockets(port, address=address) File "/srv/zulip-py3-venv/lib/python3.5/... sock.bind(sockaddr) OSError: [Errno 98] Address already in use Terminated
This commit is contained in:
parent
837483b026
commit
c665f809f2
|
@ -417,7 +417,12 @@ print("".join((WARNING,
|
|||
|
||||
try:
|
||||
app = Application(enable_logging=options.enable_tornado_logging)
|
||||
app.listen(proxy_port, address=options.interface)
|
||||
try:
|
||||
app.listen(proxy_port, address=options.interface)
|
||||
except OSError as e:
|
||||
if e.errno == 98:
|
||||
print('\n\nERROR: You probably have another server running!!!\n\n')
|
||||
raise
|
||||
ioloop = IOLoop.instance()
|
||||
for s in (signal.SIGINT, signal.SIGTERM):
|
||||
signal.signal(s, shutdown_handler)
|
||||
|
|
Loading…
Reference in New Issue