defeo / jupyterhub-docker

A configuration for a JupyterHub+DockerSpawner+CASAuthenticator server with Traefik proxy, based on docker-compose
https://opendreamkit.org/2018/10/17/jupyterhub-docker/
MIT License
202 stars 112 forks source link

Filed not found. Node: statistics #11

Closed caviri closed 4 years ago

caviri commented 4 years ago

Hello,

Thanks so much for this and the documentation. I'm trying to setup it up running it in a server in our lab. Nevertheless I'm having two issues:

1) When I run the next warning appears:

(base) kato@dnf-197-82:~/pro/docker/jupyterhub-docker$ docker-compose up 
Creating network "jupyterhub_default" with the default driver
Creating jupyterlab-throaway ... done
Creating jupyterhub          ... done
Creating reverse-proxy       ... done
Attaching to jupyterlab-throaway, jupyterhub, reverse-proxy
jupyterlab-throaway | 
jupyterlab-throaway exited with code 0
reverse-proxy    | 2019/10/21 15:09:22 command traefik error: field not found, node: statistics
jupyterhub       | [I 2019-10-21 15:09:22.490 JupyterHub app:1667] Using Authenticator: jupyterhub.auth.PAMAuthenticator-0.9.3
jupyterhub       | [I 2019-10-21 15:09:22.490 JupyterHub app:1667] Using Spawner: dockerspawner.dockerspawner.DockerSpawner-0.10.0
jupyterhub       | [I 2019-10-21 15:09:22.492 JupyterHub app:1014] Loading cookie_secret from /srv/jupyterhub/jupyterhub_cookie_secret
jupyterhub       | [I 2019-10-21 15:09:22.511 JupyterHub proxy:431] Generating new CONFIGPROXY_AUTH_TOKEN
jupyterhub       | [W 2019-10-21 15:09:22.512 JupyterHub app:1171] No admin users, admin interface will be unavailable.
jupyterhub       | [W 2019-10-21 15:09:22.513 JupyterHub app:1172] Add any administrative users to `c.Authenticator.admin_users` in config.
jupyterhub       | [I 2019-10-21 15:09:22.513 JupyterHub app:1199] Not using whitelist. Any authenticated user will be allowed.
jupyterhub       | [I 2019-10-21 15:09:22.559 JupyterHub app:1849] Hub API listening on http://jupyterhub:8081/hub/
jupyterhub       | [W 2019-10-21 15:09:22.560 JupyterHub proxy:565] Running JupyterHub without SSL.  I hope there is SSL termination happening somewhere else...
jupyterhub       | [I 2019-10-21 15:09:22.560 JupyterHub proxy:567] Starting proxy @ http://:8000
jupyterhub       | 15:09:22.862 - info: [ConfigProxy] Proxying http://*:8000 to (no default)
jupyterhub       | 15:09:22.863 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
jupyterhub       | [I 2019-10-21 15:09:23.553 JupyterHub app:1870] Starting managed service cull_idle
jupyterhub       | [I 2019-10-21 15:09:23.553 JupyterHub service:302] Starting service 'cull_idle': ['python', '/srv/jupyterhub/cull_idle_servers.py', '--timeout=3600']
jupyterhub       | [I 2019-10-21 15:09:23.556 JupyterHub service:114] Spawning python /srv/jupyterhub/cull_idle_servers.py --timeout=3600
jupyterhub       | 15:09:23.567 - info: [ConfigProxy] 200 GET /api/routes 
jupyterhub       | [I 2019-10-21 15:09:23.567 JupyterHub proxy:301] Checking routes
jupyterhub       | [I 2019-10-21 15:09:23.567 JupyterHub proxy:370] Adding default route for Hub: / => http://jupyterhub:8081
jupyterhub       | 15:09:23.569 - info: [ConfigProxy] Adding route / -> http://jupyterhub:8081
jupyterhub       | 15:09:23.570 - info: [ConfigProxy] 201 POST /api/routes/ 
jupyterhub       | [I 2019-10-21 15:09:23.570 JupyterHub app:1906] JupyterHub is now running at http://:8000
jupyterhub       | [I 2019-10-21 15:09:23.701 JupyterHub log:158] 200 GET /hub/api/users (cull_idle@192.168.48.2) 8.71ms
reverse-proxy    | 2019/10/21 15:09:23 command traefik error: field not found, node: statistics
reverse-proxy exited with code 1

In any case when I try to access to the IP that I defined in the .env as the HOST it turns back an ERR_CONECTION_REFUSED.

Any idea of what could be wrong? I generated TLS certificates and place it correctly. Thanks in advance!

defeo commented 4 years ago

Hi,

This error is strange:

reverse-proxy    | 2019/10/21 15:09:22 command traefik error: field not found, node: statistics

have you modified docker-compose.yml?

caviri commented 4 years ago

Yes, I modified it minimally. Changing the path where my certificates are:

      - /private/etc/certs:/etc/certs

I clone again the repo and the same error appears.

Maybe a noob question but I'm not familiarised with traefik, can I use my actual IP in HOST?

# The server where this JupyterHub server is hosted
HOST=XX.XX.XX.31
defeo commented 4 years ago

Yes, I modified it minimally. Changing the path where my certificates are:

      - /private/etc/certs:/etc/certs

I don't think it is related to this.

Maybe a noob question but I'm not familiarised with traefik, can I use my actual IP in HOST?

# The server where this JupyterHub server is hosted
HOST=XX.XX.XX.31

Yes. That means you will type your IP address in the browser address bar. Again, it doesn't seem related to this.

defeo commented 4 years ago

Oh, wait, stupid me!

The traefik version is not pinned in docker-compose.yml! There is a known issue with Traefik 2.0, see #9. The quick solution is to pin down traefik to some 1.x version, like this:

    image: traefik:1.7

The long term solution is to update this configuration to Traefik 2.0. I shall look into that at some point.

caviri commented 4 years ago

Yes! Now it works! Thanks so much for your help!