Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Exit status 255 #66

Closed
kevinSuttle opened this issue Aug 12, 2015 · 55 comments
Closed

Exit status 255 #66

kevinSuttle opened this issue Aug 12, 2015 · 55 comments

Comments

@kevinSuttle
Copy link

This is what happens after running the Docker QuickStart Terminal.app for me.

screen shot 2015-08-12 at 3 33 55 pm

@jmorganca jmorganca added the bug label Aug 12, 2015
@jmorganca jmorganca changed the title Asking for Password? Exist status 255 Aug 12, 2015
@jmorganca
Copy link
Contributor

Thanks! Are there any logs if you scroll up?

@kevinSuttle
Copy link
Author

Ah, there are. Didn't see those.

Machine default already exists.
Starting machine default...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Setting environment variables for machine default...

Starting VM...
Too many retries.  Last error: Maximum number of retries (60) exceeded
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Setting environment variables for machine default...
❯ docker-machine-env
fish: Unknown command 'docker-machine-env'

@jmorganca
Copy link
Contributor

Thanks! Looking.

@kevinSuttle kevinSuttle changed the title Exist status 255 Exit status 255 Aug 13, 2015
@kranthides
Copy link

I am facing the similar issue after updating from boot2docker to docker tools in Mac

@vijayrawatsan
Copy link

Facing the same issue

@hoang0
Copy link

hoang0 commented Aug 13, 2015

I'm having a similar issue running Docker in Windows 8.1:

image

The docker-machine env command instruction is not clear. Let me know what you guys find out.

@ameyrk
Copy link

ameyrk commented Aug 14, 2015

Same issue

@ameyrk
Copy link

ameyrk commented Aug 16, 2015

Looks like this happens when you leave system idle for a long time on windows 8.1. I am checking this and let you know if I find more information.

@ameyrk
Copy link

ameyrk commented Aug 16, 2015

Hi All,

The below issue is replicable on Windows 8.1. However, I am not sure on other OS.

issue

This happens, when you leave the system idle and eventually systems falls asleep. When you login back this issue happens. The command "docker-machine.exe env default" hangs and gives no o/p. You get the same error if you close the client and re-open it and also, no matter how many times you restart the virtual machine, the issue will persist. The only solution to get rid of this problem is you have to restart your machine.

Looks like I have found the problem, please see the below screenshot and the steps.

  1. I started my windows machine and launched the "Docker Quick Start Terminal" it launches as usual without any errors.
  2. Now I went to the windows cmd terminal and played the "ipconfig /all" command. My left hand side window (please see the below screen shot) is the screen grab of the command "ipconfig /all" in windows cmd terminal.
  3. Now I leave my machine idle and make it fall asleep.
  4. I wake my machine from sleep and re-login.
  5. Now I play the "docker-machine.exe env default" command in the docker client terminal it hangs and produces no o/p.
  6. I close the docker client terminal and relaunch it. The issue persists (1st screenshot)
  7. Now this time, I run the "ipconfig /all" in windows cmd terminal. My right hand side window (please see the below screen shot) is the screen grab of the command "ipconfig /all" in windows cmd terminal. Here you see , new attributes "Autoconfiguration IPV4 address & subnet mask" are added under the section "Ethernet adapter VirtualBox Host-Only Network Images on website are not retina #2:" . And also IPV4 address is marked as duplicate.

duplicate-ip

Could you please look into this issue?

Thanks,
Amey

@wjimenez5271
Copy link

Having similar issue:

 $  docker-machine start default
exit status 1
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.

then when I run that:

$ docker-machine env
Error: Expected either one machine name, or -u flag to unset the variables in the arguments.

or

$ docker-machine env default
default is not running. Please start this with docker-machine start default

On OSX 10.10.4. Not sure how to work around this one, all the docker commands seem to fail because of it.

@wjimenez5271
Copy link

upon further investigation it might be a different root cause, created a ticket to track it here: #105

@ryguyrg
Copy link

ryguyrg commented Aug 24, 2015

Also was seeing this issue. Stopped + removed 'default' VM from VirtualBox and re-ran this command:
. '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'

This worked.

@michaeljs1990
Copy link

@ryguyrg just tried this and it's not working for me.

@michaeljs1990
Copy link

upgrading to the test build of virtual box worked for me and seems to also have worked for many others. Shame the install process on mac is still a pain. boot2docker was not fun to use as well.

@princesspanda
Copy link

Doing what @ryguyrg did worked for me.

@yurishkuro
Copy link

Following @ryguyrg suggestion:

Creating Machine default...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...

and it hangs here. If I re-run the command in another terminal:

Machine default already exists in VirtualBox.
Starting machine default...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Setting environment variables for machine default...
[ docker image ]
Password:

and it hangs on password prompt. This is with a fresh install of the toolbox, downloaded on Sep-02.

@kevinSuttle
Copy link
Author

@JeffDM Any ideas?

@Diego81
Copy link

Diego81 commented Sep 3, 2015

I am facing the same issue

@jason13
Copy link

jason13 commented Sep 3, 2015

Try "docker-machine ls" see if the default machine status is Timeout, then stop it.
Try "docker-machine ls" see if the status become Stop. And close terminal windows.
Relaunch Docker Quick Start Terminal again and it work fine.
It work for me and you can try.

@yurishkuro
Copy link

@jason13 just tried that, the machine was indeed in Timeout status. After I stopped it and ran Quick Start, the quick start script in one terminal locked up after this output

$ . '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'
Machine default already exists in VirtualBox.
Starting machine default...
Starting VM...

Is this supposed to hang?

When I ran the same quick start from another terminal, it looks like it worked, I got back to the prompt, and the docker command is working.

@jason13
Copy link

jason13 commented Sep 3, 2015

It won't hang but run a little longer then before. I think it might back to normal when you run next time.

@yurishkuro
Copy link

huh, so I Ctrl-C killed that process, and it also fell back into prompt with Docker image printed above. Maybe there's a bug there that makes it wait forever for something.

@towry
Copy link

towry commented Sep 6, 2015

Looks like this happens when you leave system idle for a long time on windows 8.1. I am checking this and let you know if I find more information.

I have the same issue, it seems that I have to restart my mac to solve the problem.

@tiangolo
Copy link
Contributor

tiangolo commented Sep 9, 2015

@ameyrk nailed it down for Windows in this comment #66 (comment).

I confirm the same issue happens in Windows 7:

After a sleep / wake cycle, Windows detects the Host-Only network as a "duplicate" and changes its IP. After that, docker-machine (or the Quickstart terminal) doesn't work anymore.

It is probably caused by this VirtualBox bug (from 4 years ago): https://www.virtualbox.org/ticket/9151, so there doesn't seem to be a fix soon from VirtualBox. And it's probably a Windows bug.


The quick workaround that worked for me was:

  • Open VirtualBox
  • Go to File -> Preferences -> Network -> Host-only Networks
  • Docker Toolbox probably created a second Host-only network, probably named "VirtualBox Host-Only Ethernet Adapter # 2", double click that
  • Change the "IPv4 Address" from something like 192.168.99.1 to something like 192.168.99.2 (you will probably have to increase / decrease the IP every time). But it's important that the IP actually changes.
  • Hit OK. If the IP changed (it should have changed), you will be prompted for you "Windows Administrator OK" (or however it's named).

After that, the docker-machine and the Quickstart Terminal should work, and that way, you don't have to restart your whole Windows.

@Spanizen
Copy link

I tried to run the lastest 1.8.2c version in windows. All sets of installations are proper but when i check the docker client verison

$ docker verision

The Client OS is displayed as Linux when we checked it in windows OS
docker client os defect

Please suggest

Thanks

@populov
Copy link

populov commented Oct 1, 2015

Looks like on my system for some reason DHCP for virtual network adapter became disabled and it causes error.
You can fix it by setting DHCP settings back manually. Or, like @tiangolo suggested above, change it's IP address and Docker Toolbox will create a new one with appropriate settings.

vbox1
vbox2

@alphabytes
Copy link

Hello All,

i changed the DHCP IP for adapter #2 and still i am facing the same issue.

In docker toolbox:
"You will want to check the provider to make sure the machine and associated resources were properly removed.
Looks like something went wrong... Press any key to continue..."

and i tried running the vm directly from virtualbox i got this...

Failed to open a session for the virtual machine default.
Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).
Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND).
Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

my virtualbox version is latest 5.0.4r102546
i tried all the above suggestions, nothing worked.

@gdm85
Copy link

gdm85 commented Oct 8, 2015

Also affected here with docker-machine on Mac OS X (not yet El Capitan)

@michaeljs1990
Copy link

100% Fresh install of El Capitan with no modifications made yet. Installed Docker Toolbox and get this error when starting up the VM.

Tried upgrading to virtualbox 5.0.6 with no luck.

@gdm85
Copy link

gdm85 commented Oct 10, 2015

I built docker-machine from master and that worked, so I think something was fixed there

@michaeljs1990
Copy link

So very odd issue... I was fighting with this and trying to recreate it in various way tweaking setting but i finally just tried to ssh into the machine using

ssh docker@localhost -p 52350

You can find the port for your machine in the virtualbox settings as it might be different.

When i ran this it game me the output of

Bad owner or permissions on /Users/michael/.ssh/config

