jupyter notebook에서 Cannot assign requested address 문제 해결하기

 


Traceback (most recent call last):                                                                                                                                                                                            
  File "/usr/local/bin/jupyter-notebook", line 11, in <module>                                                                                                                                                                
    sys.exit(main())                                                                                                                                                                                                          
  File "/usr/local/lib/python3.4/dist-packages/jupyter_core/application.py", line 267, in launch_instance                                                                                                                     
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)                                                                                                                                                        
  File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance                                                                                                                 
    app.initialize(argv)                                                                                                                                                                                                      
  File "<decorator-gen-7>", line 2, in initialize                                                                                                                                                                             
  File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error                                                                                                               
    return method(app, *args, **kwargs)                                                                                                                                                                                       
  File "/usr/local/lib/python3.4/dist-packages/notebook/notebookapp.py", line 1296, in initialize                                                                                                                             
    self.init_webapp()                                                                                                                                                                                                        
  File "/usr/local/lib/python3.4/dist-packages/notebook/notebookapp.py", line 1120, in init_webapp                                                                                                                            
    self.http_server.listen(port, self.ip)                                                                                                                                                                                    
  File "/usr/local/lib/python3.4/dist-packages/tornado/tcpserver.py", line 142, in listen                                                                                                                                     
    sockets = bind_sockets(port, address=address)                                                                                                                                                                             
  File "/usr/local/lib/python3.4/dist-packages/tornado/netutil.py", line 197, in bind_sockets                                                                                                                                 
    sock.bind(sockaddr)                                                                                                                                                                                                       
OSError: [Errno 99] Cannot assign requested address 

jupyter 를 docker를 이용하여 구동할 때, Cannot assign requested address 문제가 생겼다. 

port 문제인 것 같은데, 아래의 명령어를 통해 해결했다. 

jupyter notebook --ip=0.0.0.0 --port=8080