Closed boersmamarcel closed 7 years ago
it looks like a PATH
problem. try to change user to root
with sudo su
, then check that /opt/conda/bin
is in your path, then try which configurable-http-proxy
to check if that is available
also, do you want to use nbgrader
? if so, instructor1
and the other users needs to be created on the server before running ansible
@zonca thanks for the quick response. I followed your suggestions which resulted in the following output
ubuntu@www:~$ sudo su
root@www:/home/ubuntu# echo $PATH
/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
root@www:/home/ubuntu# which configurable-http-proxy
/opt/conda/bin/configurable-http-proxy
root@www:/home/ubuntu#
The last command is a manual start of the jupyterhub server not the one initiated by the ansible script. I added the users instructor1 instructor2 grader1 grader2_ before running the sensible script. I realized that the whitelisted users are instructor grader student1 student2 and I redeployed using the ansible-playbook deploy.yml command. However, it still shows the Bad gateway 502 warning. Checking the /var/log/jupyterhub/jupyterhub.log showed:
[I 2017-09-13 17:58:43.799 JupyterHub app:724] Loading cookie_secret from /srv/jupyterhub/cookie_secret
[E 2017-09-13 17:58:44.225 JupyterHub app:1527]
Traceback (most recent call last):
File "/opt/conda/lib/python3.5/site-packages/jupyterhub/app.py", line 1524, in launch_instance_async
yield self.initialize(argv)
File "/opt/conda/lib/python3.5/types.py", line 179, in throw
return self.__wrapped.throw(tp, *rest)
File "/opt/conda/lib/python3.5/site-packages/jupyterhub/app.py", line 1311, in initialize
yield self.init_groups()
File "/opt/conda/lib/python3.5/site-packages/jupyterhub/app.py", line 935, in init_groups
raise ValueError("Username %r is not in whitelist" % username)
ValueError: Username 'instructor1' is not in whitelist
Apparently it is due to the user adding issue. I now completed the whitelist and added all the users. The issue is that in /host_vars/hostname.example on line 16-25 usernames are specified that are different from the ones on line 183-195 used for nbgrader. Thanks for the feedback 👍 I might submit a small merge request resolving the mentioned problem.
if now it works please close the issue, a Pull Request is very welcome
I try to deploy the jupyterhub-deploy-teaching master version. Every step of deploy.yml executes without error except for _startjupyterhub.
At first it threw the following error:
The error logs in /var/log/jupyterhub/jupyterhub.log mention that jupyterhub has trouble adding users that already exist:
I removed the sqlite database from /srv/jupyterhub/jupyterhub.sqlite which resolves the problem of the ansible-playbook execution. Now everything executes fine without any errors. Nevertheless, when visiting my domain I get the nginx 502 Bad Gateway message so it seems that jupyterhub is not running.
If I ssh into the host machine and run
jupyterhub
it fires up jupyterhub and when I visit the domain I can see the login screen. But firing up jupyterhub this way uses some default configuration and not the one deployed by the ansible-playbook. Running jupyterhub with the path to the config file givesSo I'm a bit lost right now, is there anyway to resolve this problem?