JupyterHub not writing to log file

2,872 views
Skip to first unread message

Michael Gilbert

unread,
Jul 9, 2015, 7:12:57 PM7/9/15
to jup...@googlegroups.com
Hello everyone,

I apologize if this question has a readily available answer somewhere, but I've been looking for a solution for a while without any luck. I have jupyterhub working and can create and run notebooks without any issue. My problem is that I can't seem to get jupyterhub to write to the log file that I entered in the config file. Here are all of the lines I have in my jupyterhub_config.py file:

c = get_config()
c.JupyterHub.hub_ip = '172.16.2.1'
c.JupyterHub.proxy_api_port = 5432
c.JupyterHub.hub_port = 54321
c.JupyterHub.port = 443
c.JupyterHub.proxy_api_ip = '172.16.2.1'
c.JupyterHub.log_file = '/var/log/jupyterhub.log'

I'm logged in as root when I run jupyterhub, so permissions shouldn't be an issue. When I run jupyterhub, this is what I get:

[root@head jupyterhub]# jupyterhub --debug -f /etc/jupyterhub/jupyterhub_config.py
[D 2015-07-09 15:56:54.495 JupyterHub application:250] Config changed:
[D 2015-07-09 15:56:54.497 JupyterHub application:251] {'JupyterHub': {'config_file': '/etc/jupyterhub/jupyterhub_config.py', 'log_level': 10}}
[D 2015-07-09 15:56:54.497 JupyterHub application:528] Attempting to load config file /etc/jupyterhub/jupyterhub_config.py in path None
[D 2015-07-09 15:56:54.497 JupyterHub application:531] Attempting to load config file /etc/jupyterhub/jupyterhub_config.json in path None
[D 2015-07-09 15:56:54.498 JupyterHub application:548] Loaded config file: /etc/jupyterhub/jupyterhub_config.py
[D 2015-07-09 15:56:54.502 JupyterHub application:250] Config changed:
[D 2015-07-09 15:56:54.502 JupyterHub application:251] {'JupyterHub': {'log_file': '/var/log/jupyterhub.log', 'log_level': 10, 'proxy_api_port': 5432, 'config_file': '/etc/jupyterhub/jupyterhub_config.py', 'proxy_api_ip': '172.16.2.1', 'hub_port': 54321, 'hub_ip': '172.16.2.1', 'port': 443}}
[I 2015-07-09 15:56:54.503 JupyterHub app:518] Loading cookie_secret from /home/mkg52/Jupyter/jupyterhub/jupyterhub/jupyterhub_cookie_secret
[D 2015-07-09 15:56:54.504 JupyterHub app:545] Connecting to db: sqlite:///jupyterhub.sqlite
[W 2015-07-09 15:56:54.654 JupyterHub app:256]
    Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
    Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.

[I 2015-07-09 15:56:54.880 JupyterHub app:619] Not using whitelist. Any authenticated user will be allowed.
[D 2015-07-09 15:56:54.884 JupyterHub app:695] Loaded users:
       mkg52 admin
[I 2015-07-09 15:56:54.898 JupyterHub app:997] Hub API listening on http://172.16.2.1:54321/hub/
[I 2015-07-09 15:56:54.907 JupyterHub app:754] Starting proxy @ http://*:443/
[D 2015-07-09 15:56:54.907 JupyterHub app:755] Proxy cmd: ['configurable-http-proxy', '--ip', '', '--port', '443', '--api-ip', '172.16.2.1', '--api-port', '5432', '--default-target', 'http://172.16.2.1:54321']
15:56:55.267 - info: [ConfigProxy] Proxying http://*:443 to http://172.16.2.1:54321
15:56:55.275 - info: [ConfigProxy] Proxy API at http://172.16.2.1:5432/api/routes
[D 2015-07-09 15:56:55.374 JupyterHub app:783] Proxy started and appears to be up
[I 2015-07-09 15:56:55.383 JupyterHub app:1020] JupyterHub is now running at http://localhost:443/
[D 2015-07-09 16:01:55.443 JupyterHub orm:157] Fetching GET http://172.16.2.1:5432/api/routes

Then when I do a few things like create and run a couple of notebooks, I checked the the log file and it was never even created:

[root@head jupyterhub]# cat /var/log/jupyterhub.log
cat: /var/log/jupyterhub.log: No such file or directory
[root@head jupyterhub]# ls /var/log |grep "jupyterhub*"
[root@head jupyterhub]#

So I'm not sure how to actually enable the logging. I even tried the --debug option, but as you can see above, it still says the log level is 10, not 0 like it should be. Does anyone have any ideas?

Thank you for your help,

Mike

MinRK

unread,
Jul 10, 2015, 12:54:35 AM7/10/15
to jup...@googlegroups.com

Sorry about the confusion: It should be

c.JupyterHub.extra_log_file = '/var/log/jupyterhub.log'

-MinRK


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/d2db3d59-babc-4715-9848-33e038561a98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Gilbert

unread,
Jul 10, 2015, 1:55:20 PM7/10/15
to jup...@googlegroups.com
Thank you!
Reply all
Reply to author
Forward
0 new messages