jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.62k stars 4.88k forks source link

Error with c.NotebookApp.ip = '*' have to use 0.0.0.0 #4107

Open PhilipMay opened 5 years ago

PhilipMay commented 5 years ago

Hello,

this documentation sais to use c.NotebookApp.ip = '*' to adress all IPs: https://github.com/jupyter/notebook/blob/bee2c389cadd1bfb3f44816b3888275414fa1c15/docs/source/public_server.rst

That is wrong and does not work (at least for me). I had to use c.NotebookApp.ip = '0.0.0.0'

akuzmenkov commented 5 years ago

Hello, for me the same issue with c.NotebookApp.ip = '*'

OS: Ubuntu 18.04 LTS GCP machine: Linux system02 4.15.0-1026-gcp #27-Ubuntu SMP Thu Dec 6 18:27:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Python (anaconda): 3.6

Config: cat ~/.jupyter/jupyter_notebook_config.py c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 5000

Terminal:

(base) alexis@system02:~/fastai$ jupyter-notebook --no-browser --port=5000 [I 02:28:20.286 NotebookApp] [nb_conda_kernels] enabled, 0 kernels found Traceback (most recent call last): File "/home/alexis/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get value = obj._trait_values[self.name] KeyError: 'allow_remote_access'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/alexis/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 864, in _default_allow_remote addr = ipaddress.ip_address(self.ip) File "/home/alexis/anaconda3/lib/python3.6/ipaddress.py", line 54, in ip_address address) ValueError: '' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/alexis/anaconda3/bin/jupyter-notebook", line 11, in sys.exit(main()) File "/home/alexis/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, *kwargs) File "/home/alexis/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "/home/alexis/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error return method(app, args, **kwargs) File "/home/alexis/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1628, in initialize self.init_webapp() File "/home/alexis/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1378, in init_webapp self.jinja_environment_options, File "/home/alexis/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 159, in init default_url, settings_overrides, jinja_env_options) File "/home/alexis/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 252, in init_settings allow_remote_access=jupyter_app.allow_remote_access, File "/home/alexis/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in get return self.get(obj, cls) File "/home/alexis/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get value = self._validate(obj, dynamic_default()) File "/home/alexis/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 867, in _default_allow_remote for info in socket.getaddrinfo(self.ip, self.port, 0, socket.SOCK_STREAM): File "/home/alexis/anaconda3/lib/python3.6/socket.py", line 745, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

kevin-bates commented 5 years ago

This is addressed by #4139.

PhilipMay commented 3 years ago

So can this be closed now? I am not sure...

kevin-bates commented 3 years ago

Hmm, I'm now questioning if I misread #4139 when adding my last comment (sigh).

Are you still not finding that you can set c.NotebookApp.ip = '*'?