merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
439 stars 145 forks source link

Address already in use problem when opening two big projects at same time #485

Closed dcourtine closed 7 years ago

dcourtine commented 7 years ago
wireles-guest-16-39-129:nautili courtine$ anvi-display-pan -p NAUTILI-PAN.db -s NAUTILI-SAMPLES.db -g ../THERMOCOCCALES-GENOMES.h5
Genomes storage ..............................: Initialized (storage hash: 9cab4545)
Num genomes in storage .......................: 102
Num genomes will be used .....................: 61
Pan DB .......................................: Initialized: NAUTILI-PAN.db (v. 5)
Process Process-1:
Traceback (most recent call last):
  File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/Cellar/anvio/2.2.2_1/libexec/bin/bottle.py", line 3123, in run
    server.run(app)
  File "/usr/local/Cellar/anvio/2.2.2_1/libexec/bin/bottle.py", line 2801, in run
    server.start()
  File "/usr/local/Cellar/anvio/2.2.2_1/libexec/lib/python3.6/site-packages/cherrypy/wsgiserver/__init__.py", line 2008, in start
    raise socket.error(msg)
OSError: No socket could be created -- (('0.0.0.0', 8080): [Errno 48] Address already in use)

* The server is now listening the port number "8080". When you are finished, press
CTRL+C to terminate the server.

wireles-guest-16-39-129:nautili courtine$ anvi-display-pan -p NAUTILI-PAN.db -s NAUTILI-SAMPLES.db -g ../THERMOCOCCALES-GENOMES.h5 -p 8081

File/Path Error: No such file: '8081' :/
ozcan commented 7 years ago

Confirmed, anvio tries to pick port before initializing Interactive class when it takes long time another process can occupy that port, it should pick after everything is done.

meren commented 7 years ago

Also, of you put one server in background, and start another one, you get this error.