I have anaconda version 4.9.2 and Jupyter lab version 2.2.9 installed on my Ubuntu 20.10 personal server. Until about two months ago, I was able to remotely start jupyter lab on my remote server (accessed through MobaXterm). I used this command:
jupyter lab --no-browser --port=40000 --ip=$HOSTNAME
I then used to forward this port to a local port 8080 in MobaXterm, and open the local port on my working laptop.
After resetting the whole setup due to a move, I found that I am not able to forward the local port anymore. I get this error message:
Traceback (most recent call last):
File "/home/kvemuri/anaconda3/bin/jupyter-lab", line 10, in <module>
sys.exit(main())
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/jupyter_core/application.py", line 254, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 844, in launch_instance
app.initialize(argv)
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in inner
return method(app, *args, **kwargs)
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 2085, in initialize
self.init_webapp()
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1757, in init_webapp
success = self._bind_http_server()
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1764, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1790, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/home/kvemuri/anaconda3/lib/python3.7/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 22] Invalid argument
I am not too well-versed with the inner workings of port forwarding, I blindly followed the instructions on this page: https://wiki.fysik.dtu.dk/gpaw/summerschools/summerschool18/accesswin.html
The solution in this question provided some clue, but I am not sure how to go about 'binding the socket to a local network interface on same network', if that is even what I need to do. Any thoughts?