Bokeh server + Flask on Rasp Pi - Failed to load resource: net::ERR_CONNECTION_REFUSED - autoload.js

@Bryan Thank you for the response. By commenting out:

# Thread(target=bk_worker).start()  

The “address in use” error no longer occurs (not a surprise… apparently no sharing of network goo happens easily with Rasp Pi / Python???).

I assume this means:

  • I must run a Flask app with bokeh server as a single process/no threads.
  • a single process/no threads will work.

HOWEVER, when I attempt to access the html, I see:

192.168.86.249/:21 GET http://localhost:5006/bkapp/autoload.js?bokeh-autoload-element=1002&bokeh-app-path=/bkapp&bokeh-absolute-url=http://localhost:5006/bkapp net::ERR_CONNECTION_REFUSED     192.168.86.249/:21 

Note: 192.168.86.249 is the address of my Raspberry Pi.

Netstat points out:

$ netstat -tulpn
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:28017         0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:40853         0.0.0.0:*               LISTEN      844/node            
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      3480/python3        
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:5006            0.0.0.0:*               LISTEN      3480/python3        
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
tcp6       0      0 :::5006                 :::*                    LISTEN      3480/python3        
udp        0      0 0.0.0.0:56692           0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -                   
udp6       0      0 :::38607                :::*                                -                   
udp6       0      0 :::5353                 :::*                    

Which leads me to expect setting:

    server = Server({'/bkapp': make_interactive}, io_loop=IOLoop(), address='0.0.0.0',
                    allow_websocket_origin=["0.0.0.0"])  

Should work. Can you please help me figure out what I am not understanding/doing wrong?

Thank you.