Skip to content

Nice info message if not on correct network? #153

@rsignell-usgs

Description

@rsignell-usgs

I forgot to get on the VPN, and of course errored out with "No address associated with hostname". Would it be a common enough user issue to issue an Info comment back of something like "Not found on current network. Do you need to be on your VPN?" or something?

************************************************************************************** Authenticating **************************************************************************************
Authenticating user (rsignell) from client (IGSAGIEGLTRSI10) to remote host (denali.cr.usgs.gov)
Traceback (most recent call last):
  File "/home/rsignell/mambaforge/envs/jupyter/bin/jupyter-forward", line 33, in <module>
    sys.exit(load_entry_point('jupyter-forward', 'console_scripts', 'jupyter-forward')())
  File "/home/rsignell/github/jupyter-forward/jupyter_forward/cli.py", line 103, in main
    typer.run(app())
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/typer/main.py", line 500, in wrapper
    return callback(**use_params)  # type: ignore
  File "/home/rsignell/github/jupyter-forward/jupyter_forward/cli.py", line 88, in start
    runner = RemoteRunner(
  File "<string>", line 12, in __init__
  File "/home/rsignell/github/jupyter-forward/jupyter_forward/core.py", line 60, in __post_init__
    self._authenticate()
  File "/home/rsignell/github/jupyter-forward/jupyter_forward/core.py", line 76, in _authenticate
    self.session.open()
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/fabric/connection.py", line 636, in open
    self.client.connect(**kwargs)
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/paramiko/client.py", line 340, in connect
    to_try = list(self._families_and_addresses(hostname, port))
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/site-packages/paramiko/client.py", line 203, in _families_and_addresses
    addrinfos = socket.getaddrinfo(
  File "/home/rsignell/mambaforge/envs/jupyter/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions