Having multiple users be able to log into jupyterhub

2,392 views
Skip to first unread message

Grant Herman

unread,
Dec 14, 2015, 3:54:45 PM12/14/15
to Project Jupyter
So I am relatively new to Jupyterhub, so I apologize for my ignorance. 

I have set up Jupyterhub and I am able to log in with the system user that I am logged in to my computer with. However, when I tried to log in with another system user name I got this error:

[I 2015-12-14 15:22:32.833 JupyterHub spawner:363] Spawning jupyterhub-singleuser --user=grant --port=49311 --cookie-name=jupyter-hub-token-grant --base-url=/user/grant --hub-prefix=/hub/ --hub-api-url=http://localhost:8081/hub/api --ip=localhost


Failed to set groups [Errno 1] Operation not permitted


[E 2015-12-14 15:22:32.848 JupyterHub orm:382] Unhandled error starting grant's server: Exception occurred in preexec_fn.


How can I allow for multiple users to have access to jupyterhub, even if jupyterhub is not being started on that user's account?

Brian Granger

unread,
Dec 14, 2015, 3:57:46 PM12/14/15
to Project Jupyter
I think the issue may be the following.

What user did you start jupyterhub as? To log in as other users, you
would need to start it as root.

The other thing to look at is the Authenticator.whitelist
configuration setting. It either needs to be empty (allow all users)
or contain the set of usernames that should be allowed.

Let us know if that helps.
> --
> 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/447a58a4-84f9-49a0-855e-2cc295c7ab35%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

Grant Herman

unread,
Dec 14, 2015, 4:00:27 PM12/14/15
to Project Jupyter, elli...@gmail.com
That is what I thought! ok thank you!!

Grant Herman

unread,
Dec 14, 2015, 4:11:01 PM12/14/15
to Project Jupyter, elli...@gmail.com
Hey so I made all of this changes and I still and getting a 500 internal error. Do you know what else it could be?


On Monday, December 14, 2015 at 3:57:46 PM UTC-5, ellisonbg wrote:

Grant Herman

unread,
Dec 14, 2015, 4:12:18 PM12/14/15
to Project Jupyter, elli...@gmail.com
I have also been getting this error
 
/usr/local/lib/python3.4/site-packages/IPython/utils/traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.

  warn("IPython.utils.traitlets has moved to a top-level traitlets package.")


when jupyterhub starts, could that mess things up? 

MinRK

unread,
Dec 15, 2015, 7:41:33 AM12/15/15
to jup...@googlegroups.com
It’s possible. What versions of packages do you have (pip list)?

-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/d45e60a6-1f8b-4679-8344-1629969ece14%40googlegroups.com.

Grant Herman

unread,
Dec 15, 2015, 8:57:16 AM12/15/15
to Project Jupyter
Here are my version:
 

ipython (4.0.1)

ipython-genutils (0.1.0)

jupyter-client (4.1.1)

jupyter-core (4.0.6)

