I set up k8s in the company(byhind proxy) and installed jupyterhub.
There is a successful execution,
However, the jupyterlab extension cannot be loaded normally because of the following exception message:
(seems to Configuring web-requests to use a proxy · Issue #217 · jupyterhub/oauthenticator · GitHub)
It seems that the web.py program in the tornado package did not consider the proxy situation. Is there any way to overcome it? I tried using pip to install extensions, and just added proxy.ths.
error from this url:
http://10.3.228.175:30485/user/user1/lab/api/extensions?query&page=1&per_page=30&refresh=0&1695462396281
{“message”: “Unhandled error”,
“reason”: null,
“traceback”: “Traceback (most recent call last):\n
File “/usr/local/lib/python3.11/site-packages/tornado/web.py”, line 1786, in _execute\n
result = await result\n
^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/site-packages/jupyterlab/handlers/extension_manager_handler.py”, line 37, in get\n
extensions, last_page = await self.manager.list_extensions(query, page, per_page)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/site-packages/jupyterlab/extensions/manager.py”, line 368, in list_extensions\n
await self.refresh(query, page, per_page)\n
File “/usr/local/lib/python3.11/site-packages/jupyterlab/extensions/manager.py”, line 402, in refresh\n
await self._update_extensions_list(query, page, per_page)\n
File “/usr/local/lib/python3.11/site-packages/jupyterlab/extensions/manager.py”, line 575, in _update_extensions_list\n extensions, last_page = await self.list_packages(query, page, per_page)\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py”, line 201, in list_packages\n
matches = await self.__get_all_extensions()\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py”, line 255, in __get_all_extensions\n self.__all_packages_cache = await self.__throttleRequest(\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py”, line 156, in __throttleRequest\n
data = await current_loop.run_in_executor(None, fn, *args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/concurrent/futures/thread.py”, line 58, in run\n
result = self.fn(*self.args, **self.kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/usr/local/lib/python3.11/xmlrpc/client.py”, line 1122, in call\n
return self.__send(self.__name, args)\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/xmlrpc/client.py”, line 1464, in __request\n
response = self.__transport.request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/usr/local/lib/python3.11/xmlrpc/client.py”, line 1166, in request\n
return self.single_request(host, handler, request_body, verbose)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/xmlrpc/client.py”, line 1178, in single_request\n http_conn = self.send_request(host, handler, request_body, verbose)\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/xmlrpc/client.py”, line 1291, in send_request\n
self.send_content(connection, request_body)\n
File “/usr/local/lib/python3.11/xmlrpc/client.py”, line 1321, in send_content\n
connection.endheaders(request_body)\n
File “/usr/local/lib/python3.11/http/client.py”, line 1281, in endheaders\n
self._send_output(message_body, encode_chunked=encode_chunked)\n
File “/usr/local/lib/python3.11/http/client.py”, line 1041, in _send_output\n
self.send(msg)\n File “/usr/local/lib/python3.11/http/client.py”, line 979, in send\n
self.connect()\n File “/usr/local/lib/python3.11/http/client.py”, line 1451, in connect\n
super().connect()\n File “/usr/local/lib/python3.11/http/client.py”, line 945, in connect\n
self.sock = self._create_connection(\n
^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/socket.py”, line 827, in create_connection\n
for res in getaddrinfo(host, port, 0, SOCK_STREAM):\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
File “/usr/local/lib/python3.11/socket.py”, line 962, in getaddrinfo\n
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
socket.gaierror: [Errno -2] Name or service not known\n”}