Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when executing jupyterhub -h #2568

Closed
nicolamarangoni opened this issue May 16, 2019 · 17 comments
Closed

Error message when executing jupyterhub -h #2568

nicolamarangoni opened this issue May 16, 2019 · 17 comments

Comments

@nicolamarangoni
Copy link

nicolamarangoni commented May 16, 2019

Describe the bug
Error message when executing jupyterhub -h
Last Jupyterhub installed with last conda on last CentOS7 (as of 16.05.2019)

To Reproduce
Just type jupyterhub -h

Expected behavior
Normal help text

Desktop (please complete the following information):

  • OS: Centos 7.6
  • Conda 4.6.14
  • JupyterHub 1.0.0

Behaviour

Help text normally generated but in the end an error is shown
The same for jupyterhub --version

........
........

Examples
--------

    generate default config file:

        jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub_config.py

    spawn the server on 10.0.1.2:443 with https:

        jupyterhub --ip 10.0.1.2 --port 443 --ssl-key my_ssl.key --ssl-cert my_ssl.cert

ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<JupyterHub.launch_instance_async() done, defined at /opt/anaconda3/lib/python3.7/site-packages/jupyterhub/app.py:2477> exception=SystemExit(0)>
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.7/site-packages/jupyterhub/app.py", line 2492, in launch_instance
    loop.start()
  File "/opt/anaconda3/lib/python3.7/site-packages/tornado/platform/asyncio.py", line 148, in start
    self.asyncio_loop.run_forever()
  File "/opt/anaconda3/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
    self._run_once()
  File "/opt/anaconda3/lib/python3.7/asyncio/base_events.py", line 1775, in _run_once
    handle._run()
  File "/opt/anaconda3/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/opt/anaconda3/lib/python3.7/site-packages/jupyterhub/app.py", line 2479, in launch_instance_async
    await self.initialize(argv)
  File "/opt/anaconda3/lib/python3.7/site-packages/jupyterhub/app.py", line 2085, in initialize
    super().initialize(*args, **kwargs)
  File "</opt/anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-2>", line 2, in initialize
  File "/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 296, in initialize
    self.parse_command_line(argv)
  File "</opt/anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-4>", line 2, in parse_command_line
  File "/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 527, in parse_command_line
    self.exit(0)
  File "/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 648, in exit
    sys.exit(exit_status)
SystemExit: 0
@ramonberger
Copy link

Did you get a response? I'm seeing the same thing. I uninstalled jupyterhub 1.0.0, installe jupyterhub 0.9.4 and I don't see this.

Ramon Berger

@marschattha
Copy link

marschattha commented May 18, 2019

Same issue, installed on ubuntu 18 with npm and pip.

@DerekHarter
Copy link

Same issue, installed on ubuntu 18.04 server using latest anaconda3-2019.03 package manager.

And also can confirm that reverting back to 0.9.6 makes this error go away as well for me:

conda install -y -q -c conda-forge jupyterhub=0.9.6

And jupyterhub will run and be accessible using the 0.9.6 then.

@Yensan
Copy link

Yensan commented May 31, 2019

Same issue

Ubuntu 18.04.2 LTS

Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux
jupyter-client 5.2.4
jupyter-core 4.4.0
jupyterhub 1.0.0
notebook 5.7.8

node v8.10.0
npm 3.5.2
configurable-http-proxy 4.1.0

$ jupyterhub -h
Start a multi-user Jupyter Notebook server

Spawns a configurable-http-proxy and multi-user Hub, which authenticates users
and spawns single-user Notebook servers on behalf of users.

Subcommands
-----------

Subcommands are launched as `jupyterhub cmd [args]`. For information on using
subcommand 'cmd', do: `jupyterhub cmd -h`.

token
    Generate an API token for a user
upgrade-db
    Upgrade your JupyterHub state database to the current version.

Options
-------

Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.

--debug
    set log level to logging.DEBUG (maximize logging output)
--generate-config
    generate default config file
--generate-certs
    generate certificates used for internal ssl
--no-db
    disable persisting state database to disk
--upgrade-db
    Automatically upgrade the database if needed on startup.

    Only safe if the database has been backed up.
    Only SQLite database files will be backed up automatically.
--no-ssl
    [DEPRECATED in 0.7: does nothing]
--base-url=<URLPrefix> (JupyterHub.base_url)
    Default: '/'
    The base URL of the entire application.
    Add this to the beginning of all JupyterHub URLs. Use base_url to run
    JupyterHub within an existing website.
    .. deprecated: 0.9
        Use JupyterHub.bind_url
-y <Bool> (JupyterHub.answer_yes)
    Default: False
    Answer yes to any questions (e.g. confirm overwrite)
--ssl-key=<Unicode> (JupyterHub.ssl_key)
    Default: ''
    Path to SSL key file for the public facing interface of the proxy
    When setting this, you should also set ssl_cert
--ssl-cert=<Unicode> (JupyterHub.ssl_cert)
    Default: ''
    Path to SSL certificate file for the public facing interface of the proxy
    When setting this, you should also set ssl_key
--url=<Unicode> (JupyterHub.bind_url)
    Default: 'http://:8000'
    The public facing URL of the whole JupyterHub application.
    This is the address on which the proxy will bind. Sets protocol, ip,
    base_url
--ip=<Unicode> (JupyterHub.ip)
    Default: ''
    The public facing ip of the whole JupyterHub application (specifically
    referred to as the proxy).
    This is the address on which the proxy will listen. The default is to listen
    on all interfaces. This is the only address through which JupyterHub should
    be accessed by users.
    .. deprecated: 0.9
        Use JupyterHub.bind_url
--port=<Int> (JupyterHub.port)
    Default: 8000
    The public facing port of the proxy.
    This is the port on which the proxy will listen. This is the only port
    through which JupyterHub should be accessed by users.
    .. deprecated: 0.9
        Use JupyterHub.bind_url
--pid-file=<Unicode> (JupyterHub.pid_file)
    Default: ''
    File to write PID Useful for daemonizing JupyterHub.
--log-file=<Unicode> (JupyterHub.extra_log_file)
    Default: ''
    DEPRECATED: use output redirection instead, e.g.
    jupyterhub &>> /var/log/jupyterhub.log
--log-level=<Enum> (Application.log_level)
    Default: 30
    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
    Set the log level by value or name.
-f <Unicode> (JupyterHub.config_file)
    Default: 'jupyterhub_config.py'
    The config file to load
--config=<Unicode> (JupyterHub.config_file)
    Default: 'jupyterhub_config.py'
    The config file to load
--db=<Unicode> (JupyterHub.db_url)
    Default: 'sqlite:///jupyterhub.sqlite'
    url for the database. e.g. `sqlite:///jupyterhub.sqlite`

To see all available configurables, use `--help-all`

Examples
--------

    generate default config file:

        jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub_config.py

    spawn the server on 10.0.1.2:443 with https:

        jupyterhub --ip 10.0.1.2 --port 443 --ssl-key my_ssl.key --ssl-cert my_ssl.cert

ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<JupyterHub.launch_instance_async() done, defined at /home/jupyterhub/venv36/lib/python3.6/site-packages/jupyterhub/app.py:2477> exception=SystemExit(0,)>
Traceback (most recent call last):
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/jupyterhub/app.py", line 2492, in launch_instance
    loop.start()
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/tornado/platform/asyncio.py", line 148, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 427, in run_forever
    self._run_once()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 1440, in _run_once
    handle._run()
  File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/jupyterhub/app.py", line 2479, in launch_instance_async
    await self.initialize(argv)
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/jupyterhub/app.py", line 2085, in initialize
    super().initialize(*args, **kwargs)
  File "</home/jupyterhub/venv36/lib/python3.6/site-packages/decorator.py:decorator-gen-2>", line 2, in initialize
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/traitlets/config/application.py", line 296, in initialize
    self.parse_command_line(argv)
  File "</home/jupyterhub/venv36/lib/python3.6/site-packages/decorator.py:decorator-gen-4>", line 2, in parse_command_line
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/traitlets/config/application.py", line 527, in parse_command_line
    self.exit(0)
  File "/home/jupyterhub/venv36/lib/python3.6/site-packages/traitlets/config/application.py", line 648, in exit
    sys.exit(exit_status)
SystemExit: 0

@Yensan
Copy link

Yensan commented May 31, 2019

When I use jupyterhub 0.9.6, everything is OK.
pip uninstall {all requirements}, then python -m pip install jupyterhub==0.9.6

@dlukes
Copy link

dlukes commented Jun 6, 2019

Just noting that this happens even when installing JupyterHub in a fresh virtualenv (Python 3.6, 3.7). Other than this, JupyterHub seems to be working fine, but it is a bit disconcerting/noisy.

@kinow
Copy link
Contributor

kinow commented Jun 23, 2019

I believe this has been fixed on master, probably by this change. Just synced the branch, and jupyterhub -h, jupyterhub --version, are all working with no errors for me.

@ramonberger
Copy link

ramonberger commented Jun 26, 2019 via email

@Yensan
Copy link

Yensan commented Jul 17, 2019

@dlukes

Just noting that this happens even when installing JupyterHub in a fresh virtualenv (Python 3.6, 3.7). Other than this, JupyterHub seems to be working fine, but it is a bit disconcerting/noisy.

What is fresh virtualenv ? Yes, I install jupyterhub in a new venv, and this venv pure and clean as a virgin, but, how to fix it?

@ramonberger

Thanks Bruno, But how do I get the this version of jupyterhub? I just tried getting it with pip and conda and the version I got 1.0.0 still gives the error with jupyterhub -h Ramon Berger

He means that pip install git+https://github.com/jupyterhub/jupyterhub.git@master, but you use pip install jupyterhub.

----------------------- update : it is already fixed, really. ------------------
I installed it by pip install git+https://github.com/jupyterhub/jupyterhub.git@master, not pip install jupyterhub==0.9.6, then it be fine

@michaelmiaomiao
Copy link

Did you get a response? I'm seeing the same thing. I uninstalled jupyterhub 1.0.0, installe jupyterhub 0.9.4 and I don't see this.

Ramon Berger

how to uninstall completely? I am new to jupyterhub and linux thanks

@belongwqz
Copy link

Maybe it's about the python version?to see https://docs.python.org/3/library/asyncio-dev.html

@consideRatio
Copy link
Member

Closed by #2584, the fix will be part of the release after 1.0.0 that I'm writing a changelog for now.

Thanks everyone for reporting and investigating this!

@sorenwacker
Copy link

When will this be fixed? It seems old.

@consideRatio
Copy link
Member

I think it is in JupyterHub 1.1.0, or?

@ramonberger
Copy link

ramonberger commented Mar 23, 2020 via email

@kinow
Copy link
Contributor

kinow commented Mar 23, 2020

Yes, jupyterhub -h does not give the error now with jupyterhub 1.1.0.
But jupyterhub --genearte-config only seems to work if you are in
/etc/jupyterhub. And, the configuration file seems to be missing the
authentication directives.

Fixed in 1.1.0, at least the help as reported in this issue. I've been using --generate-config with no issues to generate the file in other directories, not sure about authentication directives.

@consideRatio
Copy link
Member

Ah okay, the --generate-config issue is fixed in master, but there has not been a release to include it yet. It will be in something after 1.1.0.

ref: #2907

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests