You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.
How to run the Sample django + parambokeh apps on a web server other than on a local machine?
The web server is an Apache http server running on an EC2 single instance, listening on port 80.
I tried many different host addresses and ports configurations but I don't really understand how things work.
I believe that the following bk_worker code starts the the bokeh server in the background when a new thread is started:
def bk_worker():
Note: num_procs must be 1; see e.g. flask_gunicorn_embed.py for num_procs>1
server = Server({'/bk_sliders_app': bk_sliders.app},
io_loop=IOLoop(),
address=bk_config.server['address'],
port=bk_config.server['port'],
allow_websocket_origin=["localhost:8000"])
server.start()
server.io_loop.start()
What should be the address and port specified there? It is currently set to localhost and 5006 because I believe that, since Server() is called on the web server, then it should spawn a bokeh server on the same local host, correct? If not, then what should be the address and port (I also tried 0.0.0.0 but it didn't work)?
I believe that the bokeh server has started because I see a thread running under the wsgi user and started by httpd when running ps -ael on the EC2 instance:
4 S 0 20701 3057 0 80 0 - 62977 - ? 00:00:00 httpd
0 S 0 20705 20701 0 80 0 - 6295 - ? 00:00:00 rotatelogs
5 S 497 20706 20701 0 80 0 - 247053 - ? 00:00:01 httpd
Is there a better way to check that the bokeh server is running correctly and is there a way to see a log from the bokeh server?
I slightly modified the base.html template to display the output of server_document() called from view.py:
Where does this script run? Does it run on the client browser or does it run on the web server? If it runs on the client, then the http://localhost:5006 src should be incorrect and should be django2-env.xpy8pjmgjb.us-east-2.elasticbeanstalk.com instead, correct? Then what about the port number? 5006 is not open to internet access, so should it be port 80 instead? In this case, do I need to setup the Apache http server as a proxy/reverse proxy? If yes, how do I do it?
The text was updated successfully, but these errors were encountered:
Hi,
Yes I managed to solve the issue. I am travelling the next couple weeks and I’ll send you some files in the next couple days if that’s ok with you.
Thanks,
Daniel
From: rsosnowski01 <[email protected]>
Sent: Tuesday, May 21, 2019 1:54 PM
To: ioam/parambokeh <[email protected]>
Cc: Messer, Daniel <[email protected]>; Author <[email protected]>
Subject: Re: [ioam/parambokeh] How to deploy the Django and parambokeh sample on a remote web server (#78)
Hi, did you finally manage setting proxy/reverse proxy on Apache?
It seems that I have similar issue. I have tried to find answer on Bokeh Discussion group: https://groups.google.com/a/continuum.io/d/msgid/bokeh/cc1a9766-ecc1-41e4-9d21-84cfa8335d65%40continuum.io
I'd appreciate your help if you have finally found answers to your questions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#78?email_source=notifications&email_token=ALFF2ZP5JHJ5RAJKDZLOPZLPWRANXA5CNFSM4G5G3NM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV43BDY#issuecomment-494514319>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ALFF2ZJTM47KK5KE2P2F4ATPWRANXANCNFSM4G5G3NMQ>.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
How to run the Sample django + parambokeh apps on a web server other than on a local machine?
The web server is an Apache http server running on an EC2 single instance, listening on port 80.
I tried many different host addresses and ports configurations but I don't really understand how things work.
I believe that the following bk_worker code starts the the bokeh server in the background when a new thread is started:
def bk_worker():
Note: num_procs must be 1; see e.g. flask_gunicorn_embed.py for num_procs>1
server = Server({'/bk_sliders_app': bk_sliders.app},
io_loop=IOLoop(),
address=bk_config.server['address'],
port=bk_config.server['port'],
allow_websocket_origin=["localhost:8000"])
server.start()
server.io_loop.start()
What should be the address and port specified there? It is currently set to localhost and 5006 because I believe that, since Server() is called on the web server, then it should spawn a bokeh server on the same local host, correct? If not, then what should be the address and port (I also tried 0.0.0.0 but it didn't work)?
I believe that the bokeh server has started because I see a thread running under the wsgi user and started by httpd when running ps -ael on the EC2 instance:
4 S 0 20701 3057 0 80 0 - 62977 - ? 00:00:00 httpd
0 S 0 20705 20701 0 80 0 - 6295 - ? 00:00:00 rotatelogs
5 S 497 20706 20701 0 80 0 - 247053 - ? 00:00:01 httpd
Is there a better way to check that the bokeh server is running correctly and is there a way to see a log from the bokeh server?
I slightly modified the base.html template to display the output of server_document() called from view.py:
<title>parambokeh in django: sliders</title>The script returned when accessing the http://django2-env.xpy8pjmgjb.us-east-2.elasticbeanstalk.com/sliders/ url is
<script src="http://localhost:5006/bk_sliders_app/autoload.js?bokeh-autoload-element=1002&bokeh-app-path=/bk_sliders_app&bokeh-absolute-url=http://localhost:5006/bk_sliders_app" id="1002"></script>Where does this script run? Does it run on the client browser or does it run on the web server? If it runs on the client, then the http://localhost:5006 src should be incorrect and should be django2-env.xpy8pjmgjb.us-east-2.elasticbeanstalk.com instead, correct? Then what about the port number? 5006 is not open to internet access, so should it be port 80 instead? In this case, do I need to setup the Apache http server as a proxy/reverse proxy? If yes, how do I do it?
The text was updated successfully, but these errors were encountered: