Quantcast

[IPython-User] Help troubleshooting notebook as public server

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[IPython-User] Help troubleshooting notebook as public server

Michael Waskom
Hi all,

As I understand things, I should be able to set up the notebook such that I can run the kernel on my desktop and access it remotely through a browser on my laptop.  But I'm having some trouble getting that to work.

I've followed the directions here: 


And created a new profile with edits as instructed (including the bit above it about generating an ssl certificate).

I then start the kernel in a terminal as so:

$ ipython notebook --profile=nbserver
[NotebookApp] Using existing profile dir: u'/Users/mwaskom/.ipython/profile_nbserver'
[NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:9999
[NotebookApp] Use Control-C to stop this server and shut down all kernels.

I can access this notebook through the browser on the computer running the kernel at
https://{hostname}:9999 (with the anticipated warning about a self-signed certificate)

However, when I try and do that from my laptop, it just hangs.

I'm using ipython 0.12 on OS X 10.6.  The osx firewall is not running.

Unfortunately, I'm scraping at the bottom of my repertoire for troubleshooting network issues, but am quite possibly missing something obvious.  Any suggestions would be great.

Thanks,
Michael

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

Re: Help troubleshooting notebook as public server

MinRK
What browser are you using?  I think Safari has some issues with wss (secure) in some cases.

You might also check the JavaScript console in the browser for more enlightenment.

-MinRK

On Jan 6, 2012, at 12:53, Michael Waskom <[hidden email]> wrote:

Hi all,

As I understand things, I should be able to set up the notebook such that I can run the kernel on my desktop and access it remotely through a browser on my laptop.  But I'm having some trouble getting that to work.

I've followed the directions here: 


And created a new profile with edits as instructed (including the bit above it about generating an ssl certificate).

I then start the kernel in a terminal as so:

$ ipython notebook --profile=nbserver
[NotebookApp] Using existing profile dir: u'/Users/mwaskom/.ipython/profile_nbserver'
[NotebookApp] The IPython Notebook is running at: <a href="https://[all">https://[all ip addresses on your system]:9999
[NotebookApp] Use Control-C to stop this server and shut down all kernels.

I can access this notebook through the browser on the computer running the kernel at
https://{hostname}:9999 (with the anticipated warning about a self-signed certificate)

However, when I try and do that from my laptop, it just hangs.

I'm using ipython 0.12 on OS X 10.6.  The osx firewall is not running.

Unfortunately, I'm scraping at the bottom of my repertoire for troubleshooting network issues, but am quite possibly missing something obvious.  Any suggestions would be great.

Thanks,
Michael
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Help troubleshooting notebook as public server

Michael Waskom
Oh, sorry; I'm using Chrome 16 in both cases.

Michael

On Fri, Jan 6, 2012 at 1:11 PM, Min RK <[hidden email]> wrote:
What browser are you using?  I think Safari has some issues with wss (secure) in some cases.

You might also check the JavaScript console in the browser for more enlightenment.

-MinRK

On Jan 6, 2012, at 12:53, Michael Waskom <[hidden email]> wrote:

Hi all,

As I understand things, I should be able to set up the notebook such that I can run the kernel on my desktop and access it remotely through a browser on my laptop.  But I'm having some trouble getting that to work.

I've followed the directions here: 


And created a new profile with edits as instructed (including the bit above it about generating an ssl certificate).

I then start the kernel in a terminal as so:

$ ipython notebook --profile=nbserver
[NotebookApp] Using existing profile dir: u'/Users/mwaskom/.ipython/profile_nbserver'
[NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:9999
[NotebookApp] Use Control-C to stop this server and shut down all kernels.

I can access this notebook through the browser on the computer running the kernel at
https://{hostname}:9999 (with the anticipated warning about a self-signed certificate)

However, when I try and do that from my laptop, it just hangs.

I'm using ipython 0.12 on OS X 10.6.  The osx firewall is not running.

Unfortunately, I'm scraping at the bottom of my repertoire for troubleshooting network issues, but am quite possibly missing something obvious.  Any suggestions would be great.

Thanks,
Michael
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Help troubleshooting notebook as public server

Michael Waskom
And (sorry for splitting up the responses): I'm not seeing any errors/warnings (or much of anything, really) in the javascript console in chrome when I try and load the notebook.

On Fri, Jan 6, 2012 at 1:15 PM, Michael Waskom <[hidden email]> wrote:
Oh, sorry; I'm using Chrome 16 in both cases.

Michael


On Fri, Jan 6, 2012 at 1:11 PM, Min RK <[hidden email]> wrote:
What browser are you using?  I think Safari has some issues with wss (secure) in some cases.

You might also check the JavaScript console in the browser for more enlightenment.

-MinRK

On Jan 6, 2012, at 12:53, Michael Waskom <[hidden email]> wrote:

Hi all,

As I understand things, I should be able to set up the notebook such that I can run the kernel on my desktop and access it remotely through a browser on my laptop.  But I'm having some trouble getting that to work.

I've followed the directions here: 


And created a new profile with edits as instructed (including the bit above it about generating an ssl certificate).

I then start the kernel in a terminal as so:

$ ipython notebook --profile=nbserver
[NotebookApp] Using existing profile dir: u'/Users/mwaskom/.ipython/profile_nbserver'
[NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:9999
[NotebookApp] Use Control-C to stop this server and shut down all kernels.

I can access this notebook through the browser on the computer running the kernel at
https://{hostname}:9999 (with the anticipated warning about a self-signed certificate)

However, when I try and do that from my laptop, it just hangs.

I'm using ipython 0.12 on OS X 10.6.  The osx firewall is not running.

Unfortunately, I'm scraping at the bottom of my repertoire for troubleshooting network issues, but am quite possibly missing something obvious.  Any suggestions would be great.

Thanks,
Michael
_______________________________________________
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
|  
Report Content as Inappropriate

Re: Help troubleshooting notebook as public server

Fernando Perez
In reply to this post by Michael Waskom
On Fri, Jan 6, 2012 at 1:15 PM, Michael Waskom <[hidden email]> wrote:
> Oh, sorry; I'm using Chrome 16 in both cases.

A few things to try, though I'm shooting in the dark here:

- a different client browser on your laptop.
- is it possible that the network you're on is filtering http traffic?
 You say your firewall is off, but is that also true in the server
(I'm not sure if you were referring to the client only)?

- try a simpler http server on the server:

python -m SimpleHTTPServer

and see if you can connect to it.  If this doesn't work, then there's
a network http traffic issue.

- try disabling ssl and running the notebook over plain http just for
a minute (you can still use a password, it's just that it will be sent
in plaintext).

Let us know how it goes...

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

Re: Help troubleshooting notebook as public server

Michael Waskom
Hi Fernando,

Thanks for the hypothesis generation. It turns out that indeed we do have a firewall on the network side that was blocking access.  To get IT to open some ports for me, I need to answer the following question, which I couldn't figure out from the docs (compounded by my limited understanding of, well, the internet):  whether the ports use UDP or TCP.

Also, I just want to paranoidly confirm that this server will be secure "out of the box" provided I followed the directions about setting up a password for my notebook and transmitting it via SSL (so that possible intruders don't get shell-like access to my system).

Thanks!

Michael

On Fri, Jan 6, 2012 at 3:26 PM, Fernando Perez <[hidden email]> wrote:
On Fri, Jan 6, 2012 at 1:15 PM, Michael Waskom <[hidden email]> wrote:
> Oh, sorry; I'm using Chrome 16 in both cases.

A few things to try, though I'm shooting in the dark here:

- a different client browser on your laptop.
- is it possible that the network you're on is filtering http traffic?
 You say your firewall is off, but is that also true in the server
(I'm not sure if you were referring to the client only)?

- try a simpler http server on the server:

python -m SimpleHTTPServer

and see if you can connect to it.  If this doesn't work, then there's
a network http traffic issue.

- try disabling ssl and running the notebook over plain http just for
a minute (you can still use a password, it's just that it will be sent
in plaintext).

Let us know how it goes...

f


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

Re: Help troubleshooting notebook as public server

Matthias Bussonnier

Le 10 janv. 2012 à 00:57, Michael Waskom a écrit :

> Hi Fernando,
>
> Thanks for the hypothesis generation. It turns out that indeed we do have a firewall on the network side that was blocking access.  To get IT to open some ports for me, I need to answer the following question, which I couldn't figure out from the docs (compounded by my limited understanding of, well, the internet):  whether the ports use UDP or TCP.

Sorry for poping in.
Do you also have a proxy ? I had a similar issue at work but didn't realized it before.
I have to manually unset the proxy for the given hostname when I'm on the same side of the proxy than the webserver :

http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html#known-issues

For the ports to open, don't forget that if you open several webserver they will use different ports.
For TCP or UDP, I would guess TCP :
Wikipedia :
WebSocket is a technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket.
--
Matthias



> Also, I just want to paranoidly confirm that this server will be secure "out of the box" provided I followed the directions about setting up a password for my notebook and transmitting it via SSL (so that possible intruders don't get shell-like access to my system).
>
> Thanks!
>
> Michael
>
> On Fri, Jan 6, 2012 at 3:26 PM, Fernando Perez <[hidden email]> wrote:
> On Fri, Jan 6, 2012 at 1:15 PM, Michael Waskom <[hidden email]> wrote:
> > Oh, sorry; I'm using Chrome 16 in both cases.
>
> A few things to try, though I'm shooting in the dark here:
>
> - a different client browser on your laptop.
> - is it possible that the network you're on is filtering http traffic?
>  You say your firewall is off, but is that also true in the server
> (I'm not sure if you were referring to the client only)?
>
> - try a simpler http server on the server:
>
> python -m SimpleHTTPServer
>
> and see if you can connect to it.  If this doesn't work, then there's
> a network http traffic issue.
>
> - try disabling ssl and running the notebook over plain http just for
> a minute (you can still use a password, it's just that it will be sent
> in plaintext).
>
> Let us know how it goes...
>
> f
>
> _______________________________________________
> 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
|  
Report Content as Inappropriate

Re: Help troubleshooting notebook as public server

Fernando Perez
On Tue, Jan 10, 2012 at 12:00 AM, Matthias BUSSONNIER
<[hidden email]> wrote:
>
> Sorry for poping in.

Not at all, the more everyone helps each other, the more time the devs
have to handle pull requests!  So please, everyone do pitch in on the
list :)

Cheers,

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

Re: Help troubleshooting notebook as public server

Fernando Perez
In reply to this post by Michael Waskom
Hi,

On Mon, Jan 9, 2012 at 3:57 PM, Michael Waskom <[hidden email]> wrote:
> Thanks for the hypothesis generation. It turns out that indeed we do have a
> firewall on the network side that was blocking access.  To get IT to open
> some ports for me, I need to answer the following question, which I couldn't
> figure out from the docs (compounded by my limited understanding of, well,
> the internet):  whether the ports use UDP or TCP.

TCP.

> Also, I just want to paranoidly confirm that this server will be secure "out
> of the box" provided I followed the directions about setting up a password
> for my notebook and transmitting it via SSL (so that possible intruders
> don't get shell-like access to my system).

Well, in as much as we haven't found security holes yet under those
conditions :)

What I mean is: there are no 'guaranteed secure' systems on the
internet, only systems whose security flaws haven't been found yet.
For this reason, we more than welcome scrutiny of the code that deals
with these issues in IPython, and will do our best to rapidly address
any problems reported to us.

But with these caveats, the answer is: yes, to the best of our
knowledge, once you put a password and enable SSL, the system is
secure.  SSL forces all communication between your browser and the
server to travel encrypted (including the password) and having a
password means that nobody can get past the front page unless they
know it.

We also made sure the password storage format is in hashed/salted
mode, so that even if someone reads your config file (which is stored
in user-only directories just like SSH keys are), they still don't
have your password.  There is enough salt to make any brute-force
attack using precomputed tables with present generation technology
impractical.

Cheers,

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

Re: Help troubleshooting notebook as public server

Andrew Jaffe-4
In reply to this post by MinRK
Hi all,

On 06/01/2012 21:11, Min RK wrote:
> What browser are you using? I think Safari has some issues with wss
> (secure) in some cases.

For what it's worth, I've got it running on 10.7 with Chrome, but not
with Safari (the latter gets all the way to the running-notebook screen,
but gives me a websockets error and tells me I can't actually run code).

Andrew


>
> You might also check the JavaScript console in the browser for more
> enlightenment.
>
> -MinRK
>
> On Jan 6, 2012, at 12:53, Michael Waskom <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>> Hi all,
>>
>> As I understand things, I should be able to set up the notebook such
>> that I can run the kernel on my desktop and access it remotely through
>> a browser on my laptop. But I'm having some trouble getting that to work.
>>
>> I've followed the directions here:
>>
>> http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html#quick-howto-running-a-public-notebook-server
>>
>> And created a new profile with edits as instructed (including the bit
>> above it about generating an ssl certificate).
>>
>> I then start the kernel in a terminal as so:
>>
>> $ ipython notebook --profile=nbserver
>> [NotebookApp] Using existing profile dir:
>> u'/Users/mwaskom/.ipython/profile_nbserver'
>> [NotebookApp] The IPython Notebook is running at: https://[all ip
>> addresses on your system]:9999
>> [NotebookApp] Use Control-C to stop this server and shut down all kernels.
>>
>> I can access this notebook through the browser on the computer running
>> the kernel at
>> https://{hostname}:9999 (with the anticipated warning about a
>> self-signed certificate)
>>
>> However, when I try and do that from my laptop, it just hangs.
>>
>> I'm using ipython 0.12 on OS X 10.6. The osx firewall is not running.
>>
>> Unfortunately, I'm scraping at the bottom of my repertoire for
>> troubleshooting network issues, but am quite possibly missing
>> something obvious. Any suggestions would be great.



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

Re: Help troubleshooting notebook as public server

Michael Waskom
In reply to this post by Fernando Perez
Hi,

On Tue, Jan 10, 2012 at 2:19 AM, Fernando Perez <[hidden email]> wrote:
Hi,

On Mon, Jan 9, 2012 at 3:57 PM, Michael Waskom <[hidden email]> wrote:
> Thanks for the hypothesis generation. It turns out that indeed we do have a
> firewall on the network side that was blocking access.  To get IT to open
> some ports for me, I need to answer the following question, which I couldn't
> figure out from the docs (compounded by my limited understanding of, well,
> the internet):  whether the ports use UDP or TCP.

TCP.
> Also, I just want to paranoidly confirm that this server will be secure "out
> of the box" provided I followed the directions about setting up a password
> for my notebook and transmitting it via SSL (so that possible intruders
> don't get shell-like access to my system).

Well, in as much as we haven't found security holes yet under those
conditions :)

What I mean is: there are no 'guaranteed secure' systems on the
internet, only systems whose security flaws haven't been found yet.
For this reason, we more than welcome scrutiny of the code that deals
with these issues in IPython, and will do our best to rapidly address
any problems reported to us.

Of course.  Not expecting a miracle, just wanted to have the Berkeley researcher on record in case I inadvertently bring down the Stanford network and need to redirect the mob :).
 
But with these caveats, the answer is: yes, to the best of our
knowledge, once you put a password and enable SSL, the system is
secure.  SSL forces all communication between your browser and the
server to travel encrypted (including the password) and having a
password means that nobody can get past the front page unless they
know it.

We also made sure the password storage format is in hashed/salted
mode, so that even if someone reads your config file (which is stored
in user-only directories just like SSH keys are), they still don't
have your password.  There is enough salt to make any brute-force
attack using precomputed tables with present generation technology
impractical.

Cheers,

f

Thanks for your help! If you don't hear from me again on this topic, everything went smoothly as soon as IT opened up a port.

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

Re: Help troubleshooting notebook as public server

Fernando Perez
On Tue, Jan 10, 2012 at 10:34 AM, Michael Waskom <[hidden email]> wrote:
> Not expecting a miracle, just wanted to have the Berkeley researcher on
> record in case I inadvertently bring down the Stanford network and need to
> redirect the mob :).

Well, there goes my job :)

Good luck, keep us posted if you run into any issues.

BTW, I might swing by Stanford in a week or two, would be great to
catch up on how this goes over there.

Cheers,

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

Re: Help troubleshooting notebook as public server

Michael Waskom
Hey,

I'm happily churning away on data that lives on campus from the comforts of my apartment.  The notebook is really awesome!

Let me know when you're going to be down on the farm, I'd be happy to chat.

Michael 

On Wed, Jan 11, 2012 at 10:13 PM, Fernando Perez <[hidden email]> wrote:
On Tue, Jan 10, 2012 at 10:34 AM, Michael Waskom <[hidden email]> wrote:
> Not expecting a miracle, just wanted to have the Berkeley researcher on
> record in case I inadvertently bring down the Stanford network and need to
> redirect the mob :).

Well, there goes my job :)

Good luck, keep us posted if you run into any issues.

BTW, I might swing by Stanford in a week or two, would be great to
catch up on how this goes over there.

Cheers,

f


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

Re: Help troubleshooting notebook as public server

Brian Granger-3
On Thu, Jan 12, 2012 at 9:30 PM, Michael Waskom <[hidden email]> wrote:
> Hey,
>
> I'm happily churning away on data that lives on campus from the comforts of
> my apartment.  The notebook is really awesome!

Great, glad you were able to get this setup.  This is a usage case
that I hadn't thought much about - namely it lets you keep the code
where the data is and work on it from anywhere.  Very nice!

Cheers,

Brian

> Let me know when you're going to be down on the farm, I'd be happy to chat.
>
> Michael
>
>
> On Wed, Jan 11, 2012 at 10:13 PM, Fernando Perez <[hidden email]>
> wrote:
>>
>> On Tue, Jan 10, 2012 at 10:34 AM, Michael Waskom <[hidden email]>
>> wrote:
>> > Not expecting a miracle, just wanted to have the Berkeley researcher on
>> > record in case I inadvertently bring down the Stanford network and need
>> > to
>> > redirect the mob :).
>>
>> Well, there goes my job :)
>>
>> Good luck, keep us posted if you run into any issues.
>>
>> BTW, I might swing by Stanford in a week or two, would be great to
>> catch up on how this goes over there.
>>
>> Cheers,
>>
>> f
>
>
>
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user
>



--
Brian E. Granger
Cal Poly State University, San Luis Obispo
[hidden email] and [hidden email]
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help troubleshooting notebook as public server

Fernando Perez
On Thu, Jan 12, 2012 at 9:37 PM, Brian Granger <[hidden email]> wrote:
> Great, glad you were able to get this setup.  This is a usage case
> that I hadn't thought much about - namely it lets you keep the code
> where the data is and work on it from anywhere.  Very nice!

Yes, I think this is going to be extremely useful moving forward, in
contexts where it's simply unthinkable to move the data out, typically
due to sheer size but also perhaps for privacy/confidentiality
reasons.

I hope we get a chance to reorganize the saving code to avoid the
roundtripping issues with the current design; in a notebook with lots
of figures and a very asymmetric internet connection, the saves can
become prohibitively slow.  But we'll get to it...

Cheers,

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