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

sudo docker fails with "no tty present and no askpass program specified" #995

sebglon opened this issue Apr 16, 2019 · 2 comments

sudo docker fails with "no tty present and no askpass program specified" #995

sebglon opened this issue Apr 16, 2019 · 2 comments


Copy link

@sebglon sebglon commented Apr 16, 2019

What were you trying to do?

run script available on this

What did you expect to happen?

container is up with dlv

What happened instead?

(please tell us - the traceback is automatically included, see below.
use to pass along full telepresence.log)

Automatically included information

Command line: ['/usr/bin/telepresence', '--namespace', 'backup', '--docker-run', '-v', '<my-path>', '-p', '2345:2345', '-it', '--cap-add=SYS_PTRACE', 'vscode-go-debug', 'bash', '-c', '.debug/']
Version: 0.98
Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
kubectl version: Client Version: v1.14.1 // Server Version: v1.11.8-gke.6
oc version: (error: [Errno 2] No such file or directory: 'oc': 'oc')
OS: Linux xxxxxx 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Background process (Network container) exited with return code 1. Command was:
  sudo docker run -p=2345:2345 --publish= --hostname=telepresence-1555449629-2582006-31647-58cdb9954c-28jw8 --dns= --dns-search=backup.svc.cluster.local --dns-search=svc.cluster.local --dns-search=cluster.local --dns-search=c.<cluster>.internal --dns-search=google.internal --dns-opt=ndots:5 --rm --privileged --name=telepresence-1555449649-1545959-31647 datawire/telepresence-local:0.98 proxy '{"cidrs": ["0/0"], "expose_ports": []}'

Recent output was:
  sudo: no tty present and no askpass program specified


  20.1  28 | 2019-04-16T21:20:46+0000 [-] Loading ./
  20.1  28 | 2019-04-16T21:20:49+0000 [-] /etc/resolv.conf changed, reparsing
  20.1  28 | 2019-04-16T21:20:49+0000 [-] Resolver added ('', 53) to server list
  20.1  28 | 2019-04-16T21:20:49+0000 [-] SOCKSv5Factory starting on 9050
  20.1  28 | 2019-04-16T21:20:49+0000 [socks.SOCKSv5Factory#info] Starting factory <socks.SOCKSv5Factory object at 0x7f67451676a0>
  20.1  28 | 2019-04-16T21:20:49+0000 [-] DNSDatagramProtocol starting on 9053
  20.1  28 | 2019-04-16T21:20:49+0000 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x7f6741c919b0>
  20.1  28 | 2019-04-16T21:20:49+0000 [-] Loaded.
  20.1  28 | 2019-04-16T21:20:49+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 18.9.0 (/usr/bin/python3.6 3.6.5) starting up.
  20.1  28 | 2019-04-16T21:20:49+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.

Copy link

@ark3 ark3 commented Apr 16, 2019

Sorry about the crash. This is happening because Telepresence is calling sudo docker ... without a TTY. I'll have this fixed for the next release.

In the meantime, you can work around this by setting up Docker to run without sudo, though you should be aware that there are some security tradeoffs in setting up Docker that way.

Thanks for the issue. We don't test for this correctly, so it would have taken us a long time to notice this bug.

@ark3 ark3 added the t:bug label Apr 16, 2019
@ark3 ark3 added this to To do in Tel Tracker via automation Apr 16, 2019
@ark3 ark3 changed the title Fail to start container from vscode with dlv sudo docker fails with "no tty present and no askpass program specified" Apr 16, 2019
Copy link

@sebglon sebglon commented Apr 16, 2019

Thanks yes i have added docker group for my user and all is good now.

@ark3 ark3 moved this from To do to In progress in Tel Tracker Apr 17, 2019
@ark3 ark3 closed this as completed in 783f92e Apr 17, 2019
Tel Tracker automation moved this from In progress to Done Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

2 participants