Bokeh Embedded Flask App Can't be Accessed Remotely

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,

Luyu

Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

···

On Jan 25, 2017, at 10:30 AM, Luyu Wang <[email protected]> wrote:

Hi,

I'm running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I'm trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,
Luyu

--
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/01b72f94-5300-4409-9b5b-d93501824fb7%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi,

When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:

WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms

The JS console on the browser shows:

GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED

Thanks,

Luyu

···

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:

Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

On Jan 25, 2017, at 10:30 AM, Luyu Wang [email protected] wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,

Luyu


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/01b72f94-5300-4409-9b5b-d93501824fb7%40continuum.io.

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

Hi Bryan, any ideas?

-Luyu

···

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:

Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

On Jan 25, 2017, at 10:30 AM, Luyu Wang [email protected] wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,

Luyu


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/01b72f94-5300-4409-9b5b-d93501824fb7%40continuum.io.

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

Luyu,

I'm afraid can't offer any more specific advice or guidance without more information. I suggested some things you could share that would be useful in my previous reply.

Thanks,

···

On Jan 26, 2017, at 9:13 AM, Luyu Wang <[email protected]> wrote:

Hi Bryan, any ideas?

-Luyu

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:
Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

> On Jan 25, 2017, at 10:30 AM, Luyu Wang <[email protected]> wrote:
>
> Hi,
>
> I'm running a Bokeh embedded Flask app similar to the example given on the User Guide:
>
> https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py
>
> I'm trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?
>
> Thanks,
> Luyu
>
> --
> 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/01b72f94-5300-4409-9b5b-d93501824fb7%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/8d1c3440-74b3-4fc5-8114-66203eb52949%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi,

I ran into this same issue and was able to resolve it using the host kwarg on the Server in line 37 of flask_embed.py. Here you can allow connections by remote computers. I tested on a secure intranet using host=‘*’ and it worked, but I would be careful using that on an exposed computer (warning present in the source code). You can find examples of how it works in the source code of bokeh.server. Hope this helps!

···

On Wednesday, January 25, 2017 at 9:30:19 AM UTC-7, Luyu Wang wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,

Luyu

Hi Michael,

I met the same problem.

What you suggest to do is like this ? I am not quite sure if I got it.

‘’’

server = Server({‘/bkapp’: modify_doc}, allow_websocket_origin = [‘localhost:8000’], port = 9090, host = “*”)

‘’’

Best,

Ying

···

On Friday, February 3, 2017 at 6:26:39 PM UTC-5, Michael Gilbert wrote:

Hi,

I ran into this same issue and was able to resolve it using the host kwarg on the Server in line 37 of flask_embed.py. Here you can allow connections by remote computers. I tested on a secure intranet using host=‘*’ and it worked, but I would be careful using that on an exposed computer (warning present in the source code). You can find examples of how it works in the source code of bokeh.server. Hope this helps!

On Wednesday, January 25, 2017 at 9:30:19 AM UTC-7, Luyu Wang wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,

Luyu

Hi Luyu,

I met the same issue as you described. Could you please let me know if you have figured it out?

Best,

Ying

···

On Wednesday, January 25, 2017 at 11:50:28 AM UTC-5, Luyu Wang wrote:

Hi,

When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:

WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms

The JS console on the browser shows:

GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED

Thanks,

Luyu

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:

Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

On Jan 25, 2017, at 10:30 AM, Luyu Wang [email protected] wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,

Luyu


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/01b72f94-5300-4409-9b5b-d93501824fb7%40continuum.io.

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

I have this exact issue - any resolution?

···

On Thursday, February 8, 2018 at 5:40:03 PM UTC-5, [email protected] wrote:

Hi Luyu,

I met the same issue as you described. Could you please let me know if you have figured it out?

Best,

Ying

On Wednesday, January 25, 2017 at 11:50:28 AM UTC-5, Luyu Wang wrote:

Hi,

When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:

WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms

The JS console on the browser shows:

GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED

Thanks,

Luyu

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:

Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

On Jan 25, 2017, at 10:30 AM, Luyu Wang [email protected] wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,

Luyu


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/01b72f94-5300-4409-9b5b-d93501824fb7%40continuum.io.

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

Hi,

If you are getting a 403 that means the Bokeh server has decided to refuse the connection. If you are embedding a Bokeh app in a page at a different host URL, you need to tell the Bokeh server to allow connections initiated from that host. Browsers do not afford the same automatic cross-site protections for websocket connections, so in order to not be terribly insecure, Bokeh is very conservative in this regard, and requires an explicit whitelist. To allow web socket connections from other hosts, use

  --allow-websocket-origin HOST[:PORT]

