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

Telepresence uses localhost incorrectly/inconsistently and that breaks on some IPv6 setups #783

Closed
gmahieux opened this Issue Sep 19, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@gmahieux
Copy link

gmahieux commented Sep 19, 2018

What were you trying to do?

Trying to run telepresence

What did you expect to happen?

Expected no error and being able to connect

What happened instead?

It crashes after a few seconds

Automatically included information

Command line: ['/usr/bin/telepresence', '--run-shell']
Version: 0.92
Python version: 3.6.6 (default, Jul 19 2018, 14:25:17) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)]
kubectl version: Client Version: v1.9.0 // Server Version: v1.9.5
oc version: (error: [Errno 2] No such file or directory: 'oc': 'oc')
OS: Linux localhost.localdomain 4.18.7-200.fc28.x86_64 #1 SMP Mon Sep 10 15:44:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Traceback:

Traceback (most recent call last):
  File "/usr/bin/telepresence/telepresence/cli.py", line 129, in crash_reporting
    yield
  File "/usr/bin/telepresence/telepresence/main.py", line 64, in main
    socks_port, ssh = do_connect(runner, remote_info)
  File "/usr/bin/telepresence/telepresence/connect/__init__.py", line 158, in do_connect
    return connect(runner_, remote_info, is_container_mode, args.expose)
  File "/usr/bin/telepresence/telepresence/connect/__init__.py", line 115, in connect
    ssh.wait()
  File "/usr/bin/telepresence/telepresence/connect/ssh.py", line 82, in wait
    raise RuntimeError("SSH isn't starting.")
RuntimeError: SSH isn't starting.

Logs:

0] Running: sudo -n echo -n
  71.6  16 | 2018-09-19T14:44:06+0000 [Poll#error] Failed to contact Telepresence client:
  71.6  16 | 2018-09-19T14:44:06+0000 [Poll#error] Connection was refused by other side: 111: Connection refused.
  71.6  16 | 2018-09-19T14:44:06+0000 [Poll#warn] Perhaps it's time to exit?
  90.7 TEL | [21] Running: sudo -n echo -n
 101.2  16 | 2018-09-19T14:44:36+0000 [Poll#error] Failed to contact Telepresence client:
 101.2  16 | 2018-09-19T14:44:36+0000 [Poll#error] Connection was refused by other side: 111: Connection refused.
 101.2  16 | 2018-09-19T14:44:36+0000 [Poll#warn] Perhaps it's time to exit?
 120.8 TEL | [22] Running: sudo -n echo -n
 131.2  16 | 2018-09-19T14:45:06+0000 [Poll#error] Failed to contact Telepresence client:
 131.2  16 | 2018-09-19T14:45:06+0000 [Poll#error] Connection was refused by other side: 111: Connection refused.
 131.2  16 | 2018-09-19T14:45:06+0000 [Poll#warn] Perhaps it's time to exit?
 135.9 TEL | [18] exit 255 in 131.04 secs.

@gmahieux

This comment has been minimized.

Copy link

gmahieux commented Sep 19, 2018

I finally got it working when removing ::1 localhost from etc/hosts
But not sure if it is expected to have to remove IPV6 mapping to get telepresence working correctly

@ark3 ark3 changed the title Unable to run Telepresence : Connection was refused by other side Telepresence uses localhost incorrectly/inconsistently and that breaks on some IPv6 setups Oct 9, 2018

@ark3

This comment has been minimized.

Copy link
Contributor

ark3 commented Oct 9, 2018

Yikes. We have to lock down our use of localhost. Thank you for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment