JuliaCloud / JuliaBox

Juliabox continues to run, but this codebase is no longer current.
http://www.juliabox.org/
Other
185 stars 50 forks source link

webserver connection refused #472

Open fqiang opened 8 years ago

fqiang commented 8 years ago

I deployed the juliabox on google computing engine instance. I got a blank page once I configured the hostname. The blank page source is

<html>
    <head>
        <script>
            parent.JuliaBox.inform_logged_out();
        </script>
    </head>
</html>

hostname -f gives juliabox.ermiaolive.com. And /etc/hosts as

127.0.0.1 localhost
127.0.0.1 juliabox.xxxxx.com juliabox
146.148.95.123 juliabox.xxxxx.com juliabox

The log file at /JuliaBox/webserver/logs/error.log gives following connection refused error.

2016/10/05 19:44:37 [error] 7#0: *1 connect() failed (111: Connection refused), client: 209.89.19.68, server: , request: "GET / HTTP/1.1", host: "juliabox.xxxxx.com"
2016/10/05 19:44:38 [error] 7#0: *1 connect() failed (111: Connection refused), client: 209.89.19.68, server: , request: "GET / HTTP/1.1", host: "juliabox.xxxxx.com"
2016/10/05 19:44:39 [warn] 7#0: *1 [lua] router.lua:223: check_forward_addr(): replacing inaccessible forward address http://127.0.0.1:8888 with http://127.0.0.1:8888, client: 209.89.19.68, server: , request: "GET / HTTP/1.1", host: "juliabox.xxxxx.com"
2016/10/05 19:44:39 [error] 7#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 209.89.19.68, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8888/", host: "juliabox.xxxxx.com"

Just wondering if anyone has a clue to fix or debug this problem?

Thanks.

fqiang commented 8 years ago

I find out that if I remove the last two lines and only keep 127.0.0.1 localhost in /etc/hosts file. I can load the login page successfully.

Then hostname -f gives juliabox.c.genuine-synapse-144322.internal which is not resolvable by DNS.

Later on, a julia notebook fail to connect to the kernel because of the unresolvable hostname. The web browser gives the error Firefox can’t establish a connection to the server at ws://juliabox.c.genuine-synapse-144322.internal/api/kernels/38fe195a-cacb-4083-bbbe-46d9c8effd78/channels?session_id=A8CCCA256EEE4BF0873959E81002429E.

I tried the suggestion mentioned by @tanmaykm in #307, but no success yet. Just wondering if anyone can see the problems in my configuration or other stuff that I might neglected. Thanks.

fqiang commented 8 years ago

Found out that if I manually change the websocket url in the user profile (/jboxengine/data/configs/username_xxxxx/.ipython/profile_default/ipython_notebook_config.py) i.e. making c.NotebookApp.websocket_url = 'ws://juliabox.xxxxx.com', then the julia notebook can successfully connect to the kernel.