from the command line, or "allow_websocket_origin" if you are running the server programmatically.

Thanks,

Bryan

···

On Jan 1, 2019, at 20:53, [email protected] wrote:

I have this exact issue - any resolution?

On Thursday, February 8, 2018 at 5:40:03 PM UTC-5, wangy...@gmail.com wrote:
Hi Luyu,

I met the same issue as you described. Could you please let me know if you have figured it out?

Best,
Ying

On Wednesday, January 25, 2017 at 11:50:28 AM UTC-5, Luyu Wang wrote:
Hi,

When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:

WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms

The JS console on the browser shows:

GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED

Thanks,

Luyu

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:
Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

> On Jan 25, 2017, at 10:30 AM, Luyu Wang <[email protected]> wrote:
>
> Hi,
>
> I'm running a Bokeh embedded Flask app similar to the example given on the User Guide:
>
> https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py
>
> I'm trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?
>
> Thanks,
> Luyu
>
> --
> 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/01b72f94-5300-4409-9b5b-d93501824fb7%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/6b6a010c-1e35-497b-9479-d24bad4fe794%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

I can also confirm that I am also running in to the same issues. My flask app that embeds a Bokeh server app runs fine on localhost:5000. I have tried the bokehserver command with:

bokeh serve myapp --port 5100 --allow-websocket-origin=‘*’

``

and

bokeh serve myapp --port 5100 --allow-websocket-origin=‘*:5000’

``

From outside I can reach the flask app on x.x.x.x:5000 just fine, but it does not display the bokeh app embedded inside it. The bokeh server console does not show any attempts to connect to it as it does on localhost.

···

On Tuesday, January 1, 2019 at 11:12:23 PM UTC-7, Bryan Van de ven wrote:

Hi,

If you are getting a 403 that means the Bokeh server has decided to refuse the connection. If you are embedding a Bokeh app in a page at a different host URL, you need to tell the Bokeh server to allow connections initiated from that host. Browsers do not afford the same automatic cross-site protections for websocket connections, so in order to not be terribly insecure, Bokeh is very conservative in this regard, and requires an explicit whitelist. To allow web socket connections from other hosts, use

    --allow-websocket-origin HOST[:PORT]

from the command line, or “allow_websocket_origin” if you are running the server programmatically.

Thanks,

Bryan

On Jan 1, 2019, at 20:53, [email protected] wrote:

I have this exact issue - any resolution?

On Thursday, February 8, 2018 at 5:40:03 PM UTC-5, [email protected] wrote:

Hi Luyu,

I met the same issue as you described. Could you please let me know if you have figured it out?

Best,

Ying

On Wednesday, January 25, 2017 at 11:50:28 AM UTC-5, Luyu Wang wrote:

Hi,

When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:

WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms

The JS console on the browser shows:

GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED

Thanks,

Luyu

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:

Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

On Jan 25, 2017, at 10:30 AM, Luyu Wang [email protected] wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,
Luyu


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/01b72f94-5300-4409-9b5b-d93501824fb7%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/6b6a010c-1e35-497b-9479-d24bad4fe794%40continuum.io.

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

Hi,

You are not running into the same issue. The other poster states they are getting 403's, which would also show up in the Bokeh server logs. However you have stated that the bokeh server does not show any attempts to connect at all. That means that the HTTP request is never even making it to the Bokeh server, and your problem is somewhere upstream, e.g. perhaps with a proxy or firewall setting.

Thanks,

Bryan

···

On Jan 5, 2019, at 21:33, [email protected] wrote:

I can also confirm that I am also running in to the same issues. My flask app that embeds a Bokeh server app runs fine on localhost:5000. I have tried the bokehserver command with:

bokeh serve myapp --port 5100 --allow-websocket-origin='*'

and

bokeh serve myapp --port 5100 --allow-websocket-origin='*:5000'

From outside I can reach the flask app on x.x.x.x:5000 just fine, but it does not display the bokeh app embedded inside it. The bokeh server console does not show any attempts to connect to it as it does on localhost.

On Tuesday, January 1, 2019 at 11:12:23 PM UTC-7, Bryan Van de ven wrote:
Hi,

If you are getting a 403 that means the Bokeh server has decided to refuse the connection. If you are embedding a Bokeh app in a page at a different host URL, you need to tell the Bokeh server to allow connections initiated from that host. Browsers do not afford the same automatic cross-site protections for websocket connections, so in order to not be terribly insecure, Bokeh is very conservative in this regard, and requires an explicit whitelist. To allow web socket connections from other hosts, use

        --allow-websocket-origin HOST[:PORT]

from the command line, or "allow_websocket_origin" if you are running the server programmatically.