I went in and chmod 755'ed that file as well as setting my id_rsa to 600 which is had not been before. After doing this i removed and recreated the machine and everything worked... I wonder how many of these issues are being caused by odd ssh config files or bad permissions.

I am running docker-machine Version: 0.4.1 (e2c88d6)

Michaels-MBP:.osx michael$ docker info
Containers: 0
Images: 0
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.0.9-boot2docker
Operating System: Boot2Docker 1.8.2 (TCL 6.4); master : aba6192 - Thu Sep 10 20:58:17 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: default
ID: HBPL:7IAO:ODRC:VE5Q:WRSH:SQD5:4IW2:GDHK:NUEB:76TJ:KIRR:RO6B
Debug mode (server): true
File Descriptors: 10
Goroutines: 16
System Time: 2015-10-10T18:37:28.015442481Z
EventsListeners: 0
Init SHA1: 
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
 provider=virtualbox

@mcMickJuice
Copy link

@michaeljs1990 I'm trying what you posted and i don't even see a config file in this directory. Only a github_rsa file... I'm assuming that's part of my problem

@meeleem
Copy link

meeleem commented Oct 20, 2015

I had the issue with error message "Get http://127.0.0.1:2375/v1.20/version: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it..

  • Are you trying to connect to a TLS-enabled daemon without TLS?
  • Is your docker daemon up and running?" (routed from another issue to discussion here).

What solved the issue for me (on Win 8.1) was:

  • I deleted the default installed container
  • Run CMD as admin
  • Re-run the start.sh from directory "..\Docker Toolbox"

Not sure whether this helps anyone but at least this solved the error regarding "no connection".

@NataliaMetelskaya
Copy link

@meeleem thank you! it helps, just resolved the same issue on Win 7.

@michaeljs1990
Copy link

anyone who gets this issue please print out the output of

ssh docker@localhost -p {{ ssh port }}

you can find ssh port in docker-machine inspect default. Every issue seems to be related to this although you are fixing it in different ways i'm almost positive at this point the underlying issue is the VM coming up with an invalid authorized_keys file or something similar.

@mchiang0610
Copy link
Contributor

Possible to continue this dialog inside #153 ? Trying to merge all the issues to really help us troubleshoot further.

@michaeljs1990
Copy link

It does not look to be the same issue to me. Although the very last post in here belongs in the ticket you mentioned this issue is much more likely to show up when googling for the 255 error which seems to be an ssh issue.

@mchiang0610
Copy link
Contributor

@michaeljs1990 It's not always the same issue, but we are trying to get down to the bottom of this with the Docker machine team as well. A centralized place for machine issue will help with that.

from machine team: 255 is a generic error code

@michaeljs1990
Copy link

Got you didn't read the ticket title well enough. Should the other ticket redirect to the machine repo? The only reason I have been posting in here is because this has much more info on the issue then the actual machine repository.

@mchiang0610
Copy link
Contributor

@michaeljs1990 Thanks. Sorry for the misunderstanding. I am just doing what helps the machine team the most.

We have seen a lot of exit status 255 issues from Kitematic and Toolbox, and they are not always caused by the same issue it seems. Having a place for the machine team to just go in and help in my opinion is beneficial. We can certainly re-open this issue if you feel reopening will be more helpful.

@DanHenry4
Copy link

@meeleem Thanks.

I was getting the "connection actively refused" message. Deleting the machine from VirtualBox and running ./start.sh in a BASH got it to work.

@CChapin-G
Copy link

@meeleem ++, Thanks, your workaround solved the "connection actively refused" for me as well. My procedure matches what @DanHenry4 also did.

@haneefkassam
Copy link

@meeleem Thanks!! Your fix worked! I just deleted the vm, then ran the quickstart termnial as admin and it worked fine. Must've been something in setting up the ssh keys (connection was actively refused by the destination) or something that required admin privileges.

@vinaydate
Copy link

@meeleem Worked, Thanks

@impanda-cookie
Copy link

@yurishkuro Thanks!

I'm run this script in iTerm2 and it worked for me.

$ . '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'
Machine default already exists in VirtualBox.
Starting machine default...
Starting VM...

@gvko
Copy link

gvko commented Feb 8, 2016

For me the process hung on

Machine default already exists in VirtualBox.
Starting machine default...
Starting VM...

and I interrupted the process forcefully and that caused the problem with error code 255. Tried to remove the VMs, but in the end a simple restart of my Mac did fix the issue.

@toamitkumar
Copy link

The process was hung for me as well. Found I was on an older version of VB, upgrading fixed it

@HananBahy
Copy link

problem :Exit status 255
solution:
1-I turn off 'default' machine from VM virtualBox .
2-then open Quick start terminal and it works .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests