[IPython-User] "Connection failed" after updating to IPython 2.1

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[IPython-User] "Connection failed" after updating to IPython 2.1

Konrad Hinsen-2
Hi everyone,

I just updated my Anaconda installation, which included an update from
IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
with Firefox or Chrome any more ("connection failed"), though Safari
continues to work. Further system details: MacOS 10.9.3, Python 2.7.7,
and thanks to Anaconda all the dependencies should be up to date.

Since many packages were updated together with IPython, I did a test
install in a different (very plain) Python 2.7 installation, and
verified that it is indeed IPython 2.1 that makes the difference.

Does anyone have an idea what to do about this?

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

[IPython-User] "Connection failed" after updating to IPython 2.1

Konrad Hinsen-2
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

MinRK

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

Thomas Kluyver-2
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

MinRK
Yup, unfortunately for them, people reporting issues with localhost have typically been more capable of dealing with non-default config than those having issues with 127.  We'll just have to wait a bit longer, and see what other reports we get. I don't think there's a compelling reason to make any changes right now.

We should probably have a FAQ somewhere, with:

If you see "Connection failed" when opening notebooks, try switching the IP address of the notebook server, with:

    ipython notebook --ip=127.0.0.1

or

    ipython notebook --ip=localhost

There may be issues with proxy or firewall configuration preventing one or the other of these from working.

-MinRK


On Mon, Jun 23, 2014 at 12:49 PM, Thomas Kluyver <[hidden email]> wrote:
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

gary ruben
On the off chance 2.1.0 this might have fixed the problem I reported previously, I tried upgrading my Win7-64 Enterprise machine to IPython 2.1.0 and it is still crashing the Python interpreter with a ZMQError: Permission denied error. I've also asked about this on the Anaconda and ZMQ mailing lists too and noone has responded. Do you think it is a related problem to Konrad's? Back to 1.1.0 for now.

Gary


On 24 June 2014 06:01, MinRK <[hidden email]> wrote:
Yup, unfortunately for them, people reporting issues with localhost have typically been more capable of dealing with non-default config than those having issues with 127.  We'll just have to wait a bit longer, and see what other reports we get. I don't think there's a compelling reason to make any changes right now.

We should probably have a FAQ somewhere, with:

If you see "Connection failed" when opening notebooks, try switching the IP address of the notebook server, with:

    ipython notebook --ip=127.0.0.1

or

    ipython notebook --ip=localhost

There may be issues with proxy or firewall configuration preventing one or the other of these from working.

-MinRK


On Mon, Jun 23, 2014 at 12:49 PM, Thomas Kluyver <[hidden email]> wrote:
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

MinRK



On Mon, Jun 23, 2014 at 5:24 PM, gary ruben <[hidden email]> wrote:
On the off chance 2.1.0 this might have fixed the problem I reported previously, I tried upgrading my Win7-64 Enterprise machine to IPython 2.1.0 and it is still crashing the Python interpreter with a ZMQError: Permission denied error. I've also asked about this on the Anaconda and ZMQ mailing lists too and noone has responded. Do you think it is a related problem to Konrad's? Back to 1.1.0 for now.

Try all of:

ipython notebook --ip='*'
ipython notebook --ip='localhost'
ipython notebook --ip='127.0.0.1'

But if it's a zmq error, it's probably something else. I'm not sure what the cause would be. Does changing the IPython version change the zmq version as well in your conda environment?

-MinRK
 


Gary


On 24 June 2014 06:01, MinRK <[hidden email]> wrote:
Yup, unfortunately for them, people reporting issues with localhost have typically been more capable of dealing with non-default config than those having issues with 127.  We'll just have to wait a bit longer, and see what other reports we get. I don't think there's a compelling reason to make any changes right now.

We should probably have a FAQ somewhere, with:

If you see "Connection failed" when opening notebooks, try switching the IP address of the notebook server, with:

    ipython notebook --ip=127.0.0.1

or

    ipython notebook --ip=localhost

There may be issues with proxy or firewall configuration preventing one or the other of these from working.

-MinRK


On Mon, Jun 23, 2014 at 12:49 PM, Thomas Kluyver <[hidden email]> wrote:
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

gary ruben
Thanks for the suggestions Benjamin!
I've now got 2.1.0 working, but with the older zmq.
The zmq version does change between ipython versions because I was using the ipython-notebook metapackage, and had been advised to explicitly update zmq along with the notebook:

Upgrading:
>conda install ipython-notebook

The following packages will be UN-linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-1.1.0              |           py27_1
    ipython-notebook-1.1.0     |           py27_1
    pyzmq-2.2.0.1              |           py27_1
    tornado-3.2.0              |           py27_0

The following packages will be linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-2.1.0              |           py27_2   hard-link
    ipython-notebook-2.1.0     |           py27_0   hard-link
    pyzmq-14.3.1               |           py27_0   hard-link
    tornado-3.2.1              |           py27_0   hard-link


>ipython notebook --ip='*'
Crashes as before

>ipython notebook --ip='localhost'
Crashes as before

>ipython notebook --ip='127.0.0.1'
Crashes as before

Downgrading:
>conda install ipython-notebook=1.1.0
ipython notebook works fine.

So, since you asked about the zmq version I updated again and just tried downgrading zmq:
>conda install pyzmq=2.2.0.1

and lo and behold it now works without crashing. I hadn't tried this before now. I don't know if that will break something else, but it is zmq-related. I'll try to look when I have time at whether I can isolate the zmq version at which it breaks.

Gary


On 24 June 2014 12:58, MinRK <[hidden email]> wrote:



On Mon, Jun 23, 2014 at 5:24 PM, gary ruben <[hidden email]> wrote:
On the off chance 2.1.0 this might have fixed the problem I reported previously, I tried upgrading my Win7-64 Enterprise machine to IPython 2.1.0 and it is still crashing the Python interpreter with a ZMQError: Permission denied error. I've also asked about this on the Anaconda and ZMQ mailing lists too and noone has responded. Do you think it is a related problem to Konrad's? Back to 1.1.0 for now.

Try all of:

ipython notebook --ip='*'
ipython notebook --ip='localhost'
ipython notebook --ip='127.0.0.1'

But if it's a zmq error, it's probably something else. I'm not sure what the cause would be. Does changing the IPython version change the zmq version as well in your conda environment?

-MinRK
 


Gary


On 24 June 2014 06:01, MinRK <[hidden email]> wrote:
Yup, unfortunately for them, people reporting issues with localhost have typically been more capable of dealing with non-default config than those having issues with 127.  We'll just have to wait a bit longer, and see what other reports we get. I don't think there's a compelling reason to make any changes right now.

We should probably have a FAQ somewhere, with:

If you see "Connection failed" when opening notebooks, try switching the IP address of the notebook server, with:

    ipython notebook --ip=127.0.0.1

or

    ipython notebook --ip=localhost

There may be issues with proxy or firewall configuration preventing one or the other of these from working.

-MinRK


On Mon, Jun 23, 2014 at 12:49 PM, Thomas Kluyver <[hidden email]> wrote:
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

MinRK
Try:

    conda remove pyzmq
    pip install pyzmq

To isolate it being a pyzmq issue or a conda packaging issue.

-MinRK


On Mon, Jun 23, 2014 at 8:59 PM, gary ruben <[hidden email]> wrote:
Thanks for the suggestions Benjamin!
I've now got 2.1.0 working, but with the older zmq.
The zmq version does change between ipython versions because I was using the ipython-notebook metapackage, and had been advised to explicitly update zmq along with the notebook:

Upgrading:
>conda install ipython-notebook

The following packages will be UN-linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-1.1.0              |           py27_1
    ipython-notebook-1.1.0     |           py27_1
    pyzmq-2.2.0.1              |           py27_1
    tornado-3.2.0              |           py27_0

The following packages will be linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-2.1.0              |           py27_2   hard-link
    ipython-notebook-2.1.0     |           py27_0   hard-link
    pyzmq-14.3.1               |           py27_0   hard-link
    tornado-3.2.1              |           py27_0   hard-link


>ipython notebook --ip='*'
Crashes as before

>ipython notebook --ip='localhost'
Crashes as before

>ipython notebook --ip='127.0.0.1'
Crashes as before

Downgrading:
>conda install ipython-notebook=1.1.0
ipython notebook works fine.

So, since you asked about the zmq version I updated again and just tried downgrading zmq:
>conda install pyzmq=2.2.0.1

and lo and behold it now works without crashing. I hadn't tried this before now. I don't know if that will break something else, but it is zmq-related. I'll try to look when I have time at whether I can isolate the zmq version at which it breaks.

Gary


On 24 June 2014 12:58, MinRK <[hidden email]> wrote:



On Mon, Jun 23, 2014 at 5:24 PM, gary ruben <[hidden email]> wrote:
On the off chance 2.1.0 this might have fixed the problem I reported previously, I tried upgrading my Win7-64 Enterprise machine to IPython 2.1.0 and it is still crashing the Python interpreter with a ZMQError: Permission denied error. I've also asked about this on the Anaconda and ZMQ mailing lists too and noone has responded. Do you think it is a related problem to Konrad's? Back to 1.1.0 for now.

Try all of:

ipython notebook --ip='*'
ipython notebook --ip='localhost'
ipython notebook --ip='127.0.0.1'

But if it's a zmq error, it's probably something else. I'm not sure what the cause would be. Does changing the IPython version change the zmq version as well in your conda environment?

-MinRK
 


Gary


On 24 June 2014 06:01, MinRK <[hidden email]> wrote:
Yup, unfortunately for them, people reporting issues with localhost have typically been more capable of dealing with non-default config than those having issues with 127.  We'll just have to wait a bit longer, and see what other reports we get. I don't think there's a compelling reason to make any changes right now.

We should probably have a FAQ somewhere, with:

If you see "Connection failed" when opening notebooks, try switching the IP address of the notebook server, with:

    ipython notebook --ip=127.0.0.1

or

    ipython notebook --ip=localhost

There may be issues with proxy or firewall configuration preventing one or the other of these from working.

-MinRK


On Mon, Jun 23, 2014 at 12:49 PM, Thomas Kluyver <[hidden email]> wrote:
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

gary ruben
OK, just tried and the pip installed package still crashes, so I guess it is not a conda packaging issue.


On 24 June 2014 14:07, MinRK <[hidden email]> wrote:
Try:

    conda remove pyzmq
    pip install pyzmq

To isolate it being a pyzmq issue or a conda packaging issue.

-MinRK


On Mon, Jun 23, 2014 at 8:59 PM, gary ruben <[hidden email]> wrote:
Thanks for the suggestions Benjamin!
I've now got 2.1.0 working, but with the older zmq.
The zmq version does change between ipython versions because I was using the ipython-notebook metapackage, and had been advised to explicitly update zmq along with the notebook:

Upgrading:
>conda install ipython-notebook

The following packages will be UN-linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-1.1.0              |           py27_1
    ipython-notebook-1.1.0     |           py27_1
    pyzmq-2.2.0.1              |           py27_1
    tornado-3.2.0              |           py27_0

The following packages will be linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-2.1.0              |           py27_2   hard-link
    ipython-notebook-2.1.0     |           py27_0   hard-link
    pyzmq-14.3.1               |           py27_0   hard-link
    tornado-3.2.1              |           py27_0   hard-link


>ipython notebook --ip='*'
Crashes as before

>ipython notebook --ip='localhost'
Crashes as before

>ipython notebook --ip='127.0.0.1'
Crashes as before

Downgrading:
>conda install ipython-notebook=1.1.0
ipython notebook works fine.

So, since you asked about the zmq version I updated again and just tried downgrading zmq:
>conda install pyzmq=2.2.0.1

and lo and behold it now works without crashing. I hadn't tried this before now. I don't know if that will break something else, but it is zmq-related. I'll try to look when I have time at whether I can isolate the zmq version at which it breaks.

Gary


On 24 June 2014 12:58, MinRK <[hidden email]> wrote:



On Mon, Jun 23, 2014 at 5:24 PM, gary ruben <[hidden email]> wrote:
On the off chance 2.1.0 this might have fixed the problem I reported previously, I tried upgrading my Win7-64 Enterprise machine to IPython 2.1.0 and it is still crashing the Python interpreter with a ZMQError: Permission denied error. I've also asked about this on the Anaconda and ZMQ mailing lists too and noone has responded. Do you think it is a related problem to Konrad's? Back to 1.1.0 for now.

Try all of:

ipython notebook --ip='*'
ipython notebook --ip='localhost'
ipython notebook --ip='127.0.0.1'

But if it's a zmq error, it's probably something else. I'm not sure what the cause would be. Does changing the IPython version change the zmq version as well in your conda environment?

-MinRK
 


Gary


On 24 June 2014 06:01, MinRK <[hidden email]> wrote:
Yup, unfortunately for them, people reporting issues with localhost have typically been more capable of dealing with non-default config than those having issues with 127.  We'll just have to wait a bit longer, and see what other reports we get. I don't think there's a compelling reason to make any changes right now.

We should probably have a FAQ somewhere, with:

If you see "Connection failed" when opening notebooks, try switching the IP address of the notebook server, with:

    ipython notebook --ip=127.0.0.1

or

    ipython notebook --ip=localhost

There may be issues with proxy or firewall configuration preventing one or the other of these from working.

-MinRK


On Mon, Jun 23, 2014 at 12:49 PM, Thomas Kluyver <[hidden email]> wrote:
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Connection failed" after updating to IPython 2.1

gary ruben
Just reviving and updating this old thread with the latest findings. My comments in this thread described ZMQ and hence IPython notebook crashing on my work PC. My organisation's science software manager has tracked down the cause of the problem. It turns out that our Win7 Enterprise machines are preconfigured to run VNCServer with the receive port set to 5905. He discovered that the following ZMQ patch from 2011 explicitly reserves the same port for ZMQ and the clash causes the ZMQ crash
https://zeromq.jira.com/browse/LIBZMQ-265

This independently affected a bunch of people in our organisation. I don't think ZMQ is behaving nicely, but disabling VNCServer now allows us to run IPython notebook successfully.

Gary

On 24 June 2014 18:59, gary ruben <[hidden email]> wrote:
OK, just tried and the pip installed package still crashes, so I guess it is not a conda packaging issue.


On 24 June 2014 14:07, MinRK <[hidden email]> wrote:
Try:

    conda remove pyzmq
    pip install pyzmq

To isolate it being a pyzmq issue or a conda packaging issue.

-MinRK


On Mon, Jun 23, 2014 at 8:59 PM, gary ruben <[hidden email]> wrote:
Thanks for the suggestions Benjamin!
I've now got 2.1.0 working, but with the older zmq.
The zmq version does change between ipython versions because I was using the ipython-notebook metapackage, and had been advised to explicitly update zmq along with the notebook:

Upgrading:
>conda install ipython-notebook

The following packages will be UN-linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-1.1.0              |           py27_1
    ipython-notebook-1.1.0     |           py27_1
    pyzmq-2.2.0.1              |           py27_1
    tornado-3.2.0              |           py27_0

The following packages will be linked:

    package                    |            build
    ---------------------------|-----------------
    ipython-2.1.0              |           py27_2   hard-link
    ipython-notebook-2.1.0     |           py27_0   hard-link
    pyzmq-14.3.1               |           py27_0   hard-link
    tornado-3.2.1              |           py27_0   hard-link


>ipython notebook --ip='*'
Crashes as before

>ipython notebook --ip='localhost'
Crashes as before

>ipython notebook --ip='127.0.0.1'
Crashes as before

Downgrading:
>conda install ipython-notebook=1.1.0
ipython notebook works fine.

So, since you asked about the zmq version I updated again and just tried downgrading zmq:
>conda install pyzmq=2.2.0.1

and lo and behold it now works without crashing. I hadn't tried this before now. I don't know if that will break something else, but it is zmq-related. I'll try to look when I have time at whether I can isolate the zmq version at which it breaks.

Gary


On 24 June 2014 12:58, MinRK <[hidden email]> wrote:



On Mon, Jun 23, 2014 at 5:24 PM, gary ruben <[hidden email]> wrote:
On the off chance 2.1.0 this might have fixed the problem I reported previously, I tried upgrading my Win7-64 Enterprise machine to IPython 2.1.0 and it is still crashing the Python interpreter with a ZMQError: Permission denied error. I've also asked about this on the Anaconda and ZMQ mailing lists too and noone has responded. Do you think it is a related problem to Konrad's? Back to 1.1.0 for now.

Try all of:

ipython notebook --ip='*'
ipython notebook --ip='localhost'
ipython notebook --ip='127.0.0.1'

But if it's a zmq error, it's probably something else. I'm not sure what the cause would be. Does changing the IPython version change the zmq version as well in your conda environment?

-MinRK
 


Gary


On 24 June 2014 06:01, MinRK <[hidden email]> wrote:
Yup, unfortunately for them, people reporting issues with localhost have typically been more capable of dealing with non-default config than those having issues with 127.  We'll just have to wait a bit longer, and see what other reports we get. I don't think there's a compelling reason to make any changes right now.

We should probably have a FAQ somewhere, with:

If you see "Connection failed" when opening notebooks, try switching the IP address of the notebook server, with:

    ipython notebook --ip=127.0.0.1

or

    ipython notebook --ip=localhost

There may be issues with proxy or firewall configuration preventing one or the other of these from working.

-MinRK


On Mon, Jun 23, 2014 at 12:49 PM, Thomas Kluyver <[hidden email]> wrote:
I think all of the cases we've seen where 127.0.0.1 didn't work have been Sophos installations. Maybe we could try getting them to fix their software, and then switching the default back to 127.0.0.1. On the other hand, unless we know someone at Sophos, we'd have to try to drill through all the big-company insulation layers to someone who can actually fix the issue, and even once it's fixed, it'll probably be months-years before we can assume that people at bootcamps have got the fix.

So far, at least, it seems like the problems with 'localhost' affect more technically capable users than '127.0.0.1' - we've usually run into problems with the latter with windows users at bootcamps. So for now, I think leaving the default as localhost makes sense. Of course, at the next bootcamp we might discover that McAfee blocks localhost...

Thomas


On 23 June 2014 12:36, MinRK <[hidden email]> wrote:

I was afraid of this. The change was actually made specifically for firewalls and proxies that were not handling 127.0.0.1 correctly, but were handling localhost. When we made the change, we couldn’t find any examples of localhost not being handled, so we made the switch. But there have been a couple since 2.1. I don’t think there’s a real solution to cover both cases, so we just have to live with it. Users in ill-configured environments will just have to set c.NotebookApp.ip='127.0.0.1' when the default of localhost doesn’t work.

-MinRK



On Mon, Jun 23, 2014 at 5:30 AM, Konrad Hinsen <[hidden email]> wrote:
Konrad Hinsen writes:

 > I just updated my Anaconda installation, which included an update from
 > IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
 > with Firefox or Chrome any more ("connection failed"), though Safari
 > continues to work.

I made some progress on this, and found a workaround. This problem
probably concerns only users with messy Web proxies, which hopefully
means not so many.

The relevant change in IPython is the URL fed to the browser: in 2.0,
it refers to 127.0.0.1, whereas in 2.1 it refers to localhost. Safari
resolves localhost to 127.0.0.1 and then checks the proxy
configuration, whereas Firefox and Chrome look up localhost directly
in the proxy configuration. My proxy configuration (provided by the
network administrator of my lab) has an exception for 127.0.0.1, but
not for localhost. As a consequence, Firefox and Chrome ask the proxy
to make a connection to localhost, which fails.

Konrad.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user




_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user