Thanks,

Bryan

> On Jan 1, 2019, at 20:53, ericv...@gmail.com wrote:
>
> I have this exact issue - any resolution?
>
> On Thursday, February 8, 2018 at 5:40:03 PM UTC-5, wangy...@gmail.com wrote:
> Hi Luyu,
>
> I met the same issue as you described. Could you please let me know if you have figured it out?
>
> Best,
> Ying
>
>
> On Wednesday, January 25, 2017 at 11:50:28 AM UTC-5, Luyu Wang wrote:
> Hi,
>
>
>
> When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:
>
> WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms
>
> The JS console on the browser shows:
>
> GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED
>
>
>
> Thanks,
>
> Luyu
>
>
>
> On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:
> Hi,
>
> Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.
>
> Thanks,
>
> Bryan
>
> > On Jan 25, 2017, at 10:30 AM, Luyu Wang <[email protected]> wrote:
> >
> > Hi,
> >
> > I'm running a Bokeh embedded Flask app similar to the example given on the User Guide:
> >
> > https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py
> >
> > I'm trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?
> >
> > Thanks,
> > Luyu
> >
> > --
> > 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/01b72f94-5300-4409-9b5b-d93501824fb7%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 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/6b6a010c-1e35-497b-9479-d24bad4fe794%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/38b3febb-b500-4c77-a4ca-b6ad07e90f44%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Bryan, You may be correct. My issue may be slightly different. I should have started a new thread, but this one seemed like a good fit.

Just FYI, for diagnostics, I have turned off the proxy server Nginx. There is no firewall, no proxy and port 5000 is open to the outside world. I will keep checking for issues aside from Flask and Bokeh. But I am perplexed why the bokeh server app embedded in Flask responds to calls within localhost, but no attempts to connect at all when the flask app is called from outside. I will keep digging and report back. Any hints to troubleshoot would be greatly appreciated.

···

On Monday, January 7, 2019 at 12:23:49 AM UTC-7, Bryan Van de ven wrote:

Hi,

You are not running into the same issue. The other poster states they are getting 403’s, which would also show up in the Bokeh server logs. However you have stated that the bokeh server does not show any attempts to connect at all. That means that the HTTP request is never even making it to the Bokeh server, and your problem is somewhere upstream, e.g. perhaps with a proxy or firewall setting.

Thanks,

Bryan

On Jan 5, 2019, at 21:33, [email protected] wrote:

I can also confirm that I am also running in to the same issues. My flask app that embeds a Bokeh server app runs fine on localhost:5000. I have tried the bokehserver command with:

bokeh serve myapp --port 5100 --allow-websocket-origin=‘*’

and

bokeh serve myapp --port 5100 --allow-websocket-origin=‘*:5000’

From outside I can reach the flask app on x.x.x.x:5000 just fine, but it does not display the bokeh app embedded inside it. The bokeh server console does not show any attempts to connect to it as it does on localhost.

On Tuesday, January 1, 2019 at 11:12:23 PM UTC-7, Bryan Van de ven wrote:

Hi,

If you are getting a 403 that means the Bokeh server has decided to refuse the connection. If you are embedding a Bokeh app in a page at a different host URL, you need to tell the Bokeh server to allow connections initiated from that host. Browsers do not afford the same automatic cross-site protections for websocket connections, so in order to not be terribly insecure, Bokeh is very conservative in this regard, and requires an explicit whitelist. To allow web socket connections from other hosts, use

    --allow-websocket-origin HOST[:PORT]

from the command line, or “allow_websocket_origin” if you are running the server programmatically.

Thanks,

Bryan

On Jan 1, 2019, at 20:53, [email protected] wrote:

I have this exact issue - any resolution?

On Thursday, February 8, 2018 at 5:40:03 PM UTC-5, [email protected] wrote:
Hi Luyu,

I met the same issue as you described. Could you please let me know if you have figured it out?

Best,
Ying

On Wednesday, January 25, 2017 at 11:50:28 AM UTC-5, Luyu Wang wrote:
Hi,

When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:

WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms

The JS console on the browser shows:

GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED

Thanks,

Luyu

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:
Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

On Jan 25, 2017, at 10:30 AM, Luyu Wang [email protected] wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,
Luyu


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/01b72f94-5300-4409-9b5b-d93501824fb7%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/6b6a010c-1e35-497b-9479-d24bad4fe794%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/38b3febb-b500-4c77-a4ca-b6ad07e90f44%40continuum.io.

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

Just want to update, I solve the problem by just updating bokeh!

···

On Mon, Jan 7, 2019 at 10:25 AM [email protected] wrote:

