[IPython-User] notebook server dies when logging out of terminal

K.-Michael Aye kmichael.aye@gmail....
Wed Feb 27 00:23:16 CST 2013


Unfortunately, there must be another problem, as using "screen" did not 
prevent my nbserver session from going stale.
I am now wondering, if it's something to do with timing, as I only have 
a 15 MBit connection from home?
Here are my symptoms again:
* I still can log out and in to the https notebook dashboard.
* Opening a notebook gives this feedback in the screen session:
[NotebookApp] Kernel started: 4aa9d31f-26b6-430a-bdca-02211a73283c
[NotebookApp] Connecting to: tcp://127.0.0.1:60378
[NotebookApp] Connecting to: tcp://127.0.0.1:45006
[NotebookApp] Connecting to: tcp://127.0.0.1:53486
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing 
kernel-4aa9d31f-26b6-430a-bdca-02211a73283c.json --profile nbserver

I also still can formally close a notebook with File->Close and 
shutdown, but then, instead of the tab closing I receive the error 
message: "Kernel has died, would you like to restart it?"
The log shows this:
[NotebookApp] Kernel shutdown: 4aa9d31f-26b6-430a-bdca-02211a73283c
[NotebookApp] Kernel 4aa9d31f-26b6-430a-bdca-02211a73283c failed to 
respond to heartbeat

Just now I also saw, once only:

WARNING:root:Read error on 30: [Errno 110] Connection timed out

Can I increase the verbosity of the feedback in the terminal? Couldn't 
find anything like that on the web or in the config file (apart from 
the verbose crashing).



On 2013-02-26 21:02:40 +0000, K.-Michael Aye said:

> On 2013-02-26 11:56:20 +0000, Moritz Emanuel Beber said:
> 
>> Hi,
>> 
>> On 02/26/2013 08:41 AM, K.-Michael Aye wrote:
>>> I am using a notebook server profile on our fast linux server so that I
>>> can log onto the notebook server with the browser on my Macbook.
>>> This works pretty well as long as I stay connected to the terminal
>>> where I am logged into the server.
>>> 
>>> I am lauching my notebookserver on a remote server like this:
>>> 
>>> ipython notebook --profile=nbserver &
>>> 
>>> to send the nbserver into the background, so that when I would
>>> disconnect because I am sending the macbook to sleep for a while, while
>>> changing the room and, most likely, the kind of network connection.
>>> However, for some reason the nbserver always becomes unresponsive in a
>>> way. I still can log out and into the dashboard via the password
>>> protection, but cells from a newly openened notebook are not being
>>> executed, the '*' stays forever in front of each cell that was
>>> Shift-Returned.
>>> 
>>> Further information:
>>> I have configured the nbserver to use https:.
>>> 
>>> Anybody has any idea what might be going wrong or how I could set up a
>>> notebook server that stays alive independent from a ssh login?
>>> 
>>> Best regards,
>>> Michael
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> IPython-User mailing list
>>> IPython-User@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>> 
>> For most processes you would have to start them with 'nohup' and
>> redirect their stdout and stderr streams to be able to just log out
>> without them being affected. I highly recommend 'screen' as Matthias
>> already mentioned. You can even start the notebook inside a screen
>> session with a single command:
>> 
>> $ screen -dmS your_screen_session_name_here ipython notebook
>> --profile=nbserver
>> 
>> 'screen' is a great utility to learn anyway since you can have "multiple
>> terminals" through a single ssh session. When you later want to interact
>> with programs running inside of screen, simply type:
>> 
>> $ screen -r
>> or
>> $ screen -r your_screen_session_name_here
>> 
>> if you have multiple screen instances.
>> 
>> Cheers,
>> Moritz
> 
> Thanks everybody! I was using screen 20 years ago to explore the
> unix-worlds, interwebs and play MUDs at the same time, but somehow
> didn't have a use case in the last years. Thanks to you I'm "back on
> track".  ;)
> 
> Best,
> Michael
> 
> PS.: Nevertheless it's technically interesting that the nbserver only
> died "half", isn't it?





More information about the IPython-User mailing list