telepresence icon indicating copy to clipboard operation
telepresence copied to clipboard

MacOS Big Sur `inject-tcp` method does not work.

Open Maartz opened this issue 4 years ago • 5 comments

What were you trying to do?

Run this command:

telepresence --method=inject-tcp --run-shell --expose 8080

What did you expect to happen?

To be connected in a pod.

What happened instead?

T: Using a Pod instead of a Deployment for the Telepresence proxy. If you experience problems, please file an issue!
T: Set the environment variable TELEPRESENCE_USE_DEPLOYMENT to any non-empty value to force the old behavior, e.g.,
T:     env TELEPRESENCE_USE_DEPLOYMENT=1 telepresence --run curl hello

T: Starting proxy with method 'inject-tcp', which has the following limitations: Go programs, static binaries, suid programs, and custom DNS implementations are not supported. For a full list of method limitations see https://telepresence.io/reference/methods.html
T: Volumes are rooted at $TELEPRESENCE_ROOT. See https://telepresence.io/howto/volumes.html for details.
T: Starting network proxy to cluster using new Pod telepresence-1610095879-699407-66702
T: Forwarding remote port 8080 to local port 8080.


Looks like there's a bug in our code. Sorry about that!

Automatically included information

Command line: ['/usr/local/bin/telepresence', '--method=inject-tcp', '--run-shell', '--expose', '8080'] Version: 0.108 Python version: 3.9.1 (default, Jan 8 2021, 09:44:37) [Clang 12.0.0 (clang-1200.0.32.28)] kubectl version: Client Version: v1.19.3 // Server Version: v1.17.12-eks-7684af oc version: (error: [Errno 2] No such file or directory: 'oc') OS: Darwin MBP-de-William 20.3.0 Darwin Kernel Version 20.3.0: Mon Dec 7 22:04:02 PST 2020; root:xnu-7195.80.16.111.1~1/RELEASE_X86_64 x86_64

Traceback (most recent call last):
  File "/usr/local/bin/telepresence/telepresence/cli.py", line 135, in crash_reporting
    yield
  File "/usr/local/bin/telepresence/telepresence/main.py", line 81, in main
    user_process = launch(
  File "/usr/local/bin/telepresence/telepresence/outbound/setup.py", line 64, in launch
    return launch_inject(runner_, command, socks_port, env)
  File "/usr/local/bin/telepresence/telepresence/outbound/local.py", line 104, in launch_inject
    torsocks_env = set_up_torsocks(runner, socks_port)
  File "/usr/local/bin/telepresence/telepresence/outbound/local.py", line 71, in set_up_torsocks
    raise RuntimeError("SOCKS network proxying failed to start...")
RuntimeError: SOCKS network proxying failed to start...

Logs:

ket.socket().connect(('"'"'kubernetes.default'"'"', 443))'
  44.4 TEL | [123] exit -11 in 0.06 secs.
  44.5 TEL | [124] Running: torsocks python3 -c 'import socket; socket.socket().connect(('"'"'kubernetes.default'"'"', 443))'
  44.5 TEL | [124] exit -11 in 0.06 secs.
  44.6 TEL | [125] Running: torsocks python3 -c 'import socket; socket.socket().connect(('"'"'kubernetes.default'"'"', 443))'
  44.7 TEL | [125] exit -11 in 0.07 secs.
  44.8 TEL | [126] Running: torsocks python3 -c 'import socket; socket.socket().connect(('"'"'kubernetes.default'"'"', 443))'
  44.9 TEL | [126] exit -11 in 0.08 secs.
  45.0 TEL | [127] Running: torsocks python3 -c 'import socket; socket.socket().connect(('"'"'kubernetes.default'"'"', 443))'
  45.1 TEL | [127] exit -11 in 0.06 secs.
  45.2 TEL | [128] Running: torsocks python3 -c 'import socket; socket.socket().connect(('"'"'kubernetes.default'"'"', 443))'
  45.2 TEL | [128] exit -11 in 0.07 secs.
  45.2 TEL | END SPAN local.py:42(set_up_torsocks)   14.9s

It's related to 3 others issue here. #1491 #1487 #1497. Even after a brew update && brew upgrade, a reboot, etc.

Maartz avatar Jan 08 '21 08:01 Maartz

Anyone aware of a workaround?

mecampbellsoup avatar Jan 25 '21 13:01 mecampbellsoup

@mecampbellsoup we've made it work using --method vpn-tcp and --also-proxy all our services.

Maartz avatar Feb 23 '21 07:02 Maartz

@mecampbellsoup we've made it work using --method vpn-tcp and --also-proxy all our services.

For me it didn't help

kentloog avatar Mar 03 '21 10:03 kentloog

me neither ... My OS is MacOS BigSure 11.6.2 Does anyone have a working workaround ?

MichZem avatar Dec 16 '21 10:12 MichZem

It works for me as below under Big Sur 11.4 telepresence --expose 8080 --method=vpn-tcp

Joseph-Hong avatar Feb 15 '22 02:02 Joseph-Hong

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

github-actions[bot] avatar Aug 16 '24 08:08 github-actions[bot]