Bryan, You may be correct. My issue may be slightly different. I should have started a new thread, but this one seemed like a good fit.

Just FYI, for diagnostics, I have turned off the proxy server Nginx. There is no firewall, no proxy and port 5000 is open to the outside world. I will keep checking for issues aside from Flask and Bokeh. But I am perplexed why the bokeh server app embedded in Flask responds to calls within localhost, but no attempts to connect at all when the flask app is called from outside. I will keep digging and report back. Any hints to troubleshoot would be greatly appreciated.

On Monday, January 7, 2019 at 12:23:49 AM UTC-7, Bryan Van de ven wrote:

Hi,

You are not running into the same issue. The other poster states they are getting 403’s, which would also show up in the Bokeh server logs. However you have stated that the bokeh server does not show any attempts to connect at all. That means that the HTTP request is never even making it to the Bokeh server, and your problem is somewhere upstream, e.g. perhaps with a proxy or firewall setting.

Thanks,

Bryan

On Jan 5, 2019, at 21:33, [email protected] wrote:

I can also confirm that I am also running in to the same issues. My flask app that embeds a Bokeh server app runs fine on localhost:5000. I have tried the bokehserver command with:

bokeh serve myapp --port 5100 --allow-websocket-origin=‘*’

and

bokeh serve myapp --port 5100 --allow-websocket-origin=‘*:5000’

From outside I can reach the flask app on x.x.x.x:5000 just fine, but it does not display the bokeh app embedded inside it. The bokeh server console does not show any attempts to connect to it as it does on localhost.

On Tuesday, January 1, 2019 at 11:12:23 PM UTC-7, Bryan Van de ven wrote:

Hi,

If you are getting a 403 that means the Bokeh server has decided to refuse the connection. If you are embedding a Bokeh app in a page at a different host URL, you need to tell the Bokeh server to allow connections initiated from that host. Browsers do not afford the same automatic cross-site protections for websocket connections, so in order to not be terribly insecure, Bokeh is very conservative in this regard, and requires an explicit whitelist. To allow web socket connections from other hosts, use

    --allow-websocket-origin HOST[:PORT]

from the command line, or “allow_websocket_origin” if you are running the server programmatically.

Thanks,

Bryan

On Jan 1, 2019, at 20:53, [email protected] wrote:

I have this exact issue - any resolution?

On Thursday, February 8, 2018 at 5:40:03 PM UTC-5, [email protected] wrote:
Hi Luyu,

I met the same issue as you described. Could you please let me know if you have figured it out?

Best,
Ying

On Wednesday, January 25, 2017 at 11:50:28 AM UTC-5, Luyu Wang wrote:
Hi,

When I try to access to the remote Flask app @ <192.168.0.195:8080/>, the console output from the server is:

WARNING:tornado.access:403 GET /bkapp (192.168.0.176) 1.22ms

The JS console on the browser shows:

GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=0f5f4b18-a523-4e31-854a-8f463c89e727 net::ERR_CONNECTION_REFUSED

Thanks,

Luyu

On Wednesday, January 25, 2017 at 11:37:12 AM UTC-5, Bryan Van de ven wrote:
Hi,

Well, clients (browsers) must be able to connect to the Bokeh server (whether embedded or running as a separate process) on some port (whatever port you configure it with). There is no getting around that. From your description, I am not sure whether you are saying the initial connection is not even attempted (e.g. because of firewall or other network rules specific to your network) or whether you mean the connection is attempted, but the bokeh server itself has rejected it (in which case you might just need to configure something differently). If you can provide any console output from the server, as well as any error message from a browser javascript console when a a failed connection happens, it might be possible to help more.

Thanks,

Bryan

On Jan 25, 2017, at 10:30 AM, Luyu Wang [email protected] wrote:

Hi,

I’m running a Bokeh embedded Flask app similar to the example given on the User Guide:

https://github.com/bokeh/bokeh/blob/0.12.4/examples/howto/server_embed/flask_embed.py

I’m trying to share this app in a local network. However, the remote client can only get access to the Flask (with port 8080), but cannot connected with the Bokeh app (port 5006). The error message is 403, meaning the client request has been denied. Anyone could let me know how to fix it?

Thanks,
Luyu


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/01b72f94-5300-4409-9b5b-d93501824fb7%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/6b6a010c-1e35-497b-9479-d24bad4fe794%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/38b3febb-b500-4c77-a4ca-b6ad07e90f44%40continuum.io.

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

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

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/f_VzkAv5-4E/unsubscribe.

To unsubscribe from this group and all its topics, 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/c7b39f4c-d00a-47c8-8f98-06640caf29bc%40continuum.io.

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