Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP ERROR 404 Problem accessing ??. Reason: Couldn't find the specified resource #2022

Open
psychemedia opened this issue Apr 18, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@psychemedia
Copy link

commented Apr 18, 2019

I'm trying to launch OpenRefine in a Docker container via Jupyterhub using the Jupyter docker spawner.

If I launch OpenRefine via the container CMD on port 8888, it seems to start up (Butterfly is launched) but when I am taken to the OpenRefine page proper I get an error:

HTTP ERROR 404
Problem accessing /user/???/. Reason:

    Couldn't find the specified resource

The ??? user is whatever Jupyterhub user (created from the login using the jupyterhub-firstuseauthenticator) I try to log in with.

This same error appeared here: #258 and in that case seemed to be ascribed to a JAVA_HOME setting issue. I tried explicitly setting ENV JAVA_HOME in my OpenRefine Dockerfile but that doesn't seem to help.

FWIW, my OpenRefine Dockerfile is:

#Dockerfile-refine
#Builds on https://github.com/psychemedia/docker-openrefine/blob/master/3.1/Dockerfile
FROM psychemedia/openrefinedemo
ARG RELEASE
CMD openrefine-$RELEASE/refine -i 0.0.0.0 -d /opt/mnt -p 8888

The Jupyterhub setup boradly follows the recipe decribed here — https://github.com/jupyterhub/dockerspawner/tree/master/examples/simple :

#jupyterhub_config.py
#c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'
c.JupyterHub.authenticator_class = 'firstuseauthenticator.FirstUseAuthenticator'

#admin
c.Authenticator.admin_users = { 'admin1' }

# launch with docker
c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'

# we need the hub to listen on all ips when it is in a container
c.JupyterHub.hub_ip = '0.0.0.0'
# the hostname/ip that should be used to connect to the hub
# this is usually the hub container's name
c.JupyterHub.hub_connect_ip = 'jupyterhub'

# pick a docker image. This should have the same version of jupyterhub
# in it as our Hub.
#c.DockerSpawner.image = 'jupyter/base-notebook'
c.DockerSpawner.image = 'test'

# tell the user containers to connect to our docker network
c.DockerSpawner.network_name = 'jupyterhub'

# delete containers when the stop
c.DockerSpawner.remove = True
#Dockerfile-hub
FROM jupyterhub/jupyterhub:0.9.6
COPY requirements.txt /tmp/requirements.txt
RUN python3 -m pip install --no-cache -r /tmp/requirements.txt
COPY jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py
#requirements.txt
dockerspawner
#jupyterhub-dummyauthenticator
jupyterhub-firstuseauthenticator
docker network create jupyterhub

docker pull jupyterhub/jupyterhub:0.9.6
docker pull psychemedia/openrefinedemo

docker build -t hub --file Dockerfile-hub .
docker build -t test --file Dockerfile-refine .

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock --net jupyterhub --name jupyterhub -p8000:8000 hub

Login with anything and a user should be created.

My rationale for trying this is that if it can be made to work, it provides an easy way of setting up a multi-user OpenRefine server. (Note that we could just proxy OpenRefine in a Jupyter notebook container, which does work) but I wanted to see if I could get it working standalone (eg as per this Jupyter discourse thread).

I don't really understand what the Dockerspawner does when it launches a container, eg whether it tries to pass a command or environment vars into the container when it launches it? If it does pass things in, I wonder if they're useful when trying to launch OpenRefine. Or maybe it's trying to mount something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.