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

Kan inte starta pipelinen #6

Open
dmarell opened this issue Nov 18, 2014 · 5 comments
Open

Kan inte starta pipelinen #6

dmarell opened this issue Nov 18, 2014 · 5 comments

Comments

@dmarell
Copy link
Contributor

dmarell commented Nov 18, 2014

$ cd dockerApplicationServer2

$ git pull
Already up-to-date.

$ boot2docker up
Waiting for VM and Docker daemon to start...
..................ooo
Started.
Writing /Users/daniel/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/daniel/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/daniel/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

$ docker ps a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

$ vagrant up --no-parallel --provider docker
Bringing machine 'git' up with 'docker' provider...
Bringing machine 'repository' up with 'docker' provider...
Bringing machine 'registry' up with 'docker' provider...
Bringing machine 'go' up with 'docker' provider...
Bringing machine 'go-agent' up with 'docker' provider...
==> git: Docker host is required. One will be created if necessary...
    git: Docker host VM is already ready.
==> repository: Docker host is required. One will be created if necessary...
    repository: Docker host VM is already ready.
==> repository: Syncing folders to the host VM...
    repository: Mounting shared folders...
    repository: /var/lib/docker/docker_1416261732_14428 => /Volumes/ssd1t/swc/dockerApplicationServer2
==> repository: Warning: When using a remote Docker host, forwarded ports will NOT be
==> repository: immediately available on your machine. They will still be forwarded on
==> repository: the remote machine, however, so if you have a way to access the remote
==> repository: machine, then you should be able to access those ports there. This is
==> repository: not an error, it is only an informational message.
==> repository: Creating the container...
    repository:   Name: repository
    repository:  Image: mattgruter/artifactory
    repository: Volume: /vagrant/artifactory/logs:/artifactory/logs
    repository: Volume: /var/lib/docker/docker_1416261732_14428:/vagrant
    repository:   Port: 18080:8080
A Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.

Command: "docker" "run" "--name" "repository" "-d" "-p" "18080:8080" "-v" "/vagrant/artifactory/logs:/artifactory/logs" "-v" "/var/lib/docker/docker_1416261732_14428:/vagrant" "mattgruter/artifactory"

Stderr: 2014/11/17 22:02:12 Error response from daemon: Conflict, The name repository is already assigned to 3279769543a8. You have to delete (or rename) that container to be able to assign repository to a container again.

Stdout: 

Rebooting


$ vagrant global-status
 id       name        provider   state        directory                                          
------------------------------------------------------------------------------------------------
32aca5f  default     docker     running      /Volumes/ssd1t/swc/dockerApplicationServer         
7e71846  db          docker     running      /Volumes/ssd1t/swc/dockerApplicationServer         
89187eb  app         docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
be64c57  registry    docker     stopped      /Volumes/ssd1t/swc/dockerApplicationServer         
50f3953  nginx-proxy docker     stopped      /Volumes/ssd1t/swc/dockerApplicationServer         
2595eee  default     virtualbox running      /Volumes/ssd1t/swc/dockerApplicationServer/docker  
d14cff6  default     virtualbox inaccessible /Users/daniel/apps/elk                             
a5d9ef7  git         docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
fd749fc  repository  docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
7bb738d  go          docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
63e05a8  go-agent    docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
ba303f3  default     virtualbox running      /Volumes/ssd1t/swc/javadevmachine/test1            
cce783d  default     virtualbox running      /Volumes/ssd1t/swc/javadevmachine                  
3d6ef74  ubuntu      virtualbox poweroff     /Volumes/ssd1t/swc/iac-prep                        
07141bc  docker      virtualbox poweroff     /Volumes/ssd1t/swc/iac-prep                        
a6bf564  default     virtualbox aborted      /Volumes/ssd1t/swc/dockerApplicationServer2/docker 
3548003  git         docker     running      /Volumes/ssd1t/swc/dockerApplicationServer2        

$ vagrant global-status --prune
/Volumes/ssd1t/swc/iac-prep/Vagrantfile:5: warning: already initialized constant VAGRANTFILE_API_VERSION
/Volumes/ssd1t/swc/iac-prep/Vagrantfile:5: warning: previous definition of VAGRANTFILE_API_VERSION was here
/Volumes/ssd1t/swc/dockerApplicationServer2/Vagrantfile:6: warning: already initialized constant VAGRANTFILE_API_VERSION
/Volumes/ssd1t/swc/iac-prep/Vagrantfile:5: warning: previous definition of VAGRANTFILE_API_VERSION was here
The working directory for Vagrant doesn't exist! This is the
specified working directory:

docker

$ vagrant global-status
id       name        provider   state        directory                                          
------------------------------------------------------------------------------------------------
32aca5f  default     docker     running      /Volumes/ssd1t/swc/dockerApplicationServer         
7e71846  db          docker     running      /Volumes/ssd1t/swc/dockerApplicationServer         
89187eb  app         docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
be64c57  registry    docker     stopped      /Volumes/ssd1t/swc/dockerApplicationServer         
50f3953  nginx-proxy docker     stopped      /Volumes/ssd1t/swc/dockerApplicationServer         
2595eee  default     virtualbox running      /Volumes/ssd1t/swc/dockerApplicationServer/docker  
d14cff6  default     virtualbox inaccessible /Users/daniel/apps/elk                             
a5d9ef7  git         docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
fd749fc  repository  docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
7bb738d  go          docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
63e05a8  go-agent    docker     preparing    /Volumes/ssd1t/swc/dockerApplicationServer         
ba303f3  default     virtualbox running      /Volumes/ssd1t/swc/javadevmachine/test1            
cce783d  default     virtualbox running      /Volumes/ssd1t/swc/javadevmachine                  
3d6ef74  ubuntu      virtualbox poweroff     /Volumes/ssd1t/swc/iac-prep                        
07141bc  docker      virtualbox poweroff     /Volumes/ssd1t/swc/iac-prep                        
a6bf564  default     virtualbox aborted      /Volumes/ssd1t/swc/dockerApplicationServer2/docker 
3548003  git         docker     running      /Volumes/ssd1t/swc/dockerApplicationServer2        

$ vagrant destroy -f 32aca5f
The working directory for Vagrant doesn't exist! This is the
specified working directory:

/Volumes/ssd1t/swc/dockerApplicationServer

Det är helt riktigt, den mappen har jag tagit bort.

Bör jag radera någon trasig virtualbox-maskin eller rensa nåt annat?


$ VBoxManage list vms
"<inaccessible>" {bdb7b285-d4ec-4221-b0ca-835965a92533}
"<inaccessible>" {ebdad6e7-c956-44cf-9167-cd0184088642}
"boot2docker-vm" {e94650d7-4354-430b-ad75-b3b67f79037b}
"iac-prep_ubuntu_1416251021063_97193" {8b7b357c-d235-40f6-8a3a-fd9c21a60ed1}
"iac-prep_docker_1416251117795_39002" {27fde231-be88-49f3-9ccd-17ac306ccab8}
"docker_default_1416259388107_9661" {798ac7c6-34c1-4d22-9d76-fe8b0476443c}
@sennerholm
Copy link
Member

Hej!

Du behöver inte ha boot2docker installerat eller körande för att få igång
vagrant setupen, det kan tom bli så att de bråkar om samma portnummer.

Felmeddelandet du fick brukar bero på att du man har försökt att starta en
docker instans med det namnet redan, men att den inte avregistrerats, då
behöver du logga in i docker vmen och titta med docker ps -a och sedan ta
bort den med docker rm.

För att få igång din miljö kan du behöva rensa dina VMar, svårt att säga
vilka, men starta virtualbox UIt och se vilka som har diskar som ligger i
de katalogerna du plockat bort och ta bort dom.

Mvh Mikael

2014-11-18 7:34 GMT+01:00 dmarell [email protected]:

$ cd dockerApplicationServer

$ git pull
Already up-to-date.

$ boot2docker up
Waiting for VM and Docker daemon to start...
..................ooo
Started.
Writing /Users/daniel/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/daniel/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/daniel/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

$ docker ps a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

$ vagrant up --no-parallel --provider docker
Bringing machine 'git' up with 'docker' provider...
Bringing machine 'repository' up with 'docker' provider...
Bringing machine 'registry' up with 'docker' provider...
Bringing machine 'go' up with 'docker' provider...
Bringing machine 'go-agent' up with 'docker' provider...
==> git: Docker host is required. One will be created if necessary...
git: Docker host VM is already ready.
==> repository: Docker host is required. One will be created if
necessary...
repository: Docker host VM is already ready.
==> repository: Syncing folders to the host VM...
repository: Mounting shared folders...
repository: /var/lib/docker/docker_1416261732_14428 =>
/Volumes/ssd1t/swc/dockerApplicationServer2
==> repository: Warning: When using a remote Docker host, forwarded ports
will NOT be
==> repository: immediately available on your machine. They will still be
forwarded on
==> repository: the remote machine, however, so if you have a way to
access the remote
==> repository: machine, then you should be able to access those ports
there. This is
==> repository: not an error, it is only an informational message.
==> repository: Creating the container...
repository: Name: repository
repository: Image: mattgruter/artifactory
repository: Volume: /vagrant/artifactory/logs:/artifactory/logs
repository: Volume: /var/lib/docker/docker_1416261732_14428:/vagrant
repository: Port: 18080:8080
A Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.

Command: "docker" "run" "--name" "repository" "-d" "-p" "18080:8080" "-v"
"/vagrant/artifactory/logs:/artifactory/logs" "-v"
"/var/lib/docker/docker_1416261732_14428:/vagrant" "mattgruter/artifactory"

Stderr: 2014/11/17 22:02:12 Error response from daemon: Conflict, The name
repository is already assigned to 3279769543a8. You have to delete (or
rename) that container to be able to assign repository to a container again.

Stdout:

*** REBOOT ***

$ vagrant global-status
id name provider state directory

32aca5f default docker running /Volumes/ssd1t/swc/dockerApplicationServer

7e71846 db docker running /Volumes/ssd1t/swc/dockerApplicationServer

89187eb app docker preparing /Volumes/ssd1t/swc/dockerApplicationServer

be64c57 registry docker stopped /Volumes/ssd1t/swc/dockerApplicationServer

50f3953 nginx-proxy docker stopped
/Volumes/ssd1t/swc/dockerApplicationServer

2595eee default virtualbox running
/Volumes/ssd1t/swc/dockerApplicationServer/docker

d14cff6 default virtualbox inaccessible /Users/daniel/apps/elk

a5d9ef7 git docker preparing /Volumes/ssd1t/swc/dockerApplicationServer

fd749fc repository docker preparing
/Volumes/ssd1t/swc/dockerApplicationServer

7bb738d go docker preparing /Volumes/ssd1t/swc/dockerApplicationServer

63e05a8 go-agent docker preparing
/Volumes/ssd1t/swc/dockerApplicationServer

ba303f3 default virtualbox running /Volumes/ssd1t/swc/javadevmachine/test1

cce783d default virtualbox running /Volumes/ssd1t/swc/javadevmachine

3d6ef74 ubuntu virtualbox poweroff /Volumes/ssd1t/swc/iac-prep

07141bc docker virtualbox poweroff /Volumes/ssd1t/swc/iac-prep

a6bf564 default virtualbox aborted
/Volumes/ssd1t/swc/dockerApplicationServer2/docker
3548003 git docker running /Volumes/ssd1t/swc/dockerApplicationServer2

$ vagrant global-status --prune
/Volumes/ssd1t/swc/iac-prep/Vagrantfile:5: warning: already initialized
constant VAGRANTFILE_API_VERSION
/Volumes/ssd1t/swc/iac-prep/Vagrantfile:5: warning: previous definition of
VAGRANTFILE_API_VERSION was here
/Volumes/ssd1t/swc/dockerApplicationServer2/Vagrantfile:6: warning:
already initialized constant VAGRANTFILE_API_VERSION
/Volumes/ssd1t/swc/iac-prep/Vagrantfile:5: warning: previous definition of
VAGRANTFILE_API_VERSION was here
The working directory for Vagrant doesn't exist! This is the
specified working directory:

docker

$ vagrant destroy -f 32aca5f
The working directory for Vagrant doesn't exist! This is the
specified working directory:

/Volumes/ssd1t/swc/dockerApplicationServer

Det är helt riktigt, den mappen har jag tagit bort.

Bör jag radera någon trasig virtualbox-maskin eller rensa nåt annat?

$ VBoxManage list vms
"" {bdb7b285-d4ec-4221-b0ca-835965a92533}
"" {ebdad6e7-c956-44cf-9167-cd0184088642}
"boot2docker-vm" {e94650d7-4354-430b-ad75-b3b67f79037b}
"iac-prep_ubuntu_1416251021063_97193"
{8b7b357c-d235-40f6-8a3a-fd9c21a60ed1}
"iac-prep_docker_1416251117795_39002"
{27fde231-be88-49f3-9ccd-17ac306ccab8}
"docker_default_1416259388107_9661" {798ac7c6-34c1-4d22-9d76-fe8b0476443c}
$


Reply to this email directly or view it on GitHub
#6.

Mikael Sennerholm
+46707401585

@dmarell
Copy link
Contributor Author

dmarell commented Nov 18, 2014

Det fungerade förut. Det är nåt felaktigt state nånstans på min maskin som jag inte hittar.

Jag plockade bort alla VM:ar. Då ser det ut så här

$ ll ~/VirtualBox\ VMs/

$ VBoxManage list vms

$ git pull
Already up-to-date.

$ vagrant up --no-parallel --provider docker
Bringing machine 'git' up with 'docker' provider...
Bringing machine 'repository' up with 'docker' provider...
Bringing machine 'registry' up with 'docker' provider...
Bringing machine 'go' up with 'docker' provider...
Bringing machine 'go-agent' up with 'docker' provider...
==> git: Docker host is required. One will be created if necessary...
    git: Vagrant will now create or start a local VM to act as the Docker
    git: host. You'll see the output of the `vagrant up` for this VM below.
    git:  
    git: Importing base box 'sennerholm/boot2docker'...
    git: Matching MAC address for NAT networking...
    git: Setting the name of the VM: docker_default_1416310741407_8101
    git: Clearing any previously set network interfaces...
    git: Preparing network interfaces based on configuration...
    git: Adapter 1: nat
    git: Forwarding ports...
    git: 2375 => 2375 (adapter 1)
    git: 28153 => 28153 (adapter 1)
    git: 80 => 8080 (adapter 1)
    git: 18080 => 18080 (adapter 1)
    git: 28080 => 28080 (adapter 1)
    git: 38080 => 38080 (adapter 1)
    git: 48080 => 48080 (adapter 1)
    git: 58080 => 58080 (adapter 1)
    git: 22 => 2222 (adapter 1)
    git: Running 'pre-boot' VM customizations...
    git: Booting VM...
    git: Waiting for machine to boot. This may take a few minutes...
    git: SSH address: 127.0.0.1:2222
    git: SSH username: docker
    git: SSH auth method: private key
    git: Warning: Connection timeout. Retrying...
    git: Warning: Authentication failure. Retrying...
    git: Machine booted and ready!
GuestAdditions versions on your host (4.3.18) and guest (4.3.18 r96516) do not match.
The guest's platform is currently not supported, will try generic Linux method...
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installing Virtualbox Guest Additions 4.3.18 - guest version is 4.3.18 r96516
mkdir: can't create directory '/tmp/selfgz84714041': No such file or directory
Cannot create target directory /tmp/selfgz84714041
You should try option --target OtherDirectory
An error occurred during installation of VirtualBox Guest Additions 4.3.18. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
    git: Checking for guest additions in VM...
==> git: Syncing folders to the host VM...
    git: Mounting shared folders...
    git: /var/lib/docker/docker_1416310771_40377 => /Volumes/ssd1t/swc/dockerApplicationServer2/data/git
    git: /var/lib/docker/docker_1416310771_83685 => /Volumes/ssd1t/swc/dockerApplicationServer2
    git: /mnt/docker_build_650fc4c568d28b40fa4fe36f615bd0a5 => /Volumes/ssd1t/swc/dockerApplicationServer2/git
==> git: Building the container from a Dockerfile...
    git: Image: d3ee05f67a3e
==> git: Warning: When using a remote Docker host, forwarded ports will NOT be
==> git: immediately available on your machine. They will still be forwarded on
==> git: the remote machine, however, so if you have a way to access the remote
==> git: machine, then you should be able to access those ports there. This is
==> git: not an error, it is only an informational message.
==> git: Creating the container...
    git:   Name: git
    git:  Image: d3ee05f67a3e
    git: Volume: /var/lib/docker/docker_1416310771_40377:/git
    git: Volume: /var/lib/docker/docker_1416310771_83685:/vagrant
    git:   Port: 19418:9418
    git:  
    git: Container created: e6419b9a2def0e21
==> git: Starting container...
==> git: Provisioners will not be run since container doesn't support SSH.
==> repository: Docker host is required. One will be created if necessary...
    repository: Docker host VM is already ready.
==> repository: Syncing folders to the host VM...
    repository: Mounting shared folders...
    repository: /var/lib/docker/docker_1416311098_45218 => /Volumes/ssd1t/swc/dockerApplicationServer2
A Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.

Command: "docker" "ps" "-a" "-q" "--no-trunc"

Stderr: 2014/11/18 11:44:59 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

Stdout: 
$ 

@dmarell
Copy link
Contributor Author

dmarell commented Nov 18, 2014

Nu är pipelinen uppe igen. Så här gjorde jag:
För att bli av med "stale" vagrant machines som syns när man gör vagrant global-status gjorde jag

$ rm -rf ~/.vagrant.d

då blev följande listning äntligen tom:

$ vagrant global-status

För säkerhets skull har jag rensat bort virtualbox-instanser på maskinen, följande ger alltså ingen output:

$ VBoxManage list vms

Uppstartsförsök:

$ vagrant up --no-parallel --provider docker
... The container never entered the "running" state ...

Kör igen, envis:

$ vagrant up --no-parallel --provider docker
... Conflict, The name repository is already assigned to e32f43ca6dcb ...

Detta är tydligen en känd bug i Docker, man tar då bort Docker-instansen som pekas ut ("repository") och försöker sedan starta igen. För att kunna ssh:a in i boot2docker-maskinen måste vi ha dess id:

$ vagrant global-status
id       name       provider   state     directory                                          
--------------------------------------------------------------------------------------------
3c85b8c  default    virtualbox running   /Volumes/ssd1t/swc/dockerApplicationServer2/docker 
da6e47f  git        docker     preparing /Volumes/ssd1t/swc/dockerApplicationServer2        
7a2c82f  repository docker     preparing /Volumes/ssd1t/swc/dockerApplicationServer2        

$ vagrant ssh 3c85b8c
...
docker@boot2docker:~$ docker ps a
CONTAINER ID        IMAGE                           COMMAND                CREATED             STATUS              PORTS                     NAMES
e32f43ca6dcb        mattgruter/artifactory:latest   "/run.sh"              11 minutes ago      Up 11 minutes       0.0.0.0:18080->8080/tcp   repository          
9f019c418427        2a0e69ff26df                    "/bin/sh -c 'ls -la    14 minutes ago      Up 14 minutes       0.0.0.0:19418->9418/tcp   git

docker@boot2docker:~$ docker rm -f e32f43ca6dcb

$ vagrant up --no-parallel --provider docker
... The container never entered the "running" state ...

och ytterligare en gång till:

$ vagrant up --no-parallel --provider docker

Detta kördes utan fel. Nu når jag Go på http://localhost:28153/go

Tack för hjälpen!

@sennerholm
Copy link
Member

Kan någon annan prova texten i READMEn och se om det fixar sig.

@sennerholm
Copy link
Member

Funkar det nu?

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

No branches or pull requests

2 participants