Closed sewald101 closed 5 years ago
I continue to run down the rabbit hole with this problem. I terminated my agile_data_science EC2 and re-spun it up. And IT WORKED . . . ONCE. (I got a URL with a key and was able to access the nb from my browser.) But then after I stopped the EC2 between practice sessions (to save $$) and restarting, I could not access the nb again without getting the error message above in a continuous loop.
Accessing a nb should be easy, right? I've never had this problem with other EC2 instances on other projects. On a standard installation (running Python 2, btw), I usually do this in the ssh terminal, which yields a URL with a security key:
jupyter notebook --no-browser --port=18888
Then this locally:
ssh -NfL 18888:localhost:18888 <EC2 alias name>
Then paste the URL with key into the browser and bingo, it works.
That routine is not working for this Agile_DS EC2.
Neither does re-running jupyter-notebook --ip=0.0.0.0
What am I doing wrong?
Now the notebook server runs on its own and all you have to do is run:
./ec2.sh
./ec2_create_tunnel.sh
Now after fifteen minutes for the server to configure, you should be able to go to http://localhost:8888
If you want to stop your machine, use the AWS console or AWS CLI. Then restart it that way. Copy the hostname from the AWS EC2 console and place it in your Agile_Data_Code_2/.ec2_hostname
file. Now you can run ./ec2_kill_tunnel.sh
to kill the old tunnels and ./ec2_create_tunnel.sh
to create the ssh tunnels again.
Solved the problem described below by manually editing out the argument from
/home/ubuntu/anaconda/lib/python3.5/site-packages/notebook/base/zmqhandlers.py.
The version of ec2_bootstrap.sh that I've accessed today has the jupyter configuration codes commented out.
I am unable to access the notebook at localhost:8888 (or at any other location) without first manually launching a jupyter session in an ssh console and then accessing it after an ssh mapping like this:
ssh -NfL 8888:localhost:8888 <ec2_alias>
When I do, I can launch a notebook, but when I create or run a new nb on the Python 3 kernel, I get an endless recurring series of these messages in the ec2 console in which jupyter is running.
And, of course, the nb will not run any code in this condition.
Manually running in the console the commented out commands from ec2_boostrap.sh does not help. These commands:
jupyter-notebook --generate-config cp /home/ubuntu/Agile_Data_Code_2/jupyter_notebook_config.py /home/ubuntu/.jupyter/ cd /home/ubuntu/Agile_Data_Code_2 jupyter-notebook --ip=0.0.0.0 &