Unable to start Bokeh Server on a remote Linux Virtual Private Server

I am trying to deploy a bokeh server app integrated into a flask app onto a Digital Ocean VPS (Virtual Private Server). On my VPS which is Linux based, I cannot start my bokeh server app. I get an error message that says,
bokeh_serve: ERROR (spawn error)

``

In order to debug this error, I tried to look at my error logs. They look something like this,

     usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
{html,info,json,png,sampledata,secret,serve,static,svg}$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006

usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006

``

This is how my bokeh_serve.conf file looks like,

[program:bokeh_serve]
command=/opt/envs/virtual/bin/bokeh serve Button_test_update_version2.py --allow-websocket-origin=192.81.213.94 – host=192.81.213.94:5006$
directory=/opt/webapps/bokehflask
autostart=false
autorestart=true
startretries=3
user=nobody

``

192.81.213.94 is my registered IP address on Digital Ocean.

I’m also including my app.py file that integrates my bokeh server app within flask because I feel that this is also relevant to the debugging process.

from flask import Flask, render_template
from bokeh.embed import server_session
from bokeh.client import pull_session
from werkzeug.contrib.fixers import ProxyFix

#instantiating the flask app
app = Flask(name)

#create the index page function

@app.route("/")
def index():
session = pull_session(url=“http://192.81.213.94:5006/Button_test_update_version2”)
bokeh_script = server_session(url=“http://192.81.213.94:5006/Button_test_update_version2”)
return render_template(“index.html”, bokeh_script=bokeh_script)

app.wsgi_app = ProxyFix(app.wsgi_app)

#run the app
if name == “main”:
app.run(debug=True)

``

Any help on this is greatly appreciated. Thanks!

Hi,

It's not just "bokeh" by itself, it's "bokeh serve". There are several bokeh subcommands, and the server is just one of them.

Thanks,

Bryan

···

On Jun 24, 2018, at 23:44, anuj nimkar <[email protected]> wrote:

I am trying to deploy a bokeh server app integrated into a flask app onto a Digital Ocean VPS (Virtual Private Server). On my VPS which is Linux based, I cannot start my bokeh server app. I get an error message that says,
bokeh_serve: ERROR (spawn error)

In order to debug this error, I tried to look at my error logs. They look something like this,

         usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
    {html,info,json,png,sampledata,secret,serve,static,svg}$
                                       ...
    /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006

    usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                       {html,info,json,png,sampledata,secret,serve,static,svg$
                                       ...
    /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006
    usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                       {html,info,json,png,sampledata,secret,serve,static,svg$
                                       ...
    /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006
    usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                       {html,info,json,png,sampledata,secret,serve,static,svg$
                                       ...
    /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006

This is how my bokeh_serve.conf file looks like,

[program:bokeh_serve]
    command=/opt/envs/virtual/bin/bokeh serve Button_test_update_version2.py --allow-websocket-origin=192.81.213.94 -- host=192.81.213.94:5006$
    directory=/opt/webapps/bokehflask
    autostart=false
    autorestart=true
    startretries=3
    user=nobody

192.81.213.94 is my registered IP address on Digital Ocean.

I'm also including my app.py file that integrates my bokeh server app within flask because I feel that this is also relevant to the debugging process.

from flask import Flask, render_template
from bokeh.embed import server_session
from bokeh.client import pull_session
from werkzeug.contrib.fixers import ProxyFix
        
#instantiating the flask app
app = Flask(__name__)
        
#create the index page function
        
@app.route("/")
def index():
   session = pull_session(url="http://192.81.213.94:5006/Button_test_update_version2")
   bokeh_script = server_session(url="http://192.81.213.94:5006/Button_test_update_version2")
   return render_template("index.html", bokeh_script=bokeh_script)
        
app.wsgi_app = ProxyFix(app.wsgi_app)
        
#run the app
if __name__ == "_main_":
   app.run(debug=True)

Any help on this is greatly appreciated. Thanks!

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/23bfcd2e-fe8c-45c8-8456-71ce8cd4fa2c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Brian,
Thanks for the reply. I’m not sure I follow you. bokeh serve is what I have used in the bokeh_serve.conf file.

Best,

Anuj

···

On Sunday, 24 June 2018 23:51:09 UTC-7, Bryan Van de ven wrote:

Hi,

It’s not just “bokeh” by itself, it’s “bokeh serve”. There are several bokeh subcommands, and the server is just one of them.

Thanks,

Bryan

On Jun 24, 2018, at 23:44, anuj nimkar [email protected] wrote:

I am trying to deploy a bokeh server app integrated into a flask app onto a Digital Ocean VPS (Virtual Private Server). On my VPS which is Linux based, I cannot start my bokeh server app. I get an error message that says,

bokeh_serve: ERROR (spawn error)

In order to debug this error, I tried to look at my error logs. They look something like this,

     usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
{html,info,json,png,sampledata,secret,serve,static,svg}$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)

This is how my bokeh_serve.conf file looks like,

[program:bokeh_serve]

command=/opt/envs/virtual/bin/bokeh serve Button_test_update_version2.py --allow-websocket-origin=192.81.213.94 --     host=192.81.213.94:5006$
directory=/opt/webapps/bokehflask
autostart=false
autorestart=true
startretries=3
user=nobody

192.81.213.94 is my registered IP address on Digital Ocean.

I’m also including my app.py file that integrates my bokeh server app within flask because I feel that this is also relevant to the debugging process.

from flask import Flask, render_template

from bokeh.embed import server_session

from bokeh.client import pull_session

from werkzeug.contrib.fixers import ProxyFix

#instantiating the flask app

app = Flask(name)

#create the index page function

@app.route("/")

def index():

session = pull_session(url=“http://192.81.213.94:5006/Button_test_update_version2”)

bokeh_script = server_session(url=“http://192.81.213.94:5006/Button_test_update_version2”)

return render_template(“index.html”, bokeh_script=bokeh_script)

app.wsgi_app = ProxyFix(app.wsgi_app)

#run the app

if name == “main”:

app.run(debug=True)

Any help on this is greatly appreciated. Thanks!


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/23bfcd2e-fe8c-45c8-8456-71ce8cd4fa2c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi,

Actually, looking more closely, the problem is that you are supplying a --host argument. This argument was redundant and confusing and was deprecated with a warning message for a time before being removed entirely last year. Supplying it on modern versions of Bokeh will result in a usage error, as you see.

THanks,

Bryan

···

On Jun 24, 2018, at 23:57, anuj nimkar <[email protected]> wrote:

Hi Brian,
Thanks for the reply. I'm not sure I follow you. bokeh serve is what I have used in the bokeh_serve.conf file.

Best,
Anuj

On Sunday, 24 June 2018 23:51:09 UTC-7, Bryan Van de ven wrote:
Hi,

It's not just "bokeh" by itself, it's "bokeh serve". There are several bokeh subcommands, and the server is just one of them.

Thanks,

Bryan

> On Jun 24, 2018, at 23:44, anuj nimkar <[email protected]> wrote:
>
> I am trying to deploy a bokeh server app integrated into a flask app onto a Digital Ocean VPS (Virtual Private Server). On my VPS which is Linux based, I cannot start my bokeh server app. I get an error message that says,
> bokeh_serve: ERROR (spawn error)
>
> In order to debug this error, I tried to look at my error logs. They look something like this,
>
>
> usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
> {html,info,json,png,sampledata,secret,serve,static,svg} &gt; \.\.\. &gt; /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: \-\-host=192\.81\.213\.94:5006 &gt; &gt; &gt; usage: /opt/envs/virtual/bin/bokeh \[\-h\] \[\-v\] &gt; \{html,info,json,png,sampledata,secret,serve,static,svg
> ...
> /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006
> usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
> {html,info,json,png,sampledata,secret,serve,static,svg$
> ...
> /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006
> usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
> {html,info,json,png,sampledata,secret,serve,static,svg$
> ...
> /opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=192.81.213.94:5006
>
>
> This is how my bokeh_serve.conf file looks like,
>
> [program:bokeh_serve]
> command=/opt/envs/virtual/bin/bokeh serve Button_test_update_version2.py --allow-websocket-origin=192.81.213.94 -- host=192.81.213.94:5006$
> directory=/opt/webapps/bokehflask
> autostart=false
> autorestart=true
> startretries=3
> user=nobody
>
>
> 192.81.213.94 is my registered IP address on Digital Ocean.
>
> I'm also including my app.py file that integrates my bokeh server app within flask because I feel that this is also relevant to the debugging process.
>
> from flask import Flask, render_template
> from bokeh.embed import server_session
> from bokeh.client import pull_session
> from werkzeug.contrib.fixers import ProxyFix
>
> #instantiating the flask app
> app = Flask(__name__)
>
> #create the index page function
>
> @app.route("/")
> def index():
> session = pull_session(url="http://192.81.213.94:5006/Button_test_update_version2")
> bokeh_script = server_session(url="http://192.81.213.94:5006/Button_test_update_version2")
> return render_template("index.html", bokeh_script=bokeh_script)
>
> app.wsgi_app = ProxyFix(app.wsgi_app)
>
> #run the app
> if __name__ == "_main_":
> app.run(debug=True)
>
>
>
> Any help on this is greatly appreciated. Thanks!
>
>
> --
> You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/23bfcd2e-fe8c-45c8-8456-71ce8cd4fa2c%40continuum.io.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/66fab908-4df9-49fd-b40b-0cc203081649%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

It worked on removing the --host argument. Just in case, others come across the same issue, the way to do it is,

command=/opt/envs/virtual/bin/bokeh serve Button_test_update_version2.py --allow-websocket-origin=192.81.213.94 --port=5006

``

Thanks!

···

On Monday, 25 June 2018 00:06:43 UTC-7, Bryan Van de ven wrote:

Hi,

Actually, looking more closely, the problem is that you are supplying a --host argument. This argument was redundant and confusing and was deprecated with a warning message for a time before being removed entirely last year. Supplying it on modern versions of Bokeh will result in a usage error, as you see.

THanks,

Bryan

On Jun 24, 2018, at 23:57, anuj nimkar [email protected] wrote:

Hi Brian,

Thanks for the reply. I’m not sure I follow you. bokeh serve is what I have used in the bokeh_serve.conf file.

Best,

Anuj

On Sunday, 24 June 2018 23:51:09 UTC-7, Bryan Van de ven wrote:

Hi,

It’s not just “bokeh” by itself, it’s “bokeh serve”. There are several bokeh subcommands, and the server is just one of them.

Thanks,

Bryan

On Jun 24, 2018, at 23:44, anuj nimkar [email protected] wrote:

I am trying to deploy a bokeh server app integrated into a flask app onto a Digital Ocean VPS (Virtual Private Server). On my VPS which is Linux based, I cannot start my bokeh server app. I get an error message that says,
bokeh_serve: ERROR (spawn error)

In order to debug this error, I tried to look at my error logs. They look something like this,

     usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
{html,info,json,png,sampledata,secret,serve,static,svg}$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)
usage: /opt/envs/virtual/bin/bokeh [-h] [-v]
                                   {html,info,json,png,sampledata,secret,serve,static,svg$
                                   ...
/opt/envs/virtual/bin/bokeh: error: unrecognized arguments: --host=[192.81.213.94:5006](http://192.81.213.94:5006)

This is how my bokeh_serve.conf file looks like,

[program:bokeh_serve]
command=/opt/envs/virtual/bin/bokeh serve Button_test_update_version2.py --allow-websocket-origin=192.81.213.94 – host=192.81.213.94:5006$
directory=/opt/webapps/bokehflask
autostart=false
autorestart=true
startretries=3
user=nobody

192.81.213.94 is my registered IP address on Digital Ocean.

I’m also including my app.py file that integrates my bokeh server app within flask because I feel that this is also relevant to the debugging process.

from flask import Flask, render_template
from bokeh.embed import server_session
from bokeh.client import pull_session
from werkzeug.contrib.fixers import ProxyFix

#instantiating the flask app
app = Flask(name)

#create the index page function

@app.route("/")
def index():
session = pull_session(url=“http://192.81.213.94:5006/Button_test_update_version2”)
bokeh_script = server_session(url=“http://192.81.213.94:5006/Button_test_update_version2”)
return render_template(“index.html”, bokeh_script=bokeh_script)

app.wsgi_app = ProxyFix(app.wsgi_app)

#run the app
if name == “main”:
app.run(debug=True)

Any help on this is greatly appreciated. Thanks!


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/23bfcd2e-fe8c-45c8-8456-71ce8cd4fa2c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/66fab908-4df9-49fd-b40b-0cc203081649%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.