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!