how to launch bokeh server for others to be able to see?

Hi,

If i am running bokeh server on my computer thats doing live plotting, how would allow people on my local network to view it through their own computer through a web browser? is there any example of this?

Yes there is. Heroku is one of them. You can also run it on python flask and django frameworks

···

On Jan 26, 2017 2:44 PM, “Eugene Cheung” [email protected] wrote:

Hi,

If i am running bokeh server on my computer thats doing live plotting, how would allow people on my local network to view it through their own computer through a web browser? is there any example of this?

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/afa12f8c-79ee-4256-ae23-eb7b21459d6e%40continuum.io.

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

I tried using bokeh serve myAPP.py --port 5100 --host 127.0.0.1:80 but I keep seeing forbidden 403

···

On Thursday, 26 January 2017 15:44:25 UTC-5, Eugene Cheung wrote:

Hi,

If i am running bokeh server on my computer thats doing live plotting, how would allow people on my local network to view it through their own computer through a web browser? is there any example of this?

Basically I am trying to do this:

Standalone Bokeh Server

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

is there any examples of the Imeddiate option?

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you'll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren't also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It's hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

···

On Jan 26, 2017, at 4:04 PM, Eugene Cheung <[email protected]> wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

Bokeh server — Bokeh 3.3.2 Documentation

is there any examples of the Imeddiate option?

--
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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Sorry this may be an unrelated question… but how do you set up a host option with an IP/hostname that users can use to connect to my machine? where would I find the this IP address?

···

On Thursday, 26 January 2017 17:26:37 UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

when i try bokeh serve --host 10.215.14.157:5007 --host localhost:5006 --show myApp.py where 10.215.14.157 is my local area ip address i get from using IPConfig , I get forbidden 403, but when i use localhost
http://localhost:5006/liveGrapher works fine but 10.215.14.157:5007\liveGrapher shows nothing.

···

On Thursday, 26 January 2017 23:25:15 UTC-5, Eugene Cheung wrote:

Sorry this may be an unrelated question… but how do you set up a host option with an IP/hostname that users can use to connect to my machine? where would I find the this IP address?

On Thursday, 26 January 2017 17:26:37 UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="http://127.0.0.1:5006", app_path="/missing_players", session_id=session.id)
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

···

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

I realized I should also get the js console error:

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

