Trouble accessing local notebooks on firefox when disconnected from internet

56 views
Skip to first unread message

Florian Aspart

unread,
Sep 21, 2017, 9:15:09 AM9/21/17
to Project Jupyter
Hi all,

I'm running a local jupyter notebook with https access only on ubuntu. I have no problem to connect to the notebooks and work with them as long as I'm connected to the internet.
However, when I disconnect internet, I cannot access the notebooks from Firefox (Chrome still works fine) anymore. For sure it's a configuration problem on my side, but I do not know where to look at (I disabled proxy in the settings of both browser).

Did someone have similar issue? Any idea where it could possibly come from?

Best,
Florian

Roland Weber

unread,
Sep 25, 2017, 2:09:09 AM9/25/17
to Project Jupyter
Hello Florian,

the browser probably pulls some JavaScript libraries from online locations. It seems that Chrome caches them more aggressively than Firefox. To verify, you can go offline and clear the browser cache in Chrome. It should then stop working, too ;-)

cheers,
  Roland

Thomas Kluyver

unread,
Sep 25, 2017, 12:23:13 PM9/25/17
to Project Jupyter
No, I don't think we're relying on any JS libraries fetched from the internet. It should work entirely offline. It sounds like some sort of proxy or DNS issue.

What address is it trying to connect to? If it's localhost, try 127.0.0.1 instead. If it's 127.0.0.1, try localhost.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/4c2eeed6-9654-4cd1-a710-31796013654e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roland Weber

unread,
Sep 26, 2017, 2:00:59 AM9/26/17
to Project Jupyter
On Monday, September 25, 2017 at 6:23:13 PM UTC+2, takowl wrote:
No, I don't think we're relying on any JS libraries fetched from the internet.

My mistake. It's nbconvert, not notebook, that refers to MathJAX by CDN.

MinRK

unread,
Sep 26, 2017, 11:07:34 AM9/26/17
to Project Jupyter
Under default configuration, the notebook shouldn't be pulling anything from the internet to run. What version of the notebook are you running (`pip list | grep notebook`)? Older versions of the notebook pulled mathjax from a CDN, but it doesn't load any remote javascript by default anymore.

-Min

--

Florian Aspart

unread,
Sep 27, 2017, 4:54:28 AM9/27/17
to jup...@googlegroups.com
Thanks for the answers, they helped me better track my problem.

I can connect to the notebook "home" page but when I open a new kernel it cannot connect to it. Therefore it's definitely not a proxy issue.

I'm running the Notebook version 5.0 but I also have a bunch of nbextensions running. I think one of them is causing the problem: I disabled all of them and, though I initially need internet to start the notebook, I can still run the notebooks in firefox after turnin off internet.
I'll try to find which extensions does not work offline by disabling them one after the other and I'll report it in case somebody has the same problem.

Cheers,
Florian


--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/IiS54b-icOk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Thomas Kluyver

unread,
Sep 27, 2017, 6:28:25 AM9/27/17
to Project Jupyter
On 27 September 2017 at 09:54, Florian Aspart <florian...@gmail.com> wrote: 
I can connect to the notebook "home" page but when I open a new kernel it cannot connect to it. Therefore it's definitely not a proxy issue.

It's still possible that it's something like that. Some proxies have trouble with websockets (which we use to connect to the kernel). Some internet security software also interferes with websockets, but that usually affects Windows users, whereas you said you're running Ubuntu.
 
I'm running the Notebook version 5.0 but I also have a bunch of nbextensions running. I think one of them is causing the problem: I disabled all of them and, though I initially need internet to start the notebook, I can still run the notebooks in firefox after turnin off internet.
I'll try to find which extensions does not work offline by disabling them one after the other and I'll report it in case somebody has the same problem.

That's still weird, because it shouldn't require an internet connection at any point. How are you turning off internet when you test this? It does use the special 'loopback' network interface; it may be that you've done something that disables all network interfaces, but I don't think it's likely - I don't even know a command for that.

You could also try upgrading to notebook 5.1. I don't think it's likely to make a difference to that, but you never know.

Florian Aspart

unread,
Sep 27, 2017, 9:22:46 AM9/27/17
to jup...@googlegroups.com
You're right this was not the problem. It worked a little bit after disabling internet (unplugging ethernet cable) but stopped working again, probably due to some caching.

This seems to be, indeed, a dns issue: using 127.0.0.1 instead of localhost works fine. Alternatively, disabling IPv6 for the dns in firefox (setting network.dns.disableIPv6 = True in about:config) also fixed the problem for the address localhost.

Thanks again for the help!

--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/IiS54b-icOk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.

Thomas Kluyver

unread,
Sep 27, 2017, 9:35:13 AM9/27/17
to Project Jupyter
What's in /etc/hosts ? I wonder if it resolves 'localhost' to an IPv6 address and then can't connect to it for some reason.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Florian Aspart

unread,
Sep 28, 2017, 5:07:05 AM9/28/17
to jup...@googlegroups.com
Here is my /etc/hosts:

127.0.0.1    localhost
127.0.1.1    florian

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


Thomas Kluyver

unread,
Sep 28, 2017, 5:38:05 AM9/28/17
to Project Jupyter
Hmm, that doesn't really support my hypothesis. But maybe Firefox hardcodes something to resolve localhost to an IPv6 address. I'm not sure what the difference is between your computer and mine: I'm also running Firefox on Ubuntu, and I can connect to the notebook on localhost even when I turn the network off.

Thomas

Florian Aspart

unread,
Sep 28, 2017, 8:25:37 AM9/28/17
to jup...@googlegroups.com
I just tried on my laptop (Firefox and Ubuntu) and it work fine too.
I'm not sure which configuration is wrong on my Desktop PC. Anyway I'll just use 127.0.0.1
Thanks again!
Flo

Reply all
Reply to author
Forward
0 new messages