# 404 page not found

**URL:** <https://discourse.jupyter.org/t/404-page-not-found/21615>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** jupyterhub, help-wanted\
**Created:** [September 25, 2023, 3:14pm UTC](https://discourse.jupyter.org/t/404-page-not-found/21615 "2023-09-25T15:14:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash09](https://avatars.discourse-cdn.com/v4/letter/y/6de8d8/32.png) [@yash09](https://discourse.jupyter.org/u/yash09)\
**Post date:** [September 25, 2023, 3:14pm UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/1 "2023-09-25T15:14:33Z")

</div>

Hi,  
I am trying to install jupyterhub using z2jh on top of k8s cluster. I want to have custom user environment with some default library installed. hub is able to spawn the user specific pod with customized docker image but proxy is unable to route the user to specific pod , on the browser it shows “404 page not found”. which is due to missing of frontend js and css files.

Config.yaml:

singleuser:  
cloudMetadata:  
blockWithIptables: false  
image:  
name: “\<repo\_name\>/custom\_ide”  
tag: “1.34”  
fsGid: 0  
uid: 0  
startTimeout: 600  
storage:  
homeMountPath: /home/file-store/jupyter/  
cmd: null  
defaultUrl: “/lab”  
extraEnv:  
JUPYTERHUB\_SINGLEUSER\_APP: “jupyter\_server.serverapp.ServerApp”  
hub:  
podSecurityContext:  
fsGroup: 0  
containerSecurityContext:  
runAsUser: 0  
runAsGroup: 0

Dockerfile:

FROM ubuntu:20.04  
ENV DEBIAN\_FRONTEND=noninteractive

RUN pip install jupyter-server jupyter\_client jupyterhub jupyterlab  
RUN pip install feast==0.22.0 psycopg2-binary boto3 minio scikit-learn==1.1.3  
RUN export PROTOCOL\_BUFFERS\_PYTHON\_IMPLEMENTATION=python  
RUN pip install protobuf==3.19 mlflow==1.27.0  
RUN mkdir /home/file-store   
&& mkdir /home/file-store/jupyter   
&& mkdir /ssl  
WORKDIR /home/file-store/jupyter  
EXPOSE 8888  
RUN apt-get install -y libpixman-1-dev libcairo2-dev openssl libgit2-dev

COPY . .

CMD [“jupyter”,“lab”, “–ip=\*”,“–allow-root”,“–PasswordIdentityProvider.hashed\_password=‘’”,“–IdentityProvider.token=‘’”]

User pod logs:  
[I 2023-09-25 13:09:36.564 ServerApp] Serving notebooks from local directory: /home/file-store/jupyter  
[I 2023-09-25 13:09:36.564 ServerApp] Jupyter Server 2.7.3 is running at:  
[I 2023-09-25 13:09:36.564 ServerApp] [http://localhost:8888/lab](http://localhost:8888/lab)  
[I 2023-09-25 13:09:36.564 ServerApp] [http://127.0.0.1:8888/lab](http://127.0.0.1:8888/lab)  
[I 2023-09-25 13:09:36.564 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).  
[W 2023-09-25 13:09:36.587 ServerApp] No web browser found: Error(‘could not locate runnable browser’).  
[I 2023-09-25 13:09:36.716 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server  
[I 2023-09-25 13:09:37.723 ServerApp] 302 GET /user// (@10.244.2.1) 0.61ms  
[I 2023-09-25 13:09:37.894 ServerApp] 302 GET /user// (@10.244.2.1) 0.49ms  
[W 2023-09-25 13:09:38.187 ServerApp] Clearing invalid/expired login cookie username-10-1-0-6-7000  
[W 2023-09-25 13:09:38.198 ServerApp] 404 GET /user/ ([52754ea674ee436eba220a41b610422a@10.244.2.1](mailto:52754ea674ee436eba220a41b610422a@10.244.2.1)) 11.80ms referer=http://\<internal\_ip\>:7000/hub/spawn-pending/

As per my understanding, proxy routes the user to \<external\_address\>/user/ to the \<user\_pod\_Address\> but my jupyterlab inside pod is running on the \<user\_pod\_address\>/lab not on \<user\_pod\_Address\>/ so it is unable to route. Can anyone help how I configure proxy to route to /lab endpoint or else how i can run my lab inside pod on /user/

---

<div class="post-metadata">

**Author:** ![mahendrapaipuri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/mahendrapaipuri/32/6800_2.png) [@mahendrapaipuri](https://discourse.jupyter.org/u/mahendrapaipuri)\
**Post date:** [September 26, 2023, 6:51am UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/2 "2023-09-26T06:51:02Z")

</div>

I suppose you should spin a single user server using `jupyterhub-singleuser` executable and not `jupyter lab`. Check [docker-stacks](https://github.com/jupyter/docker-stacks/tree/main/images/base-notebook) base image `CMD` directive.

---

<div class="post-metadata">

**Author:** ![yash09](https://avatars.discourse-cdn.com/v4/letter/y/6de8d8/32.png) [@yash09](https://discourse.jupyter.org/u/yash09)\
**Post date:** [September 26, 2023, 12:27pm UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/3 "2023-09-26T12:27:17Z")

</div>

Using start-singleuser.sh shows the dependency of start.sh file which does not exists in base-notebook image. can u help with what this file does & how can i use it in my custom image

---

<div class="post-metadata">

**Author:** ![mahendrapaipuri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/mahendrapaipuri/32/6800_2.png) [@mahendrapaipuri](https://discourse.jupyter.org/u/mahendrapaipuri)\
**Post date:** [September 26, 2023, 12:56pm UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/4 "2023-09-26T12:56:46Z")

</div>

Here is the [start.sh](https://github.com/jupyter/docker-stacks/blob/aa2403a808d31222769511bbd9248a32cb230073/images/docker-stacks-foundation/start.sh) script. But I would suggest you to use one of the [single user images](https://hub.docker.com/r/jupyterhub/singleuser/tags) based on your JupyterHub version as the base image for your custom image so that all necessary files will be available.

---

<div class="post-metadata">

**Author:** ![yash09](https://avatars.discourse-cdn.com/v4/letter/y/6de8d8/32.png) [@yash09](https://discourse.jupyter.org/u/yash09)\
**Post date:** [September 26, 2023, 1:29pm UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/5 "2023-09-26T13:29:01Z")

</div>

Actually the thing, I have my environment based python version 3.8 while I think docker singleuser image have by default python version 3.11.

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [September 26, 2023, 4:44pm UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/6 "2023-09-26T16:44:07Z")

</div>

Hve you tested your deployment with one of the standard [docker-stacks images](https://jupyter-docker-stacks.readthedocs.io/en/latest/)? That will help to rule out any other JupyterHub or K8s issues.

---

<div class="post-metadata">

**Author:** ![yash09](https://avatars.discourse-cdn.com/v4/letter/y/6de8d8/32.png) [@yash09](https://discourse.jupyter.org/u/yash09)\
**Post date:** [September 27, 2023, 5:09am UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/7 "2023-09-27T05:09:26Z")

</div>

I have tried base-notebook, but by default it provide python 3.11. Can you help me with how can customize or use lower version of image so that I can have python 3.8 installed on it

---

<div class="post-metadata">

**Author:** ![mahendrapaipuri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/mahendrapaipuri/32/6800_2.png) [@mahendrapaipuri](https://discourse.jupyter.org/u/mahendrapaipuri)\
**Post date:** [September 27, 2023, 7:27am UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/8 "2023-09-27T07:27:28Z")

</div>

If you want to use a different version of python, you need to use base-notebook docker image contents and build a image yourself. In the [docker-stacks](https://github.com/jupyter/docker-stacks/) repo, you have all necessary files and Dockerfile available. Use them to build your own custom image.

---

<div class="post-metadata">

**Author:** ![yash09](https://avatars.discourse-cdn.com/v4/letter/y/6de8d8/32.png) [@yash09](https://discourse.jupyter.org/u/yash09)\
**Post date:** [September 27, 2023, 3:22pm UTC](https://discourse.jupyter.org/t/404-page-not-found/21615/9 "2023-09-27T15:22:09Z")

</div>

Thanks… Have done it with same approach… Its works now
