Reputation: 191
I am trying to install Anaconda on Terminal.com. I followed the instructions laid out in the site: https://gist.github.com/iamatypeofwalrus/5183133
The installation was successful. I am able to login to python by typing ipython at the terminal. But when I entered $ ipython notebook
I got the following error message on the terminal
[I 10:35:24.760 NotebookApp] Using existing profile dir: u'/root/.ipython/profile_default'
[I 10:35:24.872 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest
/MathJax.js
[I 10:35:24.891 NotebookApp] The port 8888 is already in use, trying another random port.
Traceback (most recent call last):
File "/root/anaconda/bin/ipython", line 6, in <module>
sys.exit(start_ipython())
File "/opt/ipython/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/opt/ipython/IPython/config/application.py", line 548, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/ipython/IPython/terminal/ipapp.py", line 322, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/ipython/IPython/core/application.py", line 378, in initialize
self.parse_command_line(argv)
File "/opt/ipython/IPython/terminal/ipapp.py", line 317, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/ipython/IPython/config/application.py", line 460, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/ipython/IPython/config/application.py", line 398, in initialize_subcommand
self.subapp.initialize(argv)
File "<string>", line 2, in initialize
File "/opt/ipython/IPython/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/ipython/IPython/html/notebookapp.py", line 829, in initialize
self.init_webapp()
File "/opt/ipython/IPython/html/notebookapp.py", line 718, in init_webapp
self.http_server.listen(port, self.ip)
File "/root/.local/lib/python2.7/site-packages/tornado/tcpserver.py", line 125, in listen
sockets = bind_sockets(port, address=address)
File "/root/.local/lib/python2.7/site-packages/tornado/netutil.py", line 137, in bind_soc
kets
sock.bind(sockaddr)
File "/root/anaconda/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 99] Cannot assign requested address
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
c.Application.verbose_crash=True
Can someone please suggest what am I doing wrong? The port 8888 is open(I gave access to open the port.)
Also, to check if ipython works from a server setup, I created another instance (a new snapshot altogether) exactly doing what was given in the github link given at the first line, I entered the following: $ ipython notebook --profile=nbserver
The server started. But had error when I tried to open on the browser. This is what I see on the terminal
2014-08-18 10:50:54.605 [NotebookApp] Using existing profile dir: u'/root/.ipython/profile_nbserver'
2014-08-18 10:50:54.612 [NotebookApp] Using MathJax from CDN: https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js
2014-08-18 10:50:54.631 [NotebookApp] Serving notebooks from local directory: /root/.ipython/profile_nbserver
2014-08-18 10:50:54.631 [NotebookApp] 0 active kernels
2014-08-18 10:50:54.631 [NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:1111/
2014-08-18 10:50:54.631 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
WARNING:tornado.general:SSL Error on 7 ('10.0.218.170', 55369): [Errno 1] _ssl.c:510: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
And this is what I see on the browser at my local system when I try to open it:
502 Bad Gateway
openresty/1.5.11.1
Thanks, Rouse
Upvotes: 5
Views: 7321
Reputation: 1722
This problem started coming in my Dockerized jupyter notebook. Workaround was to start the notebook with --ip=<actual_IP_of_container>
, which I obtained by popping out of docker container using ctrl+p+q
and then finding out ip with docker container inspect <container_id>
. This dumped plethora of information along with IPAddress
field. After copying this went to container using exec
command and started notebook with command mentioned below.
Then to start notebook the command became: jupyter notebook --ip=<IPAddress> --allow-root
Upvotes: 0
Reputation: 4118
In your config file , add
c.NotebookApp.ip='*'
instead of
c.NotebookApp.ip='your server ip'
this worked for me.
Upvotes: 0
Reputation: 397
I had a similar problem from getting IPython / Jupyter to work from Ubuntu Server, using Anaconda distribution. I was getting
error: [Errno 99] Cannot assign requested address
I was able to fix this with a variation on trtm's answer. My solution was to indicate the IP address of the server in the config file. The location of this config file depends on what version of IPython or Jupyter Notebook that you are using.
The name of the file is ipython_notebook_config.py
or jupyter_notebook_config.py
. This file may not be present. Finding or creating it depends on the version, but the edit is the same.
For IPython / Jupyter version < 4.0
create the file with:
ipython profile create
file location will be: ~/.ipython/profile_default/ipython_notebook_config.py
For Jupyter version >= 4.0
create the config file with:
jupyter notebook --generate-config
file location will be: ~/.jupyter/jupyter_notebook_config.py
To edit the file, add this line. Substitute whatever ip address the server is set up to listen to.
c.NotebookApp.ip = '192.168.1.10'
I was then able to open the notebook by directing my browser to http://192.168.1.10:8888
Upvotes: 6
Reputation: 61
Run ipython profile create
to create the profile, if you didn't created it already.
Open from the profile folder the ipython_notebook_config.py
file and edit/uncomment the IP address the notebook server will listen on.
c.NotebookApp.ip = '127.0.0.1'
Upvotes: 4