jupyterhub (0.4.0.dev0

Grant Herman

unread,
Dec 15, 2015, 9:01:30 AM12/15/15
to Project Jupyter
I will also get the following error:

  FileNotFoundError: [Errno 2] No such file or directory: 'jupyterhub-singleuser'

MinRK

unread,
Dec 15, 2015, 9:38:13 AM12/15/15
to jup...@googlegroups.com
If you don't have `jupyterhub-singleuser`, then either JupyterHub
installed somewhere not on your PATH, or didn't successfully install.
I think you want to install the `notebook` package as well:

pip install notebook

What do you get for `which jupyterhub`?
> --
> 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/00be7ab3-0c4a-4df1-8417-6277933bea18%40googlegroups.com.

Grant Herman

unread,
Dec 15, 2015, 1:53:29 PM12/15/15
to Project Jupyter
I get this after which jupyterhub:

alias jupyterhub='/usr/local/bin/jupyterhub'

/usr/local/bin/jupyterhub

Grant Herman

unread,
Dec 15, 2015, 3:29:14 PM12/15/15
to Project Jupyter
I added jupyterhub to the $PATH and I have been getting this error: 

  

raise DistributionNotFound(req)

pkg_resources.DistributionNotFound: jupyterhub==0.4.0.dev0

MinRK

unread,
Dec 16, 2015, 4:13:42 AM12/16/15
to jup...@googlegroups.com
That suggests that the current version of JupyterHub is not installed
for the Python that's executing the script. You can check things like
this with `head $(which jupyterhub)`, and probably fix it with a `pip
install -e /path/to/jupyterhub`.

-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/2695c297-44b3-49a4-9707-51748ea779cd%40googlegroups.com.

Grant Herman

unread,
Dec 16, 2015, 3:15:08 PM12/16/15
to Project Jupyter
so I run that head $(which jupyterhub) command and get:

# EASY-INSTALL-DEV-SCRIPT: 'jupyterhub==0.4.0.dev0','jupyterhub'

__requires__ = 'jupyterhub==0.4.0.dev0'

__import__('pkg_resources').require('jupyterhub==0.4.0.dev0')

__file__ = '/home/centos/jupyterhub/scripts/jupyterhub'

exec(compile(open(__file__).read(), __file__, 'exec'))


So then I try to pip install the __file__, but I get this:

/home/centos/jupyterhub/scripts/jupyterhub should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

MinRK

unread,
Dec 17, 2015, 8:43:22 AM12/17/15
to jup...@googlegroups.com
Where’s the #! line in the juptyerhub script? That should be the first line.

Sorry, the path you give to pip should the the repository, not the
script: pip install -e /path/to/jupyterhub/repo

-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/053b9c09-c9bd-427d-8f23-b80f39cdbaeb%40googlegroups.com.

Grant Herman

unread,
Dec 17, 2015, 10:33:22 AM12/17/15
to Project Jupyter
Thanks for your help! I figured out the problem. So for each user I needed to clone the jupyterhub repo and then do the pip3 install requirements. Once I did that, I am able to log in with different users.

MinRK

unread,
Dec 17, 2015, 11:07:22 AM12/17/15
to jup...@googlegroups.com
On Thu, Dec 17, 2015 at 4:33 PM, Grant Herman
grantloui...@gmail.com wrote:

Thanks for your help! I figured out the problem. So for each user I
needed to clone the jupyterhub repo and then do the pip3 install
requirements. Once I did that, I am able to log in with different
users.

That’s not generally necessary. Can you perhaps share your config
and/or paths for installation, etc.? If you are doing pip install -e
(as opposed to just pip install), you do need to make sure that the
jupyterhub repo is readable by all your users.

-MinRK

>

On Thursday, December 17, 2015 at 8:43:22 AM UTC-5, Min RK wrote: >

Where’s the #! line in the juptyerhub script? That should be the first line.

Sorry, the path you give to pip should the the repository, not the
script: pip install -e /path/to/jupyterhub/repo

-MinRK

On Wed, Dec 16, 2015 at 9:15 PM, Grant Herman grantloui...@gmail.com wrote:

so I run that head $(which jupyterhub) command and get:

EASY-INSTALL-DEV-SCRIPT: ‘jupyterhub==0.4.0.dev0’,’jupyterhub’

requires = ‘jupyterhub==0.4.0.dev0’

import(‘pkg_resources’).require(‘jupyterhub==0.4.0.dev0’)

file = ‘/home/centos/jupyterhub/scripts/jupyterhub’

exec(compile(open(file).read(), file, ‘exec’))

So then I try to pip install the file, but I get this:

/home/centos/jupyterhub/scripts/jupyterhub should either be a path to
a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

— 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
— 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/863be0dc-01e6-445b-9341-da8cf0c396aa%40googlegroups.com.

Grant Herman

unread,
Dec 21, 2015, 9:26:45 PM12/21/15
to Project Jupyter
So I have not been using a config file and I have exported the path of jupyterhub in the ~/.bash_profile. However, I have been having the same issue as before. Where would I have to download the jupyterhub so it will accessible for all system users?

MinRK

unread,
Dec 22, 2015, 7:35:05 AM12/22/15
to jup...@googlegroups.com
On Tue, Dec 22, 2015 at 3:26 AM, Grant Herman <grantloui...@gmail.com> wrote:
So I have not been using a config file and I have exported the path of jupyterhub in the ~/.bash_profile. However, I have been having the same issue as before. Where would I have to download the jupyterhub so it will accessible for all system users?

The script used to start the single-user servers is inside the JupyterHub package. This needs to be read by the users to start their single-user server. If the users cannot read the JupyterHub package's location, they cannot read the script they need to run.
 

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

Grant Herman

unread,
Dec 22, 2015, 8:53:29 PM12/22/15
to Project Jupyter
so my local jupyterhub is at /root

the jupyterhub is downloaded at /usr/local/bin/jupyterhub

head $(which jupyterhub) yields:

#!/usr/local/bin/python3.4

# EASY-INSTALL-DEV-SCRIPT: 'jupyterhub==0.4.0.dev0','jupyterhub'

__requires__ = 'jupyterhub==0.4.0.dev0'

__import__('pkg_resources').require('jupyterhub==0.4.0.dev0')

__file__ = '/root/jupyterhub/scripts/jupyterhub'

exec(compile(open(__file__).read(), __file__, 'exec'))


I am still getting the same error everytime I try to log onto jupyterhub and I am not sure why. I dont know where I should download jupyterhub so all the system users will have access.

MinRK

unread,
Dec 24, 2015, 10:10:02 AM12/24/15
to jup...@googlegroups.com
In order to start their servers, all users need to read the file that
is found by:

python3 -c 'import jupyterhub.singleuser; print(jupyterhub.singleuser.__file__)'

If you are installing with pip install -e, that’s the likely cause,
since that only installs references to files that may live elsewhere,
such as in your home (or root) directory, which may not be
world-readable. If you do a regular install (no -e), then it will copy
files to a system-readable location, such as /usr/local.

-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/8151c5b1-e6d9-4722-a73a-f9a8e2936cad%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages