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

ctrl-c ignored. #1650

Closed
james-lawrence opened this issue Feb 1, 2018 · 6 comments · Fixed by #1845
Closed

ctrl-c ignored. #1650

james-lawrence opened this issue Feb 1, 2018 · 6 comments · Fixed by #1845
Assignees

Comments

@james-lawrence
Copy link

tsh doesn't properly shutdown when it recieves interrupt signals.

# easy way to reproduce: network is down / vpn is offline.
tsh ssh user@host
^C^C^C^C^C^C^C^C^C^C

also happens when running a command against mutliple servers, like following logs.

distro: Arch linux
tsh: Teleport v2.4.0 git:v2.4.0-0-ge9d6645

@kontsevoy kontsevoy added this to the 2.5.1 "Portland" milestone Feb 5, 2018
@kontsevoy
Copy link
Contributor

kontsevoy commented Feb 5, 2018

@james-lawrence You're reporting a valid issue, but let me provide a bit more detail. See below:

tsh doesn't properly shutdown when it recieves interrupt signals

Strictly speaking, this is incorrect, as can be shown by opening a tsh session and executing this in another terminal window:

$ kill -s SIGTERM $(pidof tsh)

Now, getting to Ctrl+C. An SSH client's job is to take all your keyboard input and pass it on the wire to the server, i.e. the recipient of Ctrl+C is whatever's running on the remote host. tsh does this by switching the terminal to "raw mode", as it should...

however...

The bug appears to be that tsh does this too early. I think raw terminal mode must be enabled only for interactive terminal sessions, i.e. when a remote TTY allocation takes place. Otherwise, while tailing logs, Ctrl+C (and Ctrl+\) must be processed locally.

@kontsevoy kontsevoy modified the milestones: 2.5.1 "Portland", 2.6.0 "Austin" Feb 5, 2018
@schmorrison
Copy link

schmorrison commented Feb 18, 2020

I seem to be running into this issue in version <=4.2.2 of teleport/tsh on both AMD64 and ARMv7l. All commands (except --help) in tsh hang forever. If I omit the --proxy flag I get an error. If I use the --proxy flag the command hangs and never returns.

schmorrison@teleport-4:~/teleport$ tsh --debug --login=schmo --user=schmo --proxy=https://proxy.example.com:3080 clusters
^CDEBU [TSH]       signal: interrupt tsh/tsh.go:327
^C^C^C^C^Z[1]   Killed                  ./tsh --debug --login=schmo --user=schmo --proxy=https://proxy.example.com:3080 clusters

[2]+  Stopped                 tsh --debug --login=schmo --user=schmo --proxy=https://proxy.example.com:3080 clusters
schmorrison@teleport-4:~/teleport$ fg
tsh --debug --login=schmo --user=schmo --proxy=https://proxy.example.com:3080 clusters
^C^C^C^C

^C^C^C^C^Z
[2]+  Stopped                 tsh --debug --login=schmo --user=schmo --proxy=https://proxy.example.com:3080 clusters

The process consumes seemingly infinite CPU resources, and the CTRL-C does not actually release any of the resources:

13500 schmo 20   0  904456  48408  14432 S 128.6  5.1   0:46.81 tsh

I am seeing the following item continuously repeated in my teleport server (proxy.example.com) logs:

ERRO [SESSION:N] "\nERROR REPORT:\nOriginal Error: *trace.BadParameterError write on closed forwarder\nStack Trace:\n\t/gopath/src/github.com/gravitational/teleport/lib/events/forward.go:175 github.com/gravitational/teleport/lib/events.(*Forwarder).setupSlice\n\t/gopath/src/github.com/gravitational/teleport/lib/events/forward.go:149 github.com/gravitational/teleport/lib/events.(*Forwarder).PostSessionSlice\n\t/gopath/src/github.com/gravitational/teleport/lib/events/recorder.go:161 github.com/gravitational/teleport/lib/events.(*ForwardRecorder).Write\n\t/gopath/src/github.com/gravitational/teleport/lib/srv/sess.go:1143 github.com/gravitational/teleport/lib/srv.(*multiWriter).Write\n\t/opt/go/src/io/io.go:404 io.copyBuffer\n\t/opt/go/src/io/io.go:364 io.Copy\n\t/gopath/src/github.com/gravitational/teleport/lib/srv/sess.go:710 github.com/gravitational/teleport/lib/srv.(*session).startInteractive.func1\n\t/opt/go/src/runtime/asm_amd64.s:1358 runtime.goexit\nUser Message: write on closed forwarder\n" events/recorder.go:166

Finally, the web interface running at proxy.example.com:3080 shows the devices (eg. clusters) and I am able to connect without an issue. tsh does not work though.

Any suggestions would be appreciated.

Thanks and best regards,

schmorrison

@schmorrison
Copy link

@russjones there seems to be a memory leak. Watching top over the course of ~30 mins the tsh process consumed >100% CPU and the memory usage climbed until a stack overflow crashed the process.

schmo@teleport-4:~$ tsh --debug --proxy=https://proxy.example.com:3080 clusters
INFO [CLIENT]    No teleport login given. defaulting to schmo client/api.go:774
INFO [CLIENT]    no host login given. defaulting to schmo client/api.go:784
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x1299015, 0xe)
        /opt/go/src/runtime/panic.go:774 +0x72
runtime.newstack()
        /opt/go/src/runtime/stack.go:1046 +0x6e9
runtime.morestack()
        /opt/go/src/runtime/asm_amd64.s:449 +0x8f

goroutine 1 [running]:
runtime.mallocgc(0x55, 0x0, 0x7fa7f2e08000, 0x2a)
        /opt/go/src/runtime/malloc.go:877 +0x9bb fp=0xc02069e368 sp=0xc02069e360 pc=0x417d5b
runtime.rawstring(0x55, 0x0, 0x0, 0x0, 0x0, 0x0)
        /opt/go/src/runtime/string.go:259 +0x4f fp=0xc02069e398 sp=0xc02069e368 pc=0x45570f
runtime.rawstringtmp(0x0, 0x55, 0x55, 0xc000060a80, 0x7fa7f2e08008, 0xc000000180, 0x55)
        /opt/go/src/runtime/string.go:123 +0x6f fp=0xc02069e3d8 sp=0xc02069e398 pc=0x4550cf
runtime.concatstrings(0x0, 0xc02069e4b8, 0x5, 0x5, 0x55, 0xc02069e530)
        /opt/go/src/runtime/string.go:49 +0xae fp=0xc02069e470 sp=0xc02069e3d8 pc=0x454b5e
runtime.concatstring5(0x0, 0x128efc7, 0x5, 0x128d108, 0x1, 0xc0002fe5c0, 0x1f, 0x128d1e1, 0x2, 0x12c193c, ...)
        /opt/go/src/runtime/string.go:70 +0x47 fp=0xc02069e4b0 sp=0xc02069e470 pc=0x454f37
net/url.(*Error).Error(0xc00066e5a0, 0x1169d60, 0xc00066e5a0)
        /opt/go/src/net/url/url.go:29 +0xab fp=0xc02069e528 sp=0xc02069e4b0 pc=0x558b7b
fmt.(*pp).handleMethods(0xc0000feea0, 0xc000000076, 0x1)
        /opt/go/src/fmt/print.go:624 +0x1db fp=0xc02069e738 sp=0xc02069e528 pc=0x4e97bb
fmt.(*pp).printArg(0xc0000feea0, 0x1169d60, 0xc00066e5a0, 0xc000000076)
        /opt/go/src/fmt/print.go:713 +0x206 fp=0xc02069e7d0 sp=0xc02069e738 pc=0x4e9ea6
fmt.(*pp).doPrintf(0xc0000feea0, 0xc0006128e0, 0x16, 0xc00030eb00, 0x2, 0x2)
        /opt/go/src/fmt/print.go:1030 +0x15b fp=0xc02069e8b8 sp=0xc02069e7d0 pc=0x4ed86b
fmt.Sprintf(0xc0006128e0, 0x16, 0xc00030eb00, 0x2, 0x2, 0xc0006128e0, 0x16)
        /opt/go/src/fmt/print.go:219 +0x66 fp=0xc02069e910 sp=0xc02069e8b8 pc=0x4e6746
github.com/gravitational/teleport/vendor/github.com/gravitational/trace.(*TraceErr).AddUserMessage(0xc000666b80, 0x10b8f00, 0xc00065ef80, 0xc00030eb00, 0x2, 0x2)
        /gopath/src/github.com/gravitational/teleport/vendor/github.com/gravitational/trace/trace.go:239 +0xb7 fp=0xc02069e990 sp=0xc02069e910 pc=0x76fe87
github.com/gravitational/teleport/vendor/github.com/gravitational/trace.WrapWithMessage(0x1434d40, 0xc00065ef70, 0x10b8f00, 0xc00065ef80, 0xc00030eb00, 0x2, 0x2, 0x417f28, 0x20)
        /gopath/src/github.com/gravitational/teleport/vendor/github.com/gravitational/trace/trace.go:94 +0xb4 fp=0xc02069e9e0 sp=0xc02069e990 pc=0x76f114
github.com/gravitational/teleport/vendor/github.com/gravitational/trace.BadParameter(0x12a1c5f, 0x16, 0xc00030eb00, 0x2, 0x2, 0x88, 0xc000673b00)
        /gopath/src/github.com/gravitational/teleport/vendor/github.com/gravitational/trace/errors.go:114 +0x11b fp=0xc02069ea50 sp=0xc02069e9e0 pc=0x76bcbb
github.com/gravitational/teleport/lib/utils.ParseAddr(0xc0002fe5c0, 0x1f, 0xc02069eb60, 0x92be2e, 0xc00066e570)
        /gopath/src/github.com/gravitational/teleport/lib/utils/addr.go:163 +0x59e fp=0xc02069ead0 sp=0xc02069ea50 pc=0x92be2e
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:702 +0x71 fp=0xc02069eb20 sp=0xc02069ead0 pc=0xc69fb1
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069eb70 sp=0xc02069eb20 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ebc0 sp=0xc02069eb70 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ec10 sp=0xc02069ebc0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ec60 sp=0xc02069ec10 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ecb0 sp=0xc02069ec60 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ed00 sp=0xc02069ecb0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ed50 sp=0xc02069ed00 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069eda0 sp=0xc02069ed50 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069edf0 sp=0xc02069eda0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ee40 sp=0xc02069edf0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ee90 sp=0xc02069ee40 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069eee0 sp=0xc02069ee90 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ef30 sp=0xc02069eee0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069ef80 sp=0xc02069ef30 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069efd0 sp=0xc02069ef80 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f020 sp=0xc02069efd0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f070 sp=0xc02069f020 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f0c0 sp=0xc02069f070 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f110 sp=0xc02069f0c0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f160 sp=0xc02069f110 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f1b0 sp=0xc02069f160 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f200 sp=0xc02069f1b0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f250 sp=0xc02069f200 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f2a0 sp=0xc02069f250 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f2f0 sp=0xc02069f2a0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f340 sp=0xc02069f2f0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f390 sp=0xc02069f340 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f3e0 sp=0xc02069f390 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f430 sp=0xc02069f3e0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f480 sp=0xc02069f430 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f4d0 sp=0xc02069f480 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f520 sp=0xc02069f4d0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f570 sp=0xc02069f520 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f5c0 sp=0xc02069f570 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f610 sp=0xc02069f5c0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f660 sp=0xc02069f610 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f6b0 sp=0xc02069f660 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f700 sp=0xc02069f6b0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f750 sp=0xc02069f700 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f7a0 sp=0xc02069f750 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f7f0 sp=0xc02069f7a0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f840 sp=0xc02069f7f0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f890 sp=0xc02069f840 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f8e0 sp=0xc02069f890 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f930 sp=0xc02069f8e0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f980 sp=0xc02069f930 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069f9d0 sp=0xc02069f980 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fa20 sp=0xc02069f9d0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fa70 sp=0xc02069fa20 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fac0 sp=0xc02069fa70 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fb10 sp=0xc02069fac0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fb60 sp=0xc02069fb10 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fbb0 sp=0xc02069fb60 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fc00 sp=0xc02069fbb0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fc50 sp=0xc02069fc00 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fca0 sp=0xc02069fc50 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fcf0 sp=0xc02069fca0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc02069fd40 sp=0xc02069fcf0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/srgithub.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc0206a0510 sp=0xc0206a04c0 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc0206a0560 sp=0xc0206a0510 pc=0xc69f7c
github.com/gravitational/teleport/lib/client.(*Config).WebProxyHostPort(0xc0000f0000, 0x1f, 0x0, 0x1434e20)
        /gopath/src/github.com/gravitational/teleport/lib/client/api.go:708 +0x3c fp=0xc0206a05b0 sp=0xc0206a0560 pc=0xc69f7c
...additional frames elided...

goroutine 6 [chan receive]:
github.com/gravitational/teleport/vendor/github.com/golang/glog.(*loggingT).flushDaemon(0x1f53340)
        /gopath/src/github.com/gravitational/teleport/vendor/github.com/golang/glog/glog.go:882 +0x8b
created by github.com/gravitational/teleport/vendor/github.com/golang/glog.init.0
        /gopath/src/github.com/gravitational/teleport/vendor/github.com/golang/glog/glog.go:410 +0x26f

goroutine 7 [syscall, 35 minutes]:
os/signal.signal_recv(0x0)
        /opt/go/src/runtime/sigqueue.go:147 +0x9c
os/signal.loop()
        /opt/go/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
        /opt/go/src/os/signal/signal_unix.go:29 +0x41

goroutine 36 [chan receive, 35 minutes]:
main.Run.func2(0xc0002ca400)
        /gopath/src/github.com/gravitational/teleport/tool/tsh/tsh.go:325 +0xc8
created by main.Run
        /gopath/src/github.com/gravitational/teleport/tool/tsh/tsh.go:320 +0x503a

@schmorrison
Copy link

schmorrison commented Feb 18, 2020

Sorry, ignore the above. While the problems above were as described, the root cause was NOT LOGGIN IN to the proxy via tsh. This is even required when entering the terminal via the web interface. I assumed it was taken care of by the web interface transparently.

Steps that worked:

schmo@teleport-4:~$ tsh login --proxy=proxy.example.com
Enter password for Teleport user schmo:
Enter your OTP token:

schmo@teleport-4:~$ tsh --debug --login=schmo --user=schmo --proxy=proxy.example.com clusters
Cluster Name  Status 
------------- ------ 
teleport-4    online 
schmo-0111 online

schmo@teleport-4:~$ tsh --debug --login=schmo --user=schmo --proxy=proxy.example.com logout

@webvictim
Copy link
Contributor

This may still be a bug because if you haven’t logged in, tsh is supposed to prompt you to do so.

@NickJLange
Copy link

On OSX (Big Sur) on rc 6.0.1 - I'm still seeing the hanging behabiour. Resolved by logging in...

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

Successfully merging a pull request may close this issue.

6 participants