···

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, [email protected] wrote:

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="[http://127.0.0.1:5006](http://127.0.0.1:5006)", app_path="/missing_players", session_id=[session.id](http://session.id))
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

Bokeh Server Configuration

bokeh_host = “0.0.0.0:5006”

flask_host = “0.0.0.0:5000”

bokeh_app = Application(FunctionHandler(modify_doc))

io_loop = IOLoop.current()

bokeh_server = Server({‘/bkapp’: bokeh_app}, io_loop=io_loop, host=[bokeh_host, ‘*’], address=“0.0.0.0”, port=5006,\

allow_websocket_origin=[flask_host])

bokeh_server.start()

@flask_app.route(‘/bkapp’, methods=[‘GET’])

def bkapp_page():

print(‘Opening Bokeh application on http://’+bokeh_host+‘/’)

script = autoload_server(model=None, app_path=‘/bkapp’, url=‘http://’+bokeh_host)

return render_template(“embed.html”, script=script)

Bryan you mentioned “This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed.” I guess our cases are when “those things are true”. Any suggestions on the “additional configurations”? I tried me best (as above) but still couldn’t solve it.

···

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, [email protected] wrote:

I realized I should also get the js console error:

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="[http://127.0.0.1:5006](http://127.0.0.1:5006)", app_path="/missing_players", session_id=[session.id](http://session.id))
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, [email protected] wrote:

I ran into this same issue and found that I needed to adjust the url kwarg to the autoreload_server function. You have it set to pull from your localhost, which when you are connecting from a remote computer, won’t render the plot. Change the url to use the ip address of your hosting computer and the javascript autoreload should work from a remote computer. Hope this helps!

···

On Monday, January 30, 2017 at 9:37:10 AM UTC-7, Luyu Wang wrote:

In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

Bokeh Server Configuration

bokeh_host = “0.0.0.0:5006

flask_host = “0.0.0.0:5000

bokeh_app = Application(FunctionHandler(modify_doc))

io_loop = IOLoop.current()

bokeh_server = Server({‘/bkapp’: bokeh_app}, io_loop=io_loop, host=[bokeh_host, ‘*’], address=“0.0.0.0”, port=5006,\

allow_websocket_origin=[flask_host])

bokeh_server.start()

@flask_app.route(‘/bkapp’, methods=[‘GET’])

def bkapp_page():

print(‘Opening Bokeh application on http://’+bokeh_host+‘/’)

script = autoload_server(model=None, app_path=‘/bkapp’, url=‘http://’+bokeh_host)

return render_template(“embed.html”, script=script)

Bryan you mentioned “This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed.” I guess our cases are when “those things are true”. Any suggestions on the “additional configurations”? I tried me best (as above) but still couldn’t solve it.

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, [email protected] wrote:

I realized I should also get the js console error:

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="[http://127.0.0.1:5006](http://127.0.0.1:5006)", app_path="/missing_players", session_id=[session.id](http://session.id))
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, [email protected] wrote:

Hi Eugene,

I ran into the same issue. What worked for me was white listing the server that ran bokeh. E.g. if you were starting the server with ‘bokeh serve myapp’ on a server named “eugeneserver” then try instead ‘bokeh serve myapp --host eugenserver:5006’. You can see how client requests are representing themselves in the output log from your bokeh server. So when you got 403 responses on the browser you should’ve seen a log message like below wherever you were running bokeh:

Rejected connection from host ‘:5006’ because it is not in the --host whitelist

So add whatever is in as a whitelisted host when you run bokeh.

You can read more about bokeh commandline options at Bokeh Docs.

  • leo
···

On Thursday, January 26, 2017 at 12:44:25 PM UTC-8, Eugene Cheung wrote:

Hi,

If i am running bokeh server on my computer thats doing live plotting, how would allow people on my local network to view it through their own computer through a web browser? is there any example of this?

Thank you Michael! You’re answer was spot on. Use the IP of the host in the autoload function (server_document in 0.12.7dev)

Thank you for posting it! Helped me greatly :slight_smile:

···

On Sunday, February 5, 2017 at 10:58:24 AM UTC-8, Michael Gilbert wrote:

I ran into this same issue and found that I needed to adjust the url kwarg to the autoreload_server function. You have it set to pull from your localhost, which when you are connecting from a remote computer, won’t render the plot. Change the url to use the ip address of your hosting computer and the javascript autoreload should work from a remote computer. Hope this helps!

On Monday, January 30, 2017 at 9:37:10 AM UTC-7, Luyu Wang wrote:

In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

Bokeh Server Configuration

bokeh_host = “0.0.0.0:5006

flask_host = “0.0.0.0:5000

bokeh_app = Application(FunctionHandler(modify_doc))

io_loop = IOLoop.current()

bokeh_server = Server({‘/bkapp’: bokeh_app}, io_loop=io_loop, host=[bokeh_host, ‘*’], address=“0.0.0.0”, port=5006,\

allow_websocket_origin=[flask_host])

bokeh_server.start()

@flask_app.route(‘/bkapp’, methods=[‘GET’])

def bkapp_page():

print(‘Opening Bokeh application on http://’+bokeh_host+‘/’)

script = autoload_server(model=None, app_path=‘/bkapp’, url=‘http://’+bokeh_host)

return render_template(“embed.html”, script=script)

Bryan you mentioned “This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed.” I guess our cases are when “those things are true”. Any suggestions on the “additional configurations”? I tried me best (as above) but still couldn’t solve it.

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, [email protected] wrote:

I realized I should also get the js console error:

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="[http://127.0.0.1:5006](http://127.0.0.1:5006)", app_path="/missing_players", session_id=[session.id](http://session.id))
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, [email protected] wrote:

How would I adjust the url kwarg to the autoreload_server function?

Thanks.

···

On Wednesday, August 23, 2017 at 1:42:01 PM UTC-4, Michael Covello wrote:

Thank you Michael! You’re answer was spot on. Use the IP of the host in the autoload function (server_document in 0.12.7dev)

Thank you for posting it! Helped me greatly :slight_smile:

On Sunday, February 5, 2017 at 10:58:24 AM UTC-8, Michael Gilbert wrote:

I ran into this same issue and found that I needed to adjust the url kwarg to the autoreload_server function. You have it set to pull from your localhost, which when you are connecting from a remote computer, won’t render the plot. Change the url to use the ip address of your hosting computer and the javascript autoreload should work from a remote computer. Hope this helps!

On Monday, January 30, 2017 at 9:37:10 AM UTC-7, Luyu Wang wrote:

In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

Bokeh Server Configuration

bokeh_host = “0.0.0.0:5006

flask_host = “0.0.0.0:5000

bokeh_app = Application(FunctionHandler(modify_doc))

io_loop = IOLoop.current()

bokeh_server = Server({‘/bkapp’: bokeh_app}, io_loop=io_loop, host=[bokeh_host, ‘*’], address=“0.0.0.0”, port=5006,\

allow_websocket_origin=[flask_host])

bokeh_server.start()

@flask_app.route(‘/bkapp’, methods=[‘GET’])

def bkapp_page():

print(‘Opening Bokeh application on http://’+bokeh_host+‘/’)

script = autoload_server(model=None, app_path=‘/bkapp’, url=‘http://’+bokeh_host)

return render_template(“embed.html”, script=script)

Bryan you mentioned “This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed.” I guess our cases are when “those things are true”. Any suggestions on the “additional configurations”? I tried me best (as above) but still couldn’t solve it.

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, [email protected] wrote:

I realized I should also get the js console error:

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="[http://127.0.0.1:5006](http://127.0.0.1:5006)", app_path="/missing_players", session_id=[session.id](http://session.id))
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, [email protected] wrote:

Yeah honestly, I saw that comment but I’m having issues with the same thing (passing in autoreload_server function as the url kwarg). Now, here’s another point:

When I tried setting the host option to ‘(MY_IP)’ I got this message when trying to access http://(MY_IP):5008

ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin ‘http://(MY_IP):5008’; use --allow-websocket-origin=(MY_IP):5008 to permit this; currently we allow origins {‘localhost:5008’}
WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=AJHAYyrTUG5qE6IAtjlHjs9FvwGCOkHJYkLSEzDHinR0 (MY_IP) 0.00ms

So then I tried setting the allow_websocket_origin parameter into the Server constructor. (I guess now I have to use underscores instead of hyphens)

My constructor now looks like this:

server = Server(app_map, io_loop=io_loop, host='MY_IP:5008',
                port=5008, allow_websocket_origin='MY_IP')

And then I get this error:

ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin ‘http://172.22.154.173:5008’; use --allow-websocket-origin=172.22.154.173:5008 to permit this; currently we allow origins {‘5:80’, ‘2:80’, ‘3:80’, ‘1:80’, ‘.:80’, ‘7:80’, ‘4:80’}
WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=f4n9rr1XdoiYCHxlZ6mBJfsOCyYdNi6Xv6q753THL3hq (172.22.154.173) 0.00ms

What is going on?

···

On Saturday, September 23, 2017 at 3:38:24 PM UTC-7, Rohan Kadakia wrote:

How would I adjust the url kwarg to the autoreload_server function?

Thanks.

On Wednesday, August 23, 2017 at 1:42:01 PM UTC-4, Michael Covello wrote:

Thank you Michael! You’re answer was spot on. Use the IP of the host in the autoload function (server_document in 0.12.7dev)

Thank you for posting it! Helped me greatly :slight_smile:

On Sunday, February 5, 2017 at 10:58:24 AM UTC-8, Michael Gilbert wrote:

I ran into this same issue and found that I needed to adjust the url kwarg to the autoreload_server function. You have it set to pull from your localhost, which when you are connecting from a remote computer, won’t render the plot. Change the url to use the ip address of your hosting computer and the javascript autoreload should work from a remote computer. Hope this helps!

On Monday, January 30, 2017 at 9:37:10 AM UTC-7, Luyu Wang wrote:

In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

Bokeh Server Configuration

bokeh_host = “0.0.0.0:5006

flask_host = “0.0.0.0:5000

bokeh_app = Application(FunctionHandler(modify_doc))

io_loop = IOLoop.current()

bokeh_server = Server({‘/bkapp’: bokeh_app}, io_loop=io_loop, host=[bokeh_host, ‘*’], address=“0.0.0.0”, port=5006,\

allow_websocket_origin=[flask_host])

bokeh_server.start()

@flask_app.route(‘/bkapp’, methods=[‘GET’])

def bkapp_page():

print(‘Opening Bokeh application on http://’+bokeh_host+‘/’)

script = autoload_server(model=None, app_path=‘/bkapp’, url=‘http://’+bokeh_host)

return render_template(“embed.html”, script=script)

Bryan you mentioned “This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed.” I guess our cases are when “those things are true”. Any suggestions on the “additional configurations”? I tried me best (as above) but still couldn’t solve it.

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, [email protected] wrote:

I realized I should also get the js console error:

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="[http://127.0.0.1:5006](http://127.0.0.1:5006)", app_path="/missing_players", session_id=[session.id](http://session.id))
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%40continuum.io.

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

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, [email protected] wrote:

Hi,

The output

  we allow origins {'5:80', '2:80', '3:80', '1:80', '.:80', '7:80', '4:80'}

Is indicative of a fairly serious usage error. My best guess is that you are passing a single string as the value of allow_websocket_origin. As you can see in the reference documentation, it should be a list of strings (i.e. the list of allowed origins):

  bokeh.server.server — Bokeh 3.3.2 Documentation

We should probably add a type check to warn/error if a users passes the wrong kind of value. Please make an issue on GH for this.

Thanks,

Bryan

···

On Sep 29, 2017, at 20:55, [email protected] wrote:

Yeah honestly, I saw that comment but I'm having issues with the same thing (passing in autoreload_server function as the url kwarg). Now, here's another point:

When I tried setting the host option to '(MY_IP)' I got this message when trying to access http://(MY_IP):5008

ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'http://(MY_IP):5008'; use --allow-websocket-origin=(MY_IP):5008 to permit this; currently we allow origins {'localhost:5008'}
WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=AJHAYyrTUG5qE6IAtjlHjs9FvwGCOkHJYkLSEzDHinR0 (MY_IP) 0.00ms

So then I tried setting the allow_websocket_origin parameter into the Server constructor. (I guess now I have to use underscores instead of hyphens)
My constructor now looks like this:

server = Server(app_map, io_loop=io_loop, host='MY_IP:5008',
                port=5008, allow_websocket_origin='MY_IP')

And then I get this error:
ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'http://172.22.154.173:5008'; use --allow-websocket-origin=172.22.154.173:5008 to permit this; currently we allow origins {'5:80', '2:80', '3:80', '1:80', '.:80', '7:80', '4:80'}
WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=f4n9rr1XdoiYCHxlZ6mBJfsOCyYdNi6Xv6q753THL3hq (172.22.154.173) 0.00ms

What is going on?

On Saturday, September 23, 2017 at 3:38:24 PM UTC-7, Rohan Kadakia wrote:
How would I adjust the url kwarg to the autoreload_server function?

Thanks.

On Wednesday, August 23, 2017 at 1:42:01 PM UTC-4, Michael Covello wrote:
Thank you Michael! You're answer was spot on. Use the IP of the host in the autoload function (server_document in 0.12.7dev)

Thank you for posting it! Helped me greatly :slight_smile:

On Sunday, February 5, 2017 at 10:58:24 AM UTC-8, Michael Gilbert wrote:
I ran into this same issue and found that I needed to adjust the url kwarg to the autoreload_server function. You have it set to pull from your localhost, which when you are connecting from a remote computer, won't render the plot. Change the url to use the ip address of your hosting computer and the javascript autoreload should work from a remote computer. Hope this helps!

On Monday, January 30, 2017 at 9:37:10 AM UTC-7, Luyu Wang wrote:
In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

# Bokeh Server Configuration
bokeh_host = "0.0.0.0:5006"
flask_host = "0.0.0.0:5000"

bokeh_app = Application(FunctionHandler(modify_doc))
io_loop = IOLoop.current()
bokeh_server = Server({'/bkapp': bokeh_app}, io_loop=io_loop, host=[bokeh_host, '*'], address="0.0.0.0", port=5006,\
                allow_websocket_origin=[flask_host])
bokeh_server.start()

@flask_app.route('/bkapp', methods=['GET'])
def bkapp_page():
    print('Opening Bokeh application on http://‘+bokeh_host+’/')
    script = autoload_server(model=None, app_path='/bkapp', url='http://'+bokeh_host)
    return render_template("embed.html", script=script)

Bryan you mentioned "This is assuming you aren't also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed." I guess our cases are when "those things are true". Any suggestions on the "additional configurations"? I tried me best (as above) but still couldn't solve it.

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, chris.c...@gmail.com wrote:
I realized I should also get the js console error:

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, chris.c...@gmail.com wrote:
I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host='*'

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="http://127.0.0.1:5006", app_path="/missing_players", session_id=session.id)
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine
When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened
2017-01-29 21:02:15,580 ServerConnection created
2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened
2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn't seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:
Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you'll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren't also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It's hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

> On Jan 26, 2017, at 4:04 PM, Eugene Cheung <[email protected]> wrote:
>
> Basically I am trying to do this:
> Standalone Bokeh Server¶
>
> First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.
>
>
>
> from
>
>
>
> Bokeh server — Bokeh 3.3.2 Documentation
>
>
>
> is there any examples of the Imeddiate option?
>
>
>
>
>
>
> --
> 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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%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/a1630180-991c-49a8-a53a-a57a9c35ee91%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Also please note that autoload_server has been deprecated, and will be removed in a release or two. It was far too fiddly and complicated, so it was split into two much simpler functions, server_document and server_session. (You probably want server_document.)

Thanks,

Bryan

···

On Sep 30, 2017, at 09:13, Bryan Van de ven <[email protected]> wrote:

Hi,

The output

  we allow origins {'5:80', '2:80', '3:80', '1:80', '.:80', '7:80', '4:80'}

Is indicative of a fairly serious usage error. My best guess is that you are passing a single string as the value of allow_websocket_origin. As you can see in the reference documentation, it should be a list of strings (i.e. the list of allowed origins):

  bokeh.server.server — Bokeh 3.3.2 Documentation

We should probably add a type check to warn/error if a users passes the wrong kind of value. Please make an issue on GH for this.

Thanks,

Bryan

On Sep 29, 2017, at 20:55, [email protected] wrote:

Yeah honestly, I saw that comment but I'm having issues with the same thing (passing in autoreload_server function as the url kwarg). Now, here's another point:

When I tried setting the host option to '(MY_IP)' I got this message when trying to access http://(MY_IP):5008

ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'http://(MY_IP):5008'; use --allow-websocket-origin=(MY_IP):5008 to permit this; currently we allow origins {'localhost:5008'}
WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=AJHAYyrTUG5qE6IAtjlHjs9FvwGCOkHJYkLSEzDHinR0 (MY_IP) 0.00ms

So then I tried setting the allow_websocket_origin parameter into the Server constructor. (I guess now I have to use underscores instead of hyphens)
My constructor now looks like this:

server = Server(app_map, io_loop=io_loop, host='MY_IP:5008',
               port=5008, allow_websocket_origin='MY_IP')

And then I get this error:
ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'http://172.22.154.173:5008'; use --allow-websocket-origin=172.22.154.173:5008 to permit this; currently we allow origins {'5:80', '2:80', '3:80', '1:80', '.:80', '7:80', '4:80'}
WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=f4n9rr1XdoiYCHxlZ6mBJfsOCyYdNi6Xv6q753THL3hq (172.22.154.173) 0.00ms

What is going on?

On Saturday, September 23, 2017 at 3:38:24 PM UTC-7, Rohan Kadakia wrote:
How would I adjust the url kwarg to the autoreload_server function?

Thanks.

On Wednesday, August 23, 2017 at 1:42:01 PM UTC-4, Michael Covello wrote:
Thank you Michael! You're answer was spot on. Use the IP of the host in the autoload function (server_document in 0.12.7dev)

Thank you for posting it! Helped me greatly :slight_smile:

On Sunday, February 5, 2017 at 10:58:24 AM UTC-8, Michael Gilbert wrote:
I ran into this same issue and found that I needed to adjust the url kwarg to the autoreload_server function. You have it set to pull from your localhost, which when you are connecting from a remote computer, won't render the plot. Change the url to use the ip address of your hosting computer and the javascript autoreload should work from a remote computer. Hope this helps!

On Monday, January 30, 2017 at 9:37:10 AM UTC-7, Luyu Wang wrote:
In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

# Bokeh Server Configuration
bokeh_host = "0.0.0.0:5006"
flask_host = "0.0.0.0:5000"

bokeh_app = Application(FunctionHandler(modify_doc))
io_loop = IOLoop.current()
bokeh_server = Server({'/bkapp': bokeh_app}, io_loop=io_loop, host=[bokeh_host, '*'], address="0.0.0.0", port=5006,\
               allow_websocket_origin=[flask_host])
bokeh_server.start()

@flask_app.route('/bkapp', methods=['GET'])
def bkapp_page():
   print('Opening Bokeh application on http://‘+bokeh_host+’/')
   script = autoload_server(model=None, app_path='/bkapp', url='http://'+bokeh_host)
   return render_template("embed.html", script=script)

Bryan you mentioned "This is assuming you aren't also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed." I guess our cases are when "those things are true". Any suggestions on the "additional configurations"? I tried me best (as above) but still couldn't solve it.

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, chris.c...@gmail.com wrote:
I realized I should also get the js console error:

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, chris.c...@gmail.com wrote:
I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host='*'

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url="http://127.0.0.1:5006", app_path="/missing_players", session_id=session.id)
return render_template('bokeh_stuff.html', bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine
When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened
2017-01-29 21:02:15,580 ServerConnection created
2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened
2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn't seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:
Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you'll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren't also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It's hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung <[email protected]> wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

Bokeh server — Bokeh 3.3.2 Documentation

is there any examples of the Imeddiate option?

--
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 bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%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/a1630180-991c-49a8-a53a-a57a9c35ee91%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Ok hey everyone. I think I figured this out. I’m not sure if you guys have tried this and got this working, but please give me feedback if this worked for you or if you need advice. I have not found any help with this issue and from just reading error messages and playing around with stuff I think I got something working.

Just to iterate on the points above, yes I think you have to add certain IPs to the whitelist. Ideally you would want to add an entire subnet to the whitelist so a group of people you want can access your bokeh server and see your plots. I am not sure how you would add an entire subnet. But this is what I did to get it working with at least a few IPs added to the whitelist.

server = Server(app_map, io_loop=io_loop, address='MY_IP',
                port=5008, allow_websocket_origin=['MY_IP:5008', 'localhost:5008'])

Now if you look at the documentation (I am using bokeh 0.12.9), you’ll see that the “address” field specifies the address and the “port” the port. I was using “host” before and I’m not sure if that was correct. The important part is “allow_websocket_origin” This must be a list as Bryan said and it specifies the IP’s on the whitelist. You have to put the IPs you want followed by the port you are hosting on. Here I am hosting on MY_IP:5008 and I am allowing connections from localhost:5008 and MY_IP:5008. Which means localhost and MY_IP can access the bokeh server at MY_IP:5008. You can add even more IP’s to this list, try it with a friend.

Now I know some of you are using “bokeh serve” and hosting your applications on a barebones bokeh server that is readymade for you. Here I make my own server in my main.py and I need to use a specific io_loop. But as long as you specific the options in the bokeh serve command you can do the same. In that case, “allow_websocket_origin” will become “allow-websocket-origin”. I think the command may look like this:

bokeh -serve myapp.py --show --address MY_IP --port 5008 --allow-websocket-origin MY_IP:5008 localhost:5008.

Bryan did you know about this and does this sound correct to you?

Not sure if you all knew this but hope this helps,

Abhi

···

On Saturday, September 30, 2017 at 7:15:47 AM UTC-7, Bryan Van de ven wrote:

Also please note that autoload_server has been deprecated, and will be removed in a release or two. It was far too fiddly and complicated, so it was split into two much simpler functions, server_document and server_session. (You probably want server_document.)

Thanks,

Bryan

On Sep 30, 2017, at 09:13, Bryan Van de ven [email protected] wrote:

Hi,

The output

    we allow origins {'5:80', '2:80', '3:80', '1:80', '.:80', '7:80', '4:80'}

Is indicative of a fairly serious usage error. My best guess is that you are passing a single string as the value of allow_websocket_origin. As you can see in the reference documentation, it should be a list of strings (i.e. the list of allowed origins):

    [https://bokeh.pydata.org/en/latest/docs/reference/server/server.html#bokeh.server.server.Server.__init__](https://bokeh.pydata.org/en/latest/docs/reference/server/server.html#bokeh.server.server.Server.__init__)

We should probably add a type check to warn/error if a users passes the wrong kind of value. Please make an issue on GH for this.

Thanks,

Bryan

On Sep 29, 2017, at 20:55, as2…@cornell.edu wrote:

Yeah honestly, I saw that comment but I’m having issues with the same thing (passing in autoreload_server function as the url kwarg). Now, here’s another point:

When I tried setting the host option to ‘(MY_IP)’ I got this message when trying to access http://(MY_IP):5008

ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin ‘http://(MY_IP):5008’; use --allow-websocket-origin=(MY_IP):5008 to permit this; currently we allow origins {‘localhost:5008’}

WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=AJHAYyrTUG5qE6IAtjlHjs9FvwGCOkHJYkLSEzDHinR0 (MY_IP) 0.00ms

So then I tried setting the allow_websocket_origin parameter into the Server constructor. (I guess now I have to use underscores instead of hyphens)

My constructor now looks like this:

server = Server(app_map, io_loop=io_loop, host=‘MY_IP:5008’,

           port=5008, allow_websocket_origin='MY_IP')

And then I get this error:

ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin ‘http://172.22.154.173:5008’; use --allow-websocket-origin=172.22.154.173:5008 to permit this; currently we allow origins {‘5:80’, ‘2:80’, ‘3:80’, ‘1:80’, ‘.:80’, ‘7:80’, ‘4:80’}

WARNING:tornado.access:403 GET /time/ws?bokeh-protocol-version=1.0&bokeh-session-id=f4n9rr1XdoiYCHxlZ6mBJfsOCyYdNi6Xv6q753THL3hq (172.22.154.173) 0.00ms

What is going on?

On Saturday, September 23, 2017 at 3:38:24 PM UTC-7, Rohan Kadakia wrote:

How would I adjust the url kwarg to the autoreload_server function?

Thanks.

On Wednesday, August 23, 2017 at 1:42:01 PM UTC-4, Michael Covello wrote:

Thank you Michael! You’re answer was spot on. Use the IP of the host in the autoload function (server_document in 0.12.7dev)

Thank you for posting it! Helped me greatly :slight_smile:

On Sunday, February 5, 2017 at 10:58:24 AM UTC-8, Michael Gilbert wrote:

I ran into this same issue and found that I needed to adjust the url kwarg to the autoreload_server function. You have it set to pull from your localhost, which when you are connecting from a remote computer, won’t render the plot. Change the url to use the ip address of your hosting computer and the javascript autoreload should work from a remote computer. Hope this helps!

On Monday, January 30, 2017 at 9:37:10 AM UTC-7, Luyu Wang wrote:

In fact I came across a very similar case. I also embed the Bokeh server with Flask with autoload_server. From another computer in the same local network, when I hit the url (server_ip:5006\bkapp) for the Bokeh server directly it loads successfully; however, when I connect to the Flask server (server_ip:5000\bkapp) which embeds the Bokeh script generated by the autoload_server, it shows the same problem described by Chris - the embeded Bokeh plots are not displayed at all.

The server configuration is as below:

Bokeh Server Configuration

bokeh_host = “0.0.0.0:5006

flask_host = “0.0.0.0:5000

bokeh_app = Application(FunctionHandler(modify_doc))

io_loop = IOLoop.current()

bokeh_server = Server({‘/bkapp’: bokeh_app}, io_loop=io_loop, host=[bokeh_host, ‘*’], address=“0.0.0.0”, port=5006,\

           allow_websocket_origin=[flask_host])

bokeh_server.start()

@flask_app.route(‘/bkapp’, methods=[‘GET’])

def bkapp_page():

print(‘Opening Bokeh application on http://’+bokeh_host+‘/’)

script = autoload_server(model=None, app_path=‘/bkapp’, url=‘http://’+bokeh_host)

return render_template(“embed.html”, script=script)

Bryan you mentioned “This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed.” I guess our cases are when “those things are true”. Any suggestions on the “additional configurations”? I tried me best (as above) but still couldn’t solve it.

On Sunday, January 29, 2017 at 9:26:04 PM UTC-5, [email protected] wrote:

I realized I should also get the js console error:

GET (IP_ADDRESS_HERE)/missing_players/autoload.js?bokeh-autoload-element=15…87cf60759ebd&bokeh-session-id=y6r4dUs3n2ecrMrFBCCtQdbmpEa20C8YhKDXxRffSju7 net::ERR_CONNECTION_REFUSED

On Sunday, January 29, 2017 at 9:17:40 PM UTC-5, [email protected] wrote:

I am actually running into a very similar problem with the bokeh server.

I am running a bokeh server locally with the following command:

bokeh serve bokeh_serving.py --host=‘*’

When I connect to the bokeh server through my flask app (using the following command to load it:

script = autoload_server(model=None,url=“http://127.0.0.1:5006”, app_path=“/missing_players”, session_id=session.id)

return render_template(‘bokeh_stuff.html’, bokeh_script=script)

Now, when I navigate to the page http://localhost:5006/bokeh_stuff.html it loads fine

When I connect via 127.0.0.1:5006/bokeh_stuff it loads fine.

I also get the following from the server:

WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

2017-01-29 21:02:16,550 200 GET /bokeh_stuff/autoload.js?bokeh-autoload-element=528ccdbc-4b36-4991-b22d-a8e48470dc39&bokeh-session-id=FSZB7DjS3ciUKsrWHwdp75bF6pS4U6emRbd7iEdYyGdh (127.0.0.1) 3.28ms

I forwarded port 5006 to my router, and then tried to connect to the server using my IP address and got the following from the server:

2017-01-29 21:02:14,833 WebSocket connection opened

2017-01-29 21:02:15,580 ServerConnection created

Followed by nothing. It doesn’t seem to run the 200 GET line like when I do so from the localhost. Any suggestions?

On Thursday, January 26, 2017 at 5:26:37 PM UTC-5, Bryan Van de ven wrote:

Hi,

By default Bokeh server has fairly conservative network configuration settings. It only allows connections that report localhost as the HOST in the HTTP request, unless you tell it otherwise. If you want people to be able to connect from outside machines, you’ll need to configure a --host option with the IP and/or hostname that users will use to connect to your machine that is running the bokeh server. This is assuming you aren’t also running behind some kind of proxy, and that people are hitting the server URL directly (e.g. you are not embedding with autoload_server). If those things are true then there may be additional configurations needed. It’s hard to provide specific guidance without knowing a bit about your network topology, as well as the exact text of any error messages you see (both in the server console or the js console).

Thanks,

Bryan

On Jan 26, 2017, at 4:04 PM, Eugene Cheung [email protected] wrote:

Basically I am trying to do this:
Standalone Bokeh Server¶

First, it is possible to simply run the Bokeh server on a network for users to interact with directly. Depending on the computational burden of your application code, the number of users, the power of the machine used to run on, etc., this could be a simple and immediate option for deployment an internal network.

from

http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#deployment-scenarios

is there any examples of the Imeddiate option?


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/90e6cd33-bf5d-4054-98fa-dbe221af8a8d%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/a1630180-991c-49a8-a53a-a57a9c35ee91%40continuum.io.

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

I am running bokeh on a Raspberry Pi and can login to the website from my phone, computer, whatever…

I use:
bokeh serve --allow-websocket-origin=‘ip address’:‘port number’ my_app.py --port ‘port number’

example:
bokeh serve --allow-websocket-origin=192.111.09.787:6004 my_app.py --port 6004

then in my web browser I head to: http://192.111.09.787:6004/my_app

I hope this helps, and if for some reason this is a bad way to do this I’d appreciate the feedback! I just know it works, but I forget how I figured this out…

···

On Thursday, January 26, 2017 at 1:44:25 PM UTC-7, Eugene Cheung wrote:

Hi,

If i am running bokeh server on my computer thats doing live plotting, how would allow people on my local network to view it through their own computer through a web browser? is there any example of this?

You have to run some kind of server app (i made it work with nginx https://bokeh.pydata.org/en/latest/docs/user_guide/server.html), and also for router you have to open some ports. I think collin example only for local network.

···

On Tue, Oct 3, 2017 at 6:22 PM, collin [email protected] wrote:

Hi,

If i am running bokeh server on my computer thats doing live plotting, how would allow people on my local network to view it through their own computer through a web browser? is there any example of this?

I am running bokeh on a Raspberry Pi and can login to the website from my phone, computer, whatever…

I use:
bokeh serve --allow-websocket-origin=‘ip address’:‘port number’ my_app.py --port ‘port number’

example:
bokeh serve --allow-websocket-origin=192.111.09.787:6004 my_app.py --port 6004

then in my web browser I head to: http://192.111.09.787:6004/my_app

I hope this helps, and if for some reason this is a bad way to do this I’d appreciate the feedback! I just know it works, but I forget how I figured this out…

On Thursday, January 26, 2017 at 1:44:25 PM UTC-7, Eugene Cheung wrote:

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/1ffbcc93-85be-4816-8f91-13918b2571e3%40continuum.io.

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