"Cannot start Bokeh server, port 8787 is already in use" while instantiating a Client
See original GitHub issueWhen using c = Client() from a script, I get this (on an 8 core machine):
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
bokeh.server.server - CRITICAL - Cannot start Bokeh server, port 8787 is already in use
and then it hangs.
Strange thing is, it does work OK from ipython or from a live python session. But if I create a script with the following code and try to run it (“python3 test.py”) it hangs:
from distributed import Client, local_client
client = Client()
Breaking with ctrl-c gives the following traceback:
Traceback (most recent call last):
File "test_fib.py", line 3, in <module>
client = Client()
Traceback (most recent call last):
File "<string>", line 1, in <module>
Interrupted, shutting down File "/usr/lib64/python3.5/multiprocessing/forkserver.py", line 164, in main
File "/usr/lib/python3.5/site-packages/distributed/client.py", line 366, in __init__
rfds = [key.fileobj for (key, events) in selector.select()]
File "/usr/lib64/python3.5/selectors.py", line 441, in select
self.start(timeout=timeout)
File "/usr/lib/python3.5/site-packages/distributed/client.py", line 396, in start
sync(self.loop, self._start, **kwargs)
File "/usr/lib/python3.5/site-packages/distributed/utils.py", line 142, in sync
e.wait(1000000)
fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt
File "/usr/lib64/python3.5/threading.py", line 549, in wait
signaled = self._cond.wait(timeout)
File "/usr/lib64/python3.5/threading.py", line 297, in wait
gotit = waiter.acquire(True, timeout)
KeyboardInterrupt
/usr/lib64/python3.5/multiprocessing/semaphore_tracker.py:129: UserWarning: semaphore_tracker: There appear to be 192 leaked semaphores to clean up at shutdown
len(cache))
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
cannot start bokeh server - Community Support
Hi. I am trying to take code from the sliders demo and drop it in my app. When I run the sliders demo...
Read more >FAQ — arboreto 0.1.5 documentation - Read the Docs
Q: How can I use the Dask diagnostics (bokeh) dashboard? ... By default, when no custom Client is specified, Arboreto creates a LocalCluster...
Read more >API — Dask.distributed 2022.12.1 documentation
When a Client is instantiated it takes over all dask.compute and dask.persist calls by ... Note that the task stream diagnostic does not...
Read more >Deploying to Heroku a Bokeh server plot embedded in Flask
And this is what I get from the heroku logs. Note there's an Cannot start Bokeh server, port 5006 is already in use"...
Read more >arboreto Documentation - Read the Docs
Arboreto currently supports 2 GRN inference algorithms: ... distributed.scheduler - INFO - Could not launch service: ('bokeh', 8787).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also, a simple suggestion. Instead of:
Have you tried:
Ok, I’m closing this issue. Progress can be tracked over at https://github.com/dask/distributed/issues/733