I'm on day 1 of using Bokeh, and I'm trying to understand how the server works. First, I ran one of the example apps with
bokeh serve --show main.py
And I saw this info:
So then I saw there were no other unused sessions available, so I wasn't entirely surprised when I tried to run another app in parallel (launched from another window with the same command) and it failed:
So then I thought if I closed the app window I would be able to run a different app, and I noticed the server did register that I closed the web browser:
However I am still getting this error:
port 5006 is already in use
I went through the docs, and I apologize if I am missing something, but my two questions are
Thanks for suggestions and links.
You can start multiple apps with a single invocation of the bokeh
command:
bokeh serve --show app1.py, app2/ app3.py
Or you can run different apps on different ports explicitly:
bokeh serve --show --port 5001 app1.py
bokeh serve --show --port 5002 app2.py
If there is ever a need to use port 5006 (for whatever reason). For linux this is the solution: Get the process ID from
netstat -tupln
Note down the PID from the list, and the run the following command
kill -9 <pid>
Now you should be able to use the default port again!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With