Thank you for your support and guidance.
After resolving LDAP Server connectivity error, the permission issue is popping up
hub.yaml as per the below link
wget https://gist.githubusercontent.com/manics/c4bcf53a210d444db9e64db7673e8580/raw/d07ed5f30c4dbc3f1a632899f2fe58b98799b674/zero-to-jupyterhub-config.yml
Thank You
Atul
Only update the hub section for “c.KubeSpawner.cmd”
jupyterhub/k8s-singleuser-sample 0.9.0 854de563978d 2 months ago 676MB
jupyterhub/k8s-image-awaiter 0.9.0 7b10713c8231 2 months ago 4.15MB
jupyterhub/k8s-network-tools 0.9.0 00c5e7b520c2 2 months ago 5.62MB
jupyterhub/k8s-hub 0.9.0 2f82dac5c3ab 2 months ago 632MB
#Jupyterhub Master And LDAP Client
user5@server11:~$ id
uid=1004(user5) gid=1004(user5) groups=1004(user5)
user5@server11:~$
#Test Case 1: c.KubeSpawner.cmd = ['/usr/local/bin/start.sh', 'jupyterhub-singleuser']
Set username to: user5
Setting CWD to /home/user5/
Set user user5 UID:GID to: 1004:100
Executing the command: jupyterhub-singleuser --ip=0.0.0.0 --port=8888 --NotebookApp.default_url=/lab --debug
[D 2020-06-17 10:56:40.970 SingleUserNotebookApp application:178] Searching ['/home/user5', '/home/user5/.jupyter', '/opt/conda/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 2020-06-17 10:56:40.971 SingleUserNotebookApp application:556] Looking for jupyter_config in /etc/jupyter
[D 2020-06-17 10:56:40.971 SingleUserNotebookApp application:556] Looking for jupyter_config in /usr/local/etc/jupyter
[D 2020-06-17 10:56:40.971 SingleUserNotebookApp application:556] Looking for jupyter_config in /opt/conda/etc/jupyter
[D 2020-06-17 10:56:40.971 SingleUserNotebookApp application:556] Looking for jupyter_config in /home/user5/.jupyter
[D 2020-06-17 10:56:40.971 SingleUserNotebookApp application:556] Looking for jupyter_config in /home/user5
[D 2020-06-17 10:56:40.972 SingleUserNotebookApp application:556] Looking for jupyter_notebook_config in /etc/jupyter
[D 2020-06-17 10:56:40.973 SingleUserNotebookApp application:578] Loaded config file: /etc/jupyter/jupyter_notebook_config.py
[D 2020-06-17 10:56:40.973 SingleUserNotebookApp application:556] Looking for jupyter_notebook_config in /usr/local/etc/jupyter
[D 2020-06-17 10:56:40.973 SingleUserNotebookApp application:556] Looking for jupyter_notebook_config in /opt/conda/etc/jupyter
[D 2020-06-17 10:56:40.973 SingleUserNotebookApp application:578] Loaded config file: /opt/conda/etc/jupyter/jupyter_notebook_config.json
[D 2020-06-17 10:56:40.973 SingleUserNotebookApp application:556] Looking for jupyter_notebook_config in /home/user5/.jupyter
[D 2020-06-17 10:56:40.973 SingleUserNotebookApp application:556] Looking for jupyter_notebook_config in /home/user5
[W 2020-06-17 10:56:40.975 SingleUserNotebookApp configurable:168] Config option `open_browser` not recognized by `SingleUserNotebookApp`. Did you mean `browser`?
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py", line 528, in get
value = obj._trait_values[self.name]
KeyError: 'runtime_dir'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/jupyterhub-singleuser", line 10, in <module>
sys.exit(main())
File "/opt/conda/lib/python3.7/site-packages/jupyterhub/singleuser.py", line 660, in main
return SingleUserNotebookApp.launch_instance(argv)
File "/opt/conda/lib/python3.7/site-packages/jupyter_core/application.py", line 268, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 663, in launch_instance
app.initialize(argv)
File "/opt/conda/lib/python3.7/site-packages/jupyterhub/singleuser.py", line 558, in initialize
return super().initialize(argv)
File "</opt/conda/lib/python3.7/site-packages/decorator.py:decorator-gen-7>", line 2, in initialize
File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/notebook/notebookapp.py", line 1766, in initialize
self.init_configurables()
File "/opt/conda/lib/python3.7/site-packages/notebook/notebookapp.py", line 1380, in init_configurables
connection_dir=self.runtime_dir,
File "/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py", line 556, in __get__
return self.get(obj, cls)
File "/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "/opt/conda/lib/python3.7/site-packages/jupyter_core/application.py", line 99, in _runtime_dir_default
ensure_dir_exists(rd, mode=0o700)
File "/opt/conda/lib/python3.7/site-packages/jupyter_core/utils/__init__.py", line 13, in ensure_dir_exists
os.makedirs(path, mode=mode)
File "/opt/conda/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/user5/.local'
#Test Case 2: c.KubeSpawner.cmd = ['/usr/local/bin/start.sh', 'jupyter-labhub']
Set username to: user5
Setting CWD to /home/user5/
Set user user5 UID:GID to: 1004:100
Executing the command: jupyter-labhub --ip=0.0.0.0 --port=8888 --NotebookApp.default_url=/lab --debug
[D 2020-06-17 10:59:45.246 SingleUserLabApp application:178] Searching ['/home/user5', '/home/user5/.jupyter', '/opt/conda/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 2020-06-17 10:59:45.247 SingleUserLabApp application:556] Looking for jupyter_config in /etc/jupyter
[D 2020-06-17 10:59:45.247 SingleUserLabApp application:556] Looking for jupyter_config in /usr/local/etc/jupyter
[D 2020-06-17 10:59:45.247 SingleUserLabApp application:556] Looking for jupyter_config in /opt/conda/etc/jupyter
[D 2020-06-17 10:59:45.247 SingleUserLabApp application:556] Looking for jupyter_config in /home/user5/.jupyter
[D 2020-06-17 10:59:45.247 SingleUserLabApp application:556] Looking for jupyter_config in /home/user5
[D 2020-06-17 10:59:45.248 SingleUserLabApp application:556] Looking for jupyter_notebook_config in /etc/jupyter
[D 2020-06-17 10:59:45.248 SingleUserLabApp application:578] Loaded config file: /etc/jupyter/jupyter_notebook_config.py
[D 2020-06-17 10:59:45.248 SingleUserLabApp application:556] Looking for jupyter_notebook_config in /usr/local/etc/jupyter
[D 2020-06-17 10:59:45.249 SingleUserLabApp application:556] Looking for jupyter_notebook_config in /opt/conda/etc/jupyter
[D 2020-06-17 10:59:45.249 SingleUserLabApp application:578] Loaded config file: /opt/conda/etc/jupyter/jupyter_notebook_config.json
[D 2020-06-17 10:59:45.249 SingleUserLabApp application:556] Looking for jupyter_notebook_config in /home/user5/.jupyter
[D 2020-06-17 10:59:45.249 SingleUserLabApp application:556] Looking for jupyter_notebook_config in /home/user5
[W 2020-06-17 10:59:45.251 SingleUserLabApp configurable:168] Config option `open_browser` not recognized by `SingleUserLabApp`. Did you mean `browser`?
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py", line 528, in get
value = obj._trait_values[self.name]
KeyError: 'runtime_dir'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/jupyter-labhub", line 10, in <module>
sys.exit(main())
File "/opt/conda/lib/python3.7/site-packages/jupyterlab/labhubapp.py", line 42, in main
return SingleUserLabApp.launch_instance(argv)
File "/opt/conda/lib/python3.7/site-packages/jupyter_core/application.py", line 268, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 663, in launch_instance
app.initialize(argv)
File "/opt/conda/lib/python3.7/site-packages/jupyterhub/singleuser.py", line 558, in initialize
return super().initialize(argv)
File "</opt/conda/lib/python3.7/site-packages/decorator.py:decorator-gen-7>", line 2, in initialize
File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/notebook/notebookapp.py", line 1766, in initialize
self.init_configurables()
File "/opt/conda/lib/python3.7/site-packages/notebook/notebookapp.py", line 1380, in init_configurables
connection_dir=self.runtime_dir,
File "/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py", line 556, in __get__
return self.get(obj, cls)
File "/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "/opt/conda/lib/python3.7/site-packages/jupyter_core/application.py", line 99, in _runtime_dir_default
ensure_dir_exists(rd, mode=0o700)
File "/opt/conda/lib/python3.7/site-packages/jupyter_core/utils/__init__.py", line 13, in ensure_dir_exists
os.makedirs(path, mode=mode)
File "/opt/conda/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/user5/.local'
#Describe OutPut
Name: jupyter-user5
Namespace: jhub
Priority: 0
Node: server11/192.168.126.221
Start Time: Wed, 17 Jun 2020 16:53:33 +0530
Labels: app=jupyterhub
chart=jupyterhub-0.9.0
component=singleuser-server
heritage=jupyterhub
hub.jupyter.org/network-access-hub=true
release=jhub
Annotations: cni.projectcalico.org/podIP: 172.31.0.182/32
hub.jupyter.org/username: user5
Status: Running
IP: 172.31.0.182
Init Containers:
block-cloud-metadata:
Container ID: docker://e90e6c230368570dbc5dc24e374d0581632329950f7908eaf555ff6365cdfc23
Image: jupyterhub/k8s-network-tools:0.9.0
Image ID: docker-pullable://jupyterhub/k8s-network-tools@sha256:120056e52fef309132697d405683a91ce6e2e484b67b7fd4bd7ca5e7d1937a34
Port: <none>
Host Port: <none>
Command:
iptables
-A
OUTPUT
-d
169.254.169.254
-j
DROP
State: Terminated
Reason: Completed
Exit Code: 0
Started: Wed, 17 Jun 2020 16:53:34 +0530
Finished: Wed, 17 Jun 2020 16:53:34 +0530
Ready: True
Restart Count: 0
Environment: <none>
Mounts: <none>
Containers:
notebook:
Container ID: docker://6b27dde8ff4abbf817c056e06c8e81b40bd61011055963fa8cb1eea147512952
Image: jupyterhub/k8s-singleuser-sample:0.9.0
Image ID: docker-pullable://jupyterhub/k8s-singleuser-sample@sha256:a500eeb50bd20c29478cfaa6cc3699232bf42534d673ff7474ebc3cab37d02fb
Port: 8888/TCP
Host Port: 0/TCP
Args:
/usr/local/bin/start.sh
jupyterhub-singleuser
--ip=0.0.0.0
--port=8888
--debug
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 17 Jun 2020 16:53:37 +0530
Finished: Wed, 17 Jun 2020 16:53:38 +0530
Ready: False
Restart Count: 1
Environment:
NB_UID: 1004
NB_GID: 1004
NB_USER: user5
NB_GROUP: user5
JUPYTERHUB_API_TOKEN: 59a1b0ef5930412a8677c7b184af2e67
JPY_API_TOKEN: 59a1b0ef5930412a8677c7b184af2e67
JUPYTERHUB_ADMIN_ACCESS: 1
JUPYTERHUB_CLIENT_ID: jupyterhub-user-user5
JUPYTERHUB_HOST:
JUPYTERHUB_OAUTH_CALLBACK_URL: /user/user5/oauth_callback
JUPYTERHUB_USER: user5
JUPYTERHUB_SERVER_NAME:
JUPYTERHUB_API_URL: http://10.111.186.45:8081/hub/api
JUPYTERHUB_ACTIVITY_URL: http://10.111.186.45:8081/hub/api/users/user5/activity
JUPYTERHUB_BASE_URL: /
JUPYTERHUB_SERVICE_PREFIX: /user/user5/
JUPYTER_IMAGE_SPEC: jupyterhub/k8s-singleuser-sample:0.9.0
JUPYTER_IMAGE: jupyterhub/k8s-singleuser-sample:0.9.0
Mounts:
/home/user5 from nfs-home-pvc (rw)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
nfs-home-pvc:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: nfs-home-pvc
ReadOnly: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: hub.jupyter.org/dedicated=user:NoSchedule
hub.jupyter.org_dedicated=user:NoSchedule
node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 9s jhub-user-scheduler Successfully assigned jhub/jupyter-user5 to server11
Normal Pulled 8s kubelet, server11 Container image "jupyterhub/k8s-network-tools:0.9.0" already present on machine
Normal Created 8s kubelet, server11 Created container block-cloud-metadata
Normal Started 8s kubelet, server11 Started container block-cloud-metadata
Normal Pulled 5s (x2 over 7s) kubelet, server11 Container image "jupyterhub/k8s-singleuser-sample:0.9.0" already present on machine
Normal Created 5s (x2 over 7s) kubelet, server11 Created container notebook
Normal Started 5s (x2 over 7s) kubelet, server11 Started container notebook
Warning BackOff 2s (x2 over 3s) kubelet, server11 Back-off restarting failed container