tiangolo/babun-docker

docker run fail: cannot enable tty mode on non tty input

Closed this issue · 7 comments

Hello, I use bubun and run below install command successfully, but after that when I run docker info I get error, see below logs:

{ ~ } » curl -s https://raw.githubusercontent.com/tiangolo/babun-docker/master/setup.sh | source /dev/stdin
--2016-04-24 12:26:07-- https://github.com/rprichard/winpty/releases/download/0.2.2/winpty-0.2.2-cygwin-2.4.1-ia32.tar.gz
Resolving github.com (github.com)... 127.8.0.1
Connecting to github.com (github.com)|127.8.0.1|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/3829192/1def7380-dc09-11e5-9d6b-b25fe84177fa.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160424%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160424T042635Z&X-Amz-Expires=300&X-Amz-Signature=3a12a9cc34c9e0b8595c1b0cda528eb9bd973a186e2d73cd52926574351e2bd7&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dwinpty-0.2.2-cygwin-2.4.1-ia32.tar.gz&response-content-type=application%2Foctet-stream [following]
--2016-04-24 12:26:36-- https://github-cloud.s3.amazonaws.com/releases/3829192/1def7380-dc09-11e5-9d6b-b25fe84177fa.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160424%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160424T042635Z&X-Amz-Expires=300&X-Amz-Signature=3a12a9cc34c9e0b8595c1b0cda528eb9bd973a186e2d73cd52926574351e2bd7&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dwinpty-0.2.2-cygwin-2.4.1-ia32.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 127.8.0.2
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|127.8.0.2|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 738939 (722K) [application/octet-stream]
Saving to: ‘winpty-0.2.2-cygwin-2.4.1-ia32.tar.gz’

winpty-0.2.2-cygwin-2.4. 100%[====================================>] 721.62K 39.0KB/s in 66s s

2016-04-24 12:27:45 (10.9 KB/s) - ‘winpty-0.2.2-cygwin-2.4.1-ia32.tar.gz’ saved [738939/738939]

Cloning into '/home/sguo/.babun-docker'...
remote: Counting objects: 151, done.
remote: Total 151 (delta 0), reused 0 (delta 0), pack-reused 151
Receiving objects: 100% (151/151), 25.94 KiB | 7.00 KiB/s, done.
Resolving deltas: 100% (50/50), done.
Checking connectivity... done.
{ ~ } » docker info
Get http://127.0.0.1:2375/v1.19/info: EOF. Are you trying to connect to a TLS-enabled daemon without TLS?
{ ~ } » docker run -it ubuntu /bin/bash
cannot enable tty mode on non tty input
-- babun-docker: Using winpty
Post http://127.0.0.1:2375/v1.19/containers/create: EOF. Are you trying to connect to a TLS-enabled
daemon without TLS?
{ ~ } » bubun-docker-update
bash: bubun-docker-update: command not found

Any ideas?

Humm, that's very strange... That EOF makes me think that the Winpty download was corrupted.

By the -- babun-docker: Using winpty it seems like it was installed and is using it. But the bash: bubun-docker-update: command not found is what I don't understand...


Try the following:

  • Turn your Virtual Machine off:
docker-machine stop default

(if that doesn't work, open Virtual Box and "close" the machine "default", using a "ACPI Shutdown").

  • Then remove all of babun-docker:
rm -rf ~/.babun-docker
rm -rf ~/.winpty
  • Then install it again from scratch:
curl -s https://raw.githubusercontent.com/tiangolo/babun-docker/master/setup.sh | source /dev/stdin
  • Then do a simple docker ps. It should automatically turn your VM on, set the environment, etc.
  • Then the simplest container (just to make sure that works):
docker run -it ubuntu bash

Try first without slashes, use bash instead of /bin/bash to see if that works.

I think I should install Docker toolbox before installing babun-docker right? I just installed babun-docker without the Toolbox which cause this error. Will try the formal one again. Thanks.

@July-G Ah, yes, you need Docker Toolbox installed. Tell me how it works.

After I installed the Docker Toolbox, then follow your instruction above, here is the logs:

{ ~ } » curl -s https://raw.githubusercontent.com/tiangolo/babun-docker/master/setup.sh | source /dev/stdin
--2016-04-26 19:19:09-- https://github.com/rprichard/winpty/releases/download/0.2.2/winpty-0.2.2-cygwin-2.4.1-ia32.tar.gz
Resolving github.com (github.com)... 127.8.0.1
Connecting to github.com (github.com)|127.8.0.1|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/3829192/1def7380-dc09-11e5-9d6b-b25fe84177fa.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160426%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160426T111913Z&X-Amz-Expires=300&X-Amz-Signature=d6723b2471cdaa4715829d5aa3291416e9ac0737be0821a2f3f96b3b6bcd4b04&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dwinpty-0.2.2-cygwin-2.4.1-ia32.tar.gz&response-content-type=application%2Foctet-stream [following]
--2016-04-26 19:19:14-- https://github-cloud.s3.amazonaws.com/releases/3829192/1def7380-dc09-11e5-9d6b-b25fe84177fa.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160426%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160426T111913Z&X-Amz-Expires=300&X-Amz-Signature=d6723b2471cdaa4715829d5aa3291416e9ac0737be0821a2f3f96b3b6bcd4b04&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dwinpty-0.2.2-cygwin-2.4.1-ia32.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 127.8.0.2
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|127.8.0.2|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 738939 (722K) [application/octet-stream]
Saving to: ‘winpty-0.2.2-cygwin-2.4.1-ia32.tar.gz’

winpty-0.2.2-cygwin-2.4. 100%[====================================>] 721.62K 56.0KB/s in 22s

2016-04-26 19:19:42 (32.1 KB/s) - ‘winpty-0.2.2-cygwin-2.4.1-ia32.tar.gz’ saved [738939/738939]

Cloning into '/home/sguo/.babun-docker'...
remote: Counting objects: 151, done.
remote: Total 151 (delta 0), reused 0 (delta 0), pack-reused 151
Receiving objects: 100% (151/151), 25.94 KiB | 13.00 KiB/s, done.
Resolving deltas: 100% (50/50), done.
Checking connectivity... done.
{ ~ } » docker ps
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/json: open //./pipe/docker_engine: The system cannot find the file specified.
{ ~ } » docker run -it ubuntu bash
cannot enable tty mode on non tty input

seem still not work. I tired that twice but same result.

That's very strange @July-G, it looks like it installed everything but then it didn't use it... But it isn't even showing an error.

After the docker ps, the error line with //./pipe/docker_engine: The system cannot find the file specified. should trigger babun-docker, but it seems as if it wasn't using babun-docker but the docker binary directly.

And then the same with the docker run -it ubuntu bash, the error cannot enable tty mode on non tty input should trigger the use of winpty in babun-docker.

You are using Babun, right?

What do you get when you type: which docker?
What do you get when you type: echo $SHELL?

i have encounter the same problem, it has been resolved after recompiling winpty
hope that helpful for you !

Thanks @wilsonwsong for reporting it. As I haven't heard from @July-G in some time I will assume it was solved and close this issue.