Jupyterhub batchsawner permission error

43 views
Skip to first unread message

Evan Clark

unread,
Apr 20, 2018, 10:55:24 AM4/20/18
to Project Jupyter
When attempting to use batchspawner with slurm I get the following error and I'm not sure how to resolve it. It is similar to the XDG_Environment variable issue some users have reported, however it is inserting the proper UID for the user that is spawning a notebook. The run folder with the proper UID does have read and execute permissions for the individual user so that doesn't appear to be the issue either.

  File "/var/web_services/galaxy/jupyter_conda/bin/jupyterhub-singleuser", line 6, in <module>
    main()
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/jupyterhub/singleuser.py", line 455, in main
    return SingleUserNotebookApp.launch_instance(argv)
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1505, in initialize
    self.init_configurables()
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1209, in init_configurables
    connection_dir=self.runtime_dir,
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/jupyter_core/application.py", line 99, in _runtime_dir_default
    ensure_dir_exists(rd, mode=0o700)
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/site-packages/jupyter_core/utils/__init__.py", line 13, in ensure_dir_exists
    os.makedirs(path, mode=mode)
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/var/web_services/galaxy/jupyter_conda/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/run/user/1261'

Thomas Kluyver

unread,
Apr 20, 2018, 4:23:53 PM4/20/18
to Project Jupyter
I'm not familiar with how Slurm works, but I'd guess that it's running the job in a context which doesn't have access to that directory; either it's not really running as that user, or it's running after the user has 'logged out', so the directory has been deleted. The simplest workaround is to unset the XDG_RUNTIME_DIR environment variable; it should use a fallback directory instead.

--
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+unsubscribe@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/cd0dc951-5df0-4c03-8c8a-f5cb7aded66e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Evan Clark

unread,
Apr 20, 2018, 6:33:22 PM4/20/18
to jup...@googlegroups.com
I did unset that variable however, I still get the same error. The
directories still exist on the servers where the tasks run from as well.

Thomas Kluyver wrote:
> running after the user has 'l

--


Carol Willing

unread,
Apr 20, 2018, 6:42:38 PM4/20/18
to Project Jupyter
Hi Evan,

Which version of batchspawner are you using? https://github.com/jupyterhub/batchspawner/releases

Feel free to open an issue at the batchspawner or jupyterhub repo and we can continue troubleshooting there too :-)

Carol

Evan Clark

unread,
Apr 20, 2018, 6:46:27 PM4/20/18
to jup...@googlegroups.com
I'm using batchspawner==0.8.0rc0. I can open an issue on the github repo.

April 20, 2018 6:42 PM
Hi Evan,

Which version of batchspawner are you using? https://github.com/jupyterhub/batchspawner/releases

Feel free to open an issue at the batchspawner or jupyterhub repo and we can continue troubleshooting there too :-)

Carol

On Friday, April 20, 2018 at 3:33:22 PM UTC-7, Evan Clark wrote:
--
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.

For more options, visit https://groups.google.com/d/optout.
April 20, 2018 4:23 PM
I'm not familiar with how Slurm works, but I'd guess that it's running the job in a context which doesn't have access to that directory; either it's not really running as that user, or it's running after the user has 'logged out', so the directory has been deleted. The simplest workaround is to unset the XDG_RUNTIME_DIR environment variable; it should use a fallback directory instead.


--
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.

For more options, visit https://groups.google.com/d/optout.
April 20, 2018 10:55 AM
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages