Closed aanm closed 9 years ago
@aanm Hey - thanks for making the issue - this is much better than IRC (and sorry I missed you last week it was a busy week :-)
So - I'm trying to get my vagrant into a state where I can replicate your problem. The issue I'm finding is when I start powerstrip-weave - I get this error:
docker: error while loading shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory
Which is because the docker client (mounted via -v /usr/bin/docker:/usr/bin/docker
) is not statically linked.
So - what I'm trying to work out is how you are getting the powerstrip-weave container to run at all. The VM I'm using to test is Fedora release 21 (Twenty One)
.
This is very much linked to issue #8
There are 2 issues with this a) until I get passed it I can't replicate your problem b) it suggests there is a different setup between us which we need to track down first
Is there anything funky going on with your base docker installation - for example is your docker client statically linked?
Try to run this vagrant file. I was able to get the same issue with it.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "kaorimatz/fedora-21-x86_64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "10.0.0.2"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
sudo yum install docker device-mapper-libs -y
SHELL
end
Ahhhh ok - thanks, it's this line sudo yum install docker device-mapper-libs -y
- proceeding now!
Hey - so I've just managed to get Fedora to work using a client only 1.3.1 version of docker mounted in the container...
I pushed it here: https://github.com/binocarlos/powerstrip-weave/tree/clientonly-docker
You need to docker build -t binocarlos/powerstrip-weave .
If you could give that a test and report back I would be most grateful :-)
Thanks for looking it up. I'm having the same problem (The 10000 ms elapsed). Also:
[aanm@localhost powerstrip-demo]$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
de9b658967ff zettio/weave:git-d1400bc23377 "/home/weave/weaver 2 minutes ago Up 2 minutes 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
e2a264130f1c clusterhq/powerstrip:latest "twistd -noy powerst 2 minutes ago Up 2 minutes 0.0.0.0:2375->2375/tcp powerstrip
d1c0d681deab binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 2 minutes ago Up 2 minutes 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo docker logs de9b658967ff
weave 2015/03/05 19:48:00.339388 Command line options: map[iface:ethwe name:7a:5a:98:82:8f:70 wait:20]
weave 2015/03/05 19:48:00.339412 Command line peers: []
weave 2015/03/05 19:48:11.353639 Communication between peers is unencrypted.
weave 2015/03/05 19:48:11.353686 Our name is 7a:5a:98:82:8f:70 (de9b658967ff)
weave 2015/03/05 19:48:11.517079 Sniffing traffic on &{57 65535 ethwe 4e:e2:92:6b:69:1f up|broadcast|multicast}
weave 2015/03/05 19:48:11.520461 Discovered our MAC 4e:e2:92:6b:69:1f
weave 2015/03/05 19:48:11.864675 Discovered local MAC ae:21:5e:e2:e4:52
[aanm@localhost powerstrip-demo]$ sudo docker logs e2a264130f1c
export DOCKER_HOST=tcp://localhost:2375
2015-03-05 19:47:52+0000 [-] Log opened.
2015-03-05 19:47:52+0000 [-] twistd 14.0.0 (/usr/bin/python 2.7.6) starting up.
2015-03-05 19:47:52+0000 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2015-03-05 19:47:52+0000 [-] ServerProtocolFactory starting on 2375
2015-03-05 19:47:52+0000 [-] Starting factory <powerstrip.powerstrip.ServerProtocolFactory instance at 0x7f58b5f315a8>
[aanm@localhost powerstrip-demo]$ sudo docker logs d1c0d681deab
de9b658967ff3f09ceb3f201ac943e7eff2c0062aba66f54e195cb19acacbb42
server listening on port: 80
@binocarlos Any news?
+1 have same kind of issue.. any update on this issue will be helpful.
Hey - am sorry this has taken so long to get around to.
So - here are the steps I've just replicated and have gotten powerstrip-weave to work:
The Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "kaorimatz/fedora-21-x86_64"
config.vm.network "private_network", ip: "10.0.0.2"
config.vm.provision "shell", inline: <<-SHELL
sudo yum install docker device-mapper-libs -y
SHELL
end
First get machine booted:
$ vagrant up
$ vagrant ssh
Now disable selinux:
vagrant$ sudo setenforce 0
vagrant$ sudo getenforce
Start docker:
vagrant$ sudo service docker start
Create adapters.yml
$ mkdir -p ~/powerstrip-demo
$ cat > ~/powerstrip-demo/adapters.yml <<EOF
endpoints:
"POST /*/containers/create":
pre: [weave]
"POST /*/containers/*/start":
post: [weave]
"POST /*/containers/*/restart":
post: [weave]
adapters:
weave: http://weave/v1/extension
EOF
Pull images:
vagrant$ sudo docker pull clusterhq/powerstrip:latest
vagrant$ sudo docker pull binocarlos/powerstrip-weave:latest
vagrant$ sudo docker pull binocarlos/powerstrip-weave-example:latest
vagrant$ sudo docker pull binocarlos/wait-for-weave:latest
vagrant$ sudo docker pull zettio/weave:latest
Start powerstrip-weave:
vagrant$ sudo docker run -d --name powerstrip-weave \
--expose 80 \
-v /var/run/docker.sock:/var/run/docker.sock \
binocarlos/powerstrip-weave launch
Wait a few moments - then check we have containers:
vagrant$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b1d70256e5f6 zettio/weave:git-8e65c7127d82 "/home/weave/weaver 11 seconds ago Up 10 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
3bae1429240e binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 18 seconds ago Up 18 seconds 80/tcp powerstrip-weave
61ebd9832454 binocarlos/wait-for-weave:latest "/home/weavewait/wai 4 minutes ago Exited (0) 4 minutes ago weavewait
Start powerstrip:
vagrant$ sudo docker run -d --name powerstrip \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $HOME/powerstrip-demo/adapters.yml:/etc/powerstrip/adapters.yml \
--link powerstrip-weave:weave \
-p 2375:2375 \
clusterhq/powerstrip
Run the example:
vagrant$ CID=$(sudo DOCKER_HOST=tcp://127.0.0.1:2375 docker run -e "WEAVE_CIDR=10.255.0.51/24" -d binocarlos/powerstrip-weave-example hello world)
Echo logs:
vagrant$ sudo docker logs $CID
From this I get:
--------------------------------
Network took: 0 ms to connect
Args: hello world
--------------------------------
eth0 Link encap:Ethernet HWaddr 02:42:ac:11:00:07
inet addr:172.17.0.7 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:acff:fe11:7/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:508 (508.0 B) TX bytes:508 (508.0 B)
ethwe Link encap:Ethernet HWaddr 8a:e6:53:d0:2e:d1
inet addr:10.255.0.51 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::88e6:53ff:fed0:2ed1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:65535 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:258 (258.0 B) TX bytes:168 (168.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Can you confirm if when you run through the same - you get the same output?
If you do then I think the answer was because in the example from your script:
DOCKER_HOST=tcp://127.0.0.1:2375 CID=$(sudo docker run -e "WEAVE_CIDR=10.255.0.51/24" -d binocarlos/powerstrip-weave-example hello world)
The above would result in the docker run command being sent via proper docker and not via powerstrip.
The following makes sure that the docker run command is being sent via powerstrip:
CID=$(sudo DOCKER_HOST=tcp://127.0.0.1:2375 docker run -e "WEAVE_CIDR=10.255.0.51/24" -d binocarlos/powerstrip-weave-example hello world)
Also - I've added a folder to the test
folder that can replicate this:
I tried the test and it failed for the same reasons as #13. Am I missing something? I am following your github doc t start.
vagrant ssh vagrant$ sudo bash /vagrant/runtest.sh
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cdb008c7da12 binocarlos/powerstrip-weave-example:latest "bash /srv/app/run.s 3 minutes ago Exited (1) 3 minutes ago test-container
74eff1c5573e zettio/weave:git-8e65c7127d82 "/home/weave/weaver 3 minutes ago Exited (1) 3 minutes ago weave
f8e2612c07c0 clusterhq/powerstrip:latest "twistd -noy powerst 3 minutes ago Up 3 minutes 0.0.0.0:2375->2375/tcp powerstrip
cd1751681add binocarlos/wait-for-weave:latest "/home/weavewait/wai 3 minutes ago Exited (0) 3 minutes ago weavewait
d50adeaef29c binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 3 minutes ago Up 3 minutes 80/tcp powerstrip-weave
[root@localhost ~]# docker logs 74eff1c5573e
weave 2015/03/24 19:44:56.115953 Command line options: map[wait:20 iface:ethwe name:7a:10:6b:2c:8b:db nickname:localhost.localdomain]
weave 2015/03/24 19:44:56.116331 Command line peers: []
weave 2015/03/24 19:45:16.140992 Unable to find interface ethwe
@binocarlos On vagrant:
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f0c345b121aa clusterhq/powerstrip:latest "twistd -noy powerst 6 minutes ago Up 6 minutes 0.0.0.0:2375->2375/tcp powerstrip
45bd79b5ebb5 zettio/weave:git-8e65c7127d82 "/home/weave/weaver 8 minutes ago Exited (1) 8 minutes ago weave
d1be78c4e90b binocarlos/wait-for-weave:latest "/home/weavewait/wai 8 minutes ago Exited (0) 8 minutes ago weavewait
3d1cf41ea5a2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 8 minutes ago Up 8 minutes 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker logs 45bd79b5ebb5
weave 2015/03/24 21:50:07.945856 Command line options: map[iface:ethwe name:7a:5a:36:d4:00:c9 nickname:localhost.localdomain wait:20]
weave 2015/03/24 21:50:07.945893 Command line peers: []
weave 2015/03/24 21:50:27.954680 Unable to find interface ethwe
What is the ethwe
?
@aanm thanks for the log - this is a strange problem :-)
ethwe
is the weave bridge that weave creates on startup - it not being created indicates a problem along these lines: https://github.com/zettio/weave/issues/470
The only issue there is that we are both booting into the same Vagrant and therefore have kernel 3.17.6-300
(I'm assuming - please check)
So - I'm also assuming a) getenforce returns zero b) running weave launch
normally (i.e. from the host) leads to a healthy running weave container?
If both a) and b) are true, then we need to understand why launching weave from inside another container is failing.
Can you try the following steps (and thank you very much for your patience here):
$ sudo docker pull binocarlos/powerstrip-weave
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
binocarlos/powerstrip-weave latest 33746eea6148 20 minutes ago 733.3 MB
So we now have the latest powerstrip-weave container.
$ sudo docker run --rm -ti \
--name powerstrip-weave \
--entrypoint="/bin/bash" \
--expose 80 \
-v /var/run/docker.sock:/var/run/docker.sock \
binocarlos/powerstrip-weave
Now we have a bash session inside the powerstrip-weave container:
root@6c6b7c38fe12$ docker run --rm \
--net=host \
--privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /proc:/hostproc \
-e PROCFS=/hostproc \
binocarlos/powerstrip-weave weave launch
Then we check for the status of the weave container:
root@6c6b7c38fe12$ docker logs weave
@binocarlos I don't know what have you done but it's working inside Vagrant now (I notice that some layers were being downloaded because they were outdated)
[vagrant@localhost ~]$ sudo docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.3.3
Git commit (client): a8a31ef/1.5.0
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.3.3
Git commit (server): a8a31ef/1.5.0
[vagrant@localhost ~]$ uname -a
Linux localhost.localdomain 3.17.6-300.fc21.x86_64 #1 SMP Mon Dec 8 22:29:32 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[vagrant@localhost ~]$ l
-bash: l: command not found
[vagrant@localhost ~]$ ls -l
total 4
drwxrwxr-x. 2 vagrant vagrant 4096 Mar 24 19:50 powerstrip-demo
[vagrant@localhost ~]$ cat > ~/powerstrip-demo/adapters.yml <<EOF
> endpoints:
> "POST /*/containers/create":
> pre: [weave]
> "POST /*/containers/*/start":
> post: [weave]
> "POST /*/containers/*/restart":
> post: [weave]
> adapters:
> weave: http://weave/v1/extension
> EOF
[vagrant@localhost ~]$ sudo docker pull clusterhq/powerstrip:latest
Pulling repository clusterhq/powerstrip
3ace3727d02f: Download complete
511136ea3c5a: Download complete
f0dde87450ec: Download complete
76b658ecb564: Download complete
4faa69f72743: Download complete
2103b00b3fdf: Download complete
e7cc33745437: Download complete
b0fd5cf733ce: Download complete
87ced22cd499: Download complete
49e5d7d26276: Download complete
5470e1c0df28: Download complete
2d7314ef4bdb: Download complete
e8e1802ae934: Download complete
02209b7a41cc: Download complete
2c44e3a579b0: Download complete
5601bce7ae3b: Download complete
17f6ab9e77eb: Download complete
928cba00d925: Download complete
Status: Image is up to date for clusterhq/powerstrip:latest
[vagrant@localhost ~]$ sudo docker pull binocarlos/powerstrip-weave:latest
Pulling repository binocarlos/powerstrip-weave
33746eea6148: Download complete
511136ea3c5a: Download complete
3b3a4796eef1: Download complete
50ec2d202fe8: Download complete
1073b544a1cb: Download complete
6a7520a7fd8c: Download complete
8d2c59617a00: Download complete
dbe39e1288de: Download complete
2913aa111764: Download complete
16c185acbd34: Download complete
1549a2ff9d8d: Download complete
5c56afc37b51: Download complete
bf59c8ed38cf: Download complete
ea711f4feff1: Download complete
79868bd755bd: Download complete
16229b065aec: Download complete
8a660bc2d559: Download complete
6e9603505e52: Download complete
31b54e80a26d: Download complete
a19542006097: Download complete
1c9ac61e378f: Download complete
538e59084b49: Download complete
515636cf430d: Download complete
Status: Downloaded newer image for binocarlos/powerstrip-weave:latest
[vagrant@localhost ~]$ sudo docker pull binocarlos/powerstrip-weave-example:latest
Pulling repository binocarlos/powerstrip-weave-example
13735cf0f6ed: Download complete
511136ea3c5a: Download complete
f3c84ac3a053: Download complete
a1a958a24818: Download complete
9fec74352904: Download complete
d0955f21bf24: Download complete
6a167be0aaff: Download complete
8b02fdaeea77: Download complete
Status: Downloaded newer image for binocarlos/powerstrip-weave-example:latest
[vagrant@localhost ~]$ sudo docker pull binocarlos/wait-for-weave:latest
Pulling repository binocarlos/wait-for-weave
29bb137e456d: Download complete
511136ea3c5a: Download complete
daffd5b1932d: Download complete
a1bb0ed859a5: Download complete
384162a8b395: Download complete
Status: Image is up to date for binocarlos/wait-for-weave:latest
[vagrant@localhost ~]$ sudo docker pull zettio/weave:latest
Pulling repository zettio/weave
6b123588d99b: Download complete
67617c31133a: Download complete
162e1c8a2303: Download complete
b359c269879a: Download complete
Status: Downloaded newer image for zettio/weave:latest
[vagrant@localhost ~]$ sudo docker run -d --name powerstrip-weave \
> --expose 80 \
> -v /var/run/docker.sock:/var/run/docker.sock \
> binocarlos/powerstrip-weave launch
07779ed201cdf22e4f079ac41448d78629ed97e9c2e5dc8b54356288b872867d
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce4c77be9874 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 5 seconds ago Up 4 seconds cocky_yonath
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai 5 seconds ago Exited (0) 4 seconds ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 5 seconds ago Up 5 seconds 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker log 174432971a6b
docker: 'log' is not a docker command. See 'docker --help'.
[vagrant@localhost ~]$ sudo docker logs 174432971a6b
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce4c77be9874 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 25 seconds ago Up 24 seconds cocky_yonath
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai 25 seconds ago Exited (0) 25 seconds ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 25 seconds ago Up 25 seconds 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce4c77be9874 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 28 seconds ago Up 27 seconds cocky_yonath
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai 28 seconds ago Exited (0) 27 seconds ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 28 seconds ago Up 27 seconds 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce4c77be9874 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 29 seconds ago Up 28 seconds cocky_yonath
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai 29 seconds ago Exited (0) 29 seconds ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 29 seconds ago Up 29 seconds 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce4c77be9874 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 32 seconds ago Up 31 seconds cocky_yonath
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai 32 seconds ago Exited (0) 31 seconds ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 32 seconds ago Up 31 seconds 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker run -d --name powerstrip \
> -v /var/run/docker.sock:/var/run/docker.sock \
> -v $HOME/powerstrip-demo/adapters.yml:/etc/powerstrip/adapters.yml \
> --link powerstrip-weave:weave \
> -p 2375:2375 \
> clusterhq/powerstrip
7b1a9e910377511c590630bb4881d1ac81d1cdbb63741c6f0568d0972598244f
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7b1a9e910377 clusterhq/powerstrip:latest "twistd -noy powerst 5 seconds ago Up 5 seconds 0.0.0.0:2375->2375/tcp powerstrip
ce4c77be9874 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 48 seconds ago Up 47 seconds cocky_yonath
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai 48 seconds ago Exited (0) 48 seconds ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 48 seconds ago Up 48 seconds 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
92ec81d4b74e zettio/weave:0.9.0 "/home/weave/weaver 9 seconds ago Up 8 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
7b1a9e910377 clusterhq/powerstrip:latest "twistd -noy powerst 15 seconds ago Up 14 seconds 0.0.0.0:2375->2375/tcp powerstrip
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai 58 seconds ago Exited (0) 57 seconds ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 58 seconds ago Up 57 seconds 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
92ec81d4b74e zettio/weave:0.9.0 "/home/weave/weaver 27 seconds ago Up 26 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
7b1a9e910377 clusterhq/powerstrip:latest "twistd -noy powerst 33 seconds ago Up 32 seconds 0.0.0.0:2375->2375/tcp powerstrip
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai About a minute ago Exited (0) About a minute ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau About a minute ago Up About a minute 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
92ec81d4b74e zettio/weave:0.9.0 "/home/weave/weaver 29 seconds ago Up 29 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
7b1a9e910377 clusterhq/powerstrip:latest "twistd -noy powerst 35 seconds ago Up 34 seconds 0.0.0.0:2375->2375/tcp powerstrip
174432971a6b binocarlos/wait-for-weave:latest "/home/weavewait/wai About a minute ago Exited (0) About a minute ago weavewait
07779ed201cd binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau About a minute ago Up About a minute 80/tcp powerstrip-weave
[vagrant@localhost ~]$ sudo DOCKER_HOST=tcp://127.0.0.1:2375 docker run -e "WEAVE_CIDR=10.255.0.51/24" -d binocarlos/powerstrip-weave-example hello world
2684f7ae101108d0fd87b7a472bab03f87eb0e28310e5e94ef50536e4b5b9b33
[vagrant@localhost ~]$
[vagrant@localhost ~]$
[vagrant@localhost ~]$
[vagrant@localhost ~]$ sudo docker logs 2684f7ae101108d0fd87b7a472bab03f87eb0e28310e5e94ef50536e4b5b9b33
--------------------------------
Network took: 0 ms to connect
Args: hello world
--------------------------------
eth0 Link encap:Ethernet HWaddr 02:42:ac:11:00:06
inet addr:172.17.0.6 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:acff:fe11:6/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:508 (508.0 B) TX bytes:508 (508.0 B)
ethwe Link encap:Ethernet HWaddr ee:35:66:6d:a2:60
inet addr:10.255.0.51 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::ec35:66ff:fe6d:a260/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:65535 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:258 (258.0 B) TX bytes:258 (258.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
[vagrant@localhost ~]$ logout
Connection to 127.0.0.1 closed.
I tried the same thing on my laptop but didn't work
aanm@localhost powerstrip-demo]$ sudo getenforce
Enforcing
[aanm@localhost powerstrip-demo]$ sudo setenforce 0
[aanm@localhost powerstrip-demo]$ sudo getenforce
Permissive
[aanm@localhost powerstrip-demo]$ sudo service docker start
Redirecting to /bin/systemctl start docker.service
[aanm@localhost powerstrip-demo]$ cat > ~/powerstrip-demo/adapters.yml <<EOF
> endpoints:
> "POST /*/containers/create":
> pre: [weave]
> "POST /*/containers/*/start":
> post: [weave]
> "POST /*/containers/*/restart":
> post: [weave]
> adapters:
> weave: http://weave/v1/extension
> EOF
[aanm@localhost powerstrip-demo]$ sudo docker pull clusterhq/powerstrip:latest
Pulling repository clusterhq/powerstrip
3ace3727d02f: Download complete
511136ea3c5a: Download complete
f0dde87450ec: Download complete
76b658ecb564: Download complete
4faa69f72743: Download complete
2103b00b3fdf: Download complete
e7cc33745437: Download complete
b0fd5cf733ce: Download complete
87ced22cd499: Download complete
49e5d7d26276: Download complete
5470e1c0df28: Download complete
2d7314ef4bdb: Download complete
e8e1802ae934: Download complete
02209b7a41cc: Download complete
2c44e3a579b0: Download complete
5601bce7ae3b: Download complete
17f6ab9e77eb: Download complete
928cba00d925: Download complete
Status: Image is up to date for clusterhq/powerstrip:latest
[aanm@localhost powerstrip-demo]$ sudo docker pull binocarlos/powerstrip-weave:latest
Pulling repository binocarlos/powerstrip-weave
33746eea6148: Download complete
511136ea3c5a: Download complete
3b3a4796eef1: Download complete
50ec2d202fe8: Download complete
1073b544a1cb: Download complete
6a7520a7fd8c: Download complete
8d2c59617a00: Download complete
dbe39e1288de: Download complete
2913aa111764: Download complete
16c185acbd34: Download complete
1549a2ff9d8d: Download complete
5c56afc37b51: Download complete
bf59c8ed38cf: Download complete
ea711f4feff1: Download complete
79868bd755bd: Download complete
16229b065aec: Download complete
8a660bc2d559: Download complete
6e9603505e52: Download complete
31b54e80a26d: Download complete
a19542006097: Download complete
1c9ac61e378f: Download complete
538e59084b49: Download complete
515636cf430d: Download complete
Status: Downloaded newer image for binocarlos/powerstrip-weave:latest
[aanm@localhost powerstrip-demo]$ sudo docker pull binocarlos/powerstrip-weave-example:latest
Pulling repository binocarlos/powerstrip-weave-example
13735cf0f6ed: Download complete
511136ea3c5a: Download complete
f3c84ac3a053: Download complete
a1a958a24818: Download complete
9fec74352904: Download complete
d0955f21bf24: Download complete
6a167be0aaff: Download complete
8b02fdaeea77: Download complete
Status: Downloaded newer image for binocarlos/powerstrip-weave-example:latest
[aanm@localhost powerstrip-demo]$ sudo docker pull binocarlos/wait-for-weave:latest
Pulling repository binocarlos/wait-for-weave
29bb137e456d: Download complete
511136ea3c5a: Download complete
daffd5b1932d: Download complete
a1bb0ed859a5: Download complete
384162a8b395: Download complete
Status: Image is up to date for binocarlos/wait-for-weave:latest
[aanm@localhost powerstrip-demo]$ sudo docker pull zettio/weave:latest
Pulling repository zettio/weave
6b123588d99b: Download complete
67617c31133a: Download complete
162e1c8a2303: Download complete
b359c269879a: Download complete
Status: Downloaded newer image for zettio/weave:latest
[aanm@localhost powerstrip-demo]$ sudo docker run -d --name powerstrip-weave \
> --expose 80 \
> -v /var/run/docker.sock:/var/run/docker.sock \
> binocarlos/powerstrip-weave launch
52ce9a0663e2b1e4358ed06e3791bfeee210275a4e5d7e0ad6391bf81dec899d
[aanm@localhost powerstrip-demo]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6209ed260a2e binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 8 seconds ago Up 7 seconds desperate_turing
3db11b6a398a binocarlos/wait-for-weave:latest "/home/weavewait/wai 9 seconds ago Exited (0) 8 seconds ago weavewait
52ce9a0663e2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 9 seconds ago Up 9 seconds 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6209ed260a2e binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 24 seconds ago Up 23 seconds desperate_turing
3db11b6a398a binocarlos/wait-for-weave:latest "/home/weavewait/wai 25 seconds ago Exited (0) 24 seconds ago weavewait
52ce9a0663e2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 25 seconds ago Up 25 seconds 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6209ed260a2e binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 26 seconds ago Up 25 seconds desperate_turing
3db11b6a398a binocarlos/wait-for-weave:latest "/home/weavewait/wai 27 seconds ago Exited (0) 26 seconds ago weavewait
52ce9a0663e2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 27 seconds ago Up 26 seconds 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f4c13d3bc3ae zettio/weave:0.9.0 "/home/weave/weaver 5 seconds ago Up 3 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
6209ed260a2e binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 34 seconds ago Up 32 seconds desperate_turing
3db11b6a398a binocarlos/wait-for-weave:latest "/home/weavewait/wai 35 seconds ago Exited (0) 33 seconds ago weavewait
52ce9a0663e2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 35 seconds ago Up 34 seconds 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo docker logs f4c13d3bc3ae
weave 2015/03/25 16:28:18.831298 Command line options: map[iface:ethwe name:7a:a0:50:00:f4:45 wait:20]
weave 2015/03/25 16:28:18.831330 Command line peers: []
weave 2015/03/25 16:28:29.835900 Communication between peers is unencrypted.
weave 2015/03/25 16:28:29.836015 Our name is 7a:a0:50:00:f4:45
weave 2015/03/25 16:28:29.876899 Sniffing traffic on &{19 65535 ethwe 66:37:00:7c:c3:6e up|broadcast|multicast}
weave 2015/03/25 16:28:29.877242 Discovered our MAC 66:37:00:7c:c3:6e
weave 2015/03/25 16:28:30.244906 Discovered local MAC 7a:a0:50:00:f4:45
weave 2015/03/25 16:28:30.244932 Discovered local MAC 22:66:7d:18:1d:e2
[aanm@localhost powerstrip-demo]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f4c13d3bc3ae zettio/weave:0.9.0 "/home/weave/weaver 12 seconds ago Up 11 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
6209ed260a2e binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 41 seconds ago Up 40 seconds desperate_turing
3db11b6a398a binocarlos/wait-for-weave:latest "/home/weavewait/wai 42 seconds ago Exited (0) 41 seconds ago weavewait
52ce9a0663e2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 42 seconds ago Up 41 seconds 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo docker run -d --name powerstrip \
> -v /var/run/docker.sock:/var/run/docker.sock \
> -v $HOME/powerstrip-demo/adapters.yml:/etc/powerstrip/adapters.yml \
> --link powerstrip-weave:weave \
> -p 2375:2375 \
> clusterhq/powerstrip
e525d5109667c5cc6fea2a7fa3f60506e822d3a2073095a3d58f3056f054ca4b
[aanm@localhost powerstrip-demo]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e525d5109667 clusterhq/powerstrip:latest "twistd -noy powerst 17 seconds ago Up 16 seconds 0.0.0.0:2375->2375/tcp powerstrip
f4c13d3bc3ae zettio/weave:0.9.0 "/home/weave/weaver 33 seconds ago Up 32 seconds 0.0.0.0:6783->6783/udp, 0.0.0.0:6783->6783/tcp weave
3db11b6a398a binocarlos/wait-for-weave:latest "/home/weavewait/wai About a minute ago Exited (0) About a minute ago weavewait
52ce9a0663e2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau About a minute ago Up About a minute 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e525d5109667 clusterhq/powerstrip:latest "twistd -noy powerst 32 seconds ago Up 30 seconds 0.0.0.0:2375->2375/tcp powerstrip
f4c13d3bc3ae zettio/weave:0.9.0 "/home/weave/weaver 48 seconds ago Up 46 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
3db11b6a398a binocarlos/wait-for-weave:latest "/home/weavewait/wai About a minute ago Exited (0) About a minute ago weavewait
52ce9a0663e2 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau About a minute ago Up About a minute 80/tcp powerstrip-weave
[aanm@localhost powerstrip-demo]$ sudo DOCKER_HOST=tcp://127.0.0.1:2375 docker run -e "WEAVE_CIDR=10.255.0.51/24" -d binocarlos/powerstrip-weave-example hello world
de6fb5f4fb05f07474e48ed66113a3b501c50bfff3db81aeac952008c82f2a79
[aanm@localhost ~]$ sudo docker logs de6fb5f4fb05f07474e48ed66113a3b501c50bfff3db81aeac952008c82f2a79
interface ethwe not found after 10 seconds
I tried to run the last steps that you wrote on your last post and this is what I get:
aanm@localhost ~]$ sudo docker pull binocarlos/powerstrip-weave
Pulling repository binocarlos/powerstrip-weave
33746eea6148: Download complete
511136ea3c5a: Download complete
3b3a4796eef1: Download complete
50ec2d202fe8: Download complete
1073b544a1cb: Download complete
6a7520a7fd8c: Download complete
8d2c59617a00: Download complete
dbe39e1288de: Download complete
2913aa111764: Download complete
16c185acbd34: Download complete
1549a2ff9d8d: Download complete
5c56afc37b51: Download complete
bf59c8ed38cf: Download complete
ea711f4feff1: Download complete
79868bd755bd: Download complete
16229b065aec: Download complete
8a660bc2d559: Download complete
6e9603505e52: Download complete
31b54e80a26d: Download complete
a19542006097: Download complete
1c9ac61e378f: Download complete
538e59084b49: Download complete
515636cf430d: Download complete
Status: Image is up to date for binocarlos/powerstrip-weave:latest
[aanm@localhost ~]$ sudo docker run --rm -ti --name powerstrip-weave --entrypoint="/bin/bash" --expose 80 -v /var/run/docker.sock:/var/run/docker.sock binocarlos/powerstrip-weave
root@7943580ee3db:/usr/local/bin# docker run --rm \
> --net=host \
> --privileged \
> -v /var/run/docker.sock:/var/run/docker.sock \
> -v /proc:/hostproc \
> -e PROCFS=/hostproc \
> binocarlos/powerstrip-weave weave launch
241556cd9643151b9c1cdf007d8fe2755e4ec7bd02384a119c9afc1e5e0c7da2
root@7943580ee3db:/usr/local/bin# docker logs weave
weave 2015/03/25 16:39:16.126711 Command line options: map[iface:ethwe name:7a:a0:50:00:f4:45 wait:20]
weave 2015/03/25 16:39:16.126742 Command line peers: []
weave 2015/03/25 16:39:25.433269 Communication between peers is unencrypted.
weave 2015/03/25 16:39:25.433327 Our name is 7a:a0:50:00:f4:45
weave 2015/03/25 16:39:25.509550 Sniffing traffic on &{35 65535 ethwe 7e:ce:f7:6f:f2:1d up|broadcast|multicast}
weave 2015/03/25 16:39:25.509659 Discovered our MAC 7e:ce:f7:6f:f2:1d
weave 2015/03/25 16:39:25.908265 Discovered local MAC ca:db:ce:74:3e:03
root@7943580ee3db:/usr/local/bin#
Hey,
so based on the logs from here it seems that the powerstrip-weave adapter is dumping out.
Is it possible for you run that example again and:
docker logs powerstrip-weave
docker version
(from your laptop)The static (client only) docker binary from inside the container has the following version info:
Client version: 1.3.1
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 4e9bbfa-dirty
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
The docker binary on your vagrant reports:
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.3.3
Git commit (client): a8a31ef/1.5.0
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.3.3
Git commit (server): a8a31ef/1.5.0
So - lets compare that against the docker version
on your laptop and see what we can see - thanks!
Hey - right, I've just found something.
I'm betting that on your laptop - docker version
says Server API version: 1.15
- if that is true, then I've found the problem
If this is the case - it should be a case of docker pull binocarlos/powerstrip-weave
and try again...
If not - then back to the drawing board :-)
Sorry, my docker version returns
sudo docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
More logs ;-) Thanks for keeping looking at this
[aanm@localhost ~]$ sudo docker run -d --name powerstrip-weave \
> --expose 80 \
> -e DEBUG=* \
> -v /var/run/docker.sock:/var/run/docker.sock \
> binocarlos/powerstrip-weave launch
0803553336b4bd603f507f08e31ebb071932cd72cfedce4fc94b9bb4ea0928f5
[aanm@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bac215ee0c66 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 4 seconds ago Up 3 seconds kickass_yonath
39cd40581a82 binocarlos/wait-for-weave:latest "/home/weavewait/wai 5 seconds ago Exited (0) 4 seconds ago weavewait
0803553336b4 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 6 seconds ago Up 4 seconds 80/tcp powerstrip-weave
[aanm@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a09d0f965607 zettio/weave:0.9.0 "/home/weave/weaver 6 seconds ago Up 5 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
bac215ee0c66 binocarlos/powerstrip-weave:latest "/srv/app/run.sh wea 12 seconds ago Up 11 seconds kickass_yonath
39cd40581a82 binocarlos/wait-for-weave:latest "/home/weavewait/wai 13 seconds ago Exited (0) 12 seconds ago weavewait
0803553336b4 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 14 seconds ago Up 12 seconds 80/tcp powerstrip-weave
[aanm@localhost ~]$ sudo docker logs weave
weave 2015/03/27 04:11:47.689909 Command line options: map[iface:ethwe name:7a:f8:2f:f8:e6:be wait:20]
weave 2015/03/27 04:11:47.689936 Command line peers: []
weave 2015/03/27 04:11:54.865457 Communication between peers is unencrypted.
weave 2015/03/27 04:11:54.865757 Our name is 7a:f8:2f:f8:e6:be
weave 2015/03/27 04:11:54.958620 Sniffing traffic on &{69 65535 ethwe 5a:98:b2:0b:8f:a4 up|broadcast|multicast}
weave 2015/03/27 04:11:54.958719 Discovered our MAC 5a:98:b2:0b:8f:a4
weave 2015/03/27 04:11:55.526175 Discovered local MAC fa:92:3a:6f:e8:8a
[aanm@localhost ~]$ sudo docker logs kickass_yonath
FATA[0000] Error response from daemon: No such container: kickass_yonath
[aanm@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a09d0f965607 zettio/weave:0.9.0 "/home/weave/weaver 53 seconds ago Up 52 seconds 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
39cd40581a82 binocarlos/wait-for-weave:latest "/home/weavewait/wai About a minute ago Exited (0) 59 seconds ago weavewait
0803553336b4 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau About a minute ago Up About a minute 80/tcp powerstrip-weave
[aanm@localhost ~]$ sudo docker logs weavewait
[aanm@localhost ~]$ sudo docker logs powerstrip-weave
[debug] stdcopy.go:98 Corrupted prefix: []
[debug] hijack.go:102 [hijack] End of stdout
[debug] commands.go:2229 End of CmdRun(), Waiting for hijack to finish.
[debug] stdcopy.go:126 framesize: 65
a09d0f965607b5aee2ca871c3029a55a2c3a0eaed60e3ded0df306c4a2ac8ddd
[debug] stdcopy.go:98 Corrupted prefix: []
[debug] hijack.go:102 [hijack] End of stdout
[debug] commands.go:2229 End of CmdRun(), Waiting for hijack to finish.
server listening on port: 80
[aanm@localhost ~]$ sudo docker run -d --name powerstrip \
> -v /var/run/docker.sock:/var/run/docker.sock \
> -v $HOME/powerstrip-demo/adapters.yml:/etc/powerstrip/adapters.yml \
> --link powerstrip-weave:weave \
> -p 2375:2375 \
> clusterhq/powerstrip
dcfebc19faed2b0362184e6322b51ba1ed4f340108cb0afb3994b20d3c6a51b0
[aanm@localhost ~]$
[aanm@localhost ~]$ sudo docker logs powerstrip-weave
[debug] stdcopy.go:98 Corrupted prefix: []
[debug] hijack.go:102 [hijack] End of stdout
[debug] commands.go:2229 End of CmdRun(), Waiting for hijack to finish.
[debug] stdcopy.go:126 framesize: 65
a09d0f965607b5aee2ca871c3029a55a2c3a0eaed60e3ded0df306c4a2ac8ddd
[debug] stdcopy.go:98 Corrupted prefix: []
[debug] hijack.go:102 [hijack] End of stdout
[debug] commands.go:2229 End of CmdRun(), Waiting for hijack to finish.
server listening on port: 80
[aanm@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
dcfebc19faed clusterhq/powerstrip:latest "twistd -noy powerst 8 seconds ago Up 6 seconds 0.0.0.0:2375->2375/tcp powerstrip
a09d0f965607 zettio/weave:0.9.0 "/home/weave/weaver About a minute ago Up About a minute 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
39cd40581a82 binocarlos/wait-for-weave:latest "/home/weavewait/wai About a minute ago Exited (0) About a minute ago weavewait
0803553336b4 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau About a minute ago Up About a minute 80/tcp powerstrip-weave
[aanm@localhost ~]$ sudo DOCKER_HOST=tcp://127.0.0.1:2375 docker run -e "WEAVE_CIDR=10.255.0.51/24" -d binocarlos/powerstrip-weave-example hello world
996329a8eaff8e1f5e9b8231a77b6ba930b3fd192fe19b983897db6ef35a48d0
[aanm@localhost ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
996329a8eaff binocarlos/powerstrip-weave-example:latest "/home/weavewait/wai 26 seconds ago Exited (1) 10 seconds ago stoic_feynman
dcfebc19faed clusterhq/powerstrip:latest "twistd -noy powerst 43 seconds ago Up 41 seconds 0.0.0.0:2375->2375/tcp powerstrip
a09d0f965607 zettio/weave:0.9.0 "/home/weave/weaver 2 minutes ago Up About a minute 0.0.0.0:6783->6783/tcp, 0.0.0.0:6783->6783/udp weave
39cd40581a82 binocarlos/wait-for-weave:latest "/home/weavewait/wai 2 minutes ago Exited (0) 2 minutes ago weavewait
0803553336b4 binocarlos/powerstrip-weave:latest "/srv/app/run.sh lau 2 minutes ago Up 2 minutes 80/tcp powerstrip-weave
[aanm@localhost ~]$ sudo docker logs 996329a8eaff8e1f5e9b8231a77b6ba930b3fd192fe19b983897db6ef35a48d0
interface ethwe not found after 10 seconds
[aanm@localhost ~]$ sudo docker logs powerstrip-weave
[debug] stdcopy.go:98 Corrupted prefix: []
[debug] hijack.go:102 [hijack] End of stdout
[debug] commands.go:2229 End of CmdRun(), Waiting for hijack to finish.
[debug] stdcopy.go:126 framesize: 65
a09d0f965607b5aee2ca871c3029a55a2c3a0eaed60e3ded0df306c4a2ac8ddd
[debug] stdcopy.go:98 Corrupted prefix: []
[debug] hijack.go:102 [hijack] End of stdout
[debug] commands.go:2229 End of CmdRun(), Waiting for hijack to finish.
server listening on port: 80
Fri, 27 Mar 2015 04:13:20 GMT action:create create request
Fri, 27 Mar 2015 04:13:20 GMT action:create {
"Hostname": "",
"Domainname": "",
"User": "",
"Memory": 0,
"MemorySwap": 0,
"CpuShares": 0,
"Cpuset": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"PortSpecs": null,
"ExposedPorts": {},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"WEAVE_CIDR=10.255.0.51/24"
],
"Cmd": [
"hello",
"world"
],
"Image": "binocarlos/powerstrip-weave-example",
"Volumes": {},
"WorkingDir": "",
"Entrypoint": null,
"NetworkDisabled": false,
"MacAddress": "",
"OnBuild": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LxcConf": [],
"Privileged": false,
"PortBindings": {},
"Links": null,
"PublishAllPorts": false,
"Dns": null,
"DnsSearch": null,
"ExtraHosts": null,
"VolumesFrom": null,
"Devices": [],
"NetworkMode": "bridge",
"IpcMode": "",
"PidMode": "",
"CapAdd": null,
"CapDrop": null,
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"SecurityOpt": null,
"ReadonlyRootfs": false
}
}
Fri, 27 Mar 2015 04:13:20 GMT action:create CIDR: 10.255.0.51/24
Fri, 27 Mar 2015 04:13:20 GMT action:create Image: binocarlos/powerstrip-weave-example
Fri, 27 Mar 2015 04:13:20 GMT action:create Image response: binocarlos/powerstrip-weave-example
Fri, 27 Mar 2015 04:13:20 GMT action:create {
"Architecture": "amd64",
"Author": "Kai Davenport <kaiyadavenport@gmail.com>",
"Comment": "",
"Config": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": null,
"CpuShares": 0,
"Cpuset": "",
"Domainname": "",
"Entrypoint": [
"bash",
"/srv/app/run.sh"
],
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"ExposedPorts": null,
"Hostname": "e7128b67d9e7",
"Image": "8b02fdaeea77e4ab262ffc0bf7621354e9553fcfcb266ed78b750bd725cf171a",
"MacAddress": "",
"Memory": 0,
"MemorySwap": 0,
"NetworkDisabled": false,
"OnBuild": [],
"OpenStdin": false,
"PortSpecs": null,
"StdinOnce": false,
"Tty": false,
"User": "",
"Volumes": null,
"WorkingDir": ""
},
"Container": "644e12bab3a41717103ad9a221c8f8c72c67dda12af277349df3e6614a441463",
"ContainerConfig": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ENTRYPOINT [bash /srv/app/run.sh]"
],
"CpuShares": 0,
"Cpuset": "",
"Domainname": "",
"Entrypoint": [
"bash",
"/srv/app/run.sh"
],
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"ExposedPorts": null,
"Hostname": "e7128b67d9e7",
"Image": "8b02fdaeea77e4ab262ffc0bf7621354e9553fcfcb266ed78b750bd725cf171a",
"MacAddress": "",
"Memory": 0,
"MemorySwap": 0,
"NetworkDisabled": false,
"OnBuild": [],
"OpenStdin": false,
"PortSpecs": null,
"StdinOnce": false,
"Tty": false,
"User": "",
"Volumes": null,
"WorkingDir": ""
},
"Created": "2015-03-25T12:03:36.682111112Z",
"DockerVersion": "1.5.0",
"Id": "13735cf0f6ed0dc32672c4b64b5d2c04c4f326e9883198f94735cf0ac4b262f5",
"Os": "linux",
"Parent": "8b02fdaeea77e4ab262ffc0bf7621354e9553fcfcb266ed78b750bd725cf171a",
"Size": 0,
"VirtualSize": 188275290
}
Fri, 27 Mar 2015 04:13:20 GMT action:create Changed container: binocarlos/powerstrip-weave-example
Fri, 27 Mar 2015 04:13:20 GMT action:create {
"Hostname": "",
"Domainname": "",
"User": "",
"Memory": 0,
"MemorySwap": 0,
"CpuShares": 0,
"Cpuset": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"PortSpecs": null,
"ExposedPorts": {},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"WEAVE_CIDR=10.255.0.51/24"
],
"Cmd": [
"bash",
"/srv/app/run.sh",
"hello",
"world"
],
"Image": "binocarlos/powerstrip-weave-example",
"Volumes": {},
"WorkingDir": "",
"Entrypoint": [
"/home/weavewait/wait-for-weave"
],
"NetworkDisabled": false,
"MacAddress": "",
"OnBuild": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LxcConf": [],
"Privileged": false,
"PortBindings": {},
"Links": null,
"PublishAllPorts": false,
"Dns": null,
"DnsSearch": null,
"ExtraHosts": null,
"VolumesFrom": [
"weavewait:ro"
],
"Devices": [],
"NetworkMode": "bridge",
"IpcMode": "",
"PidMode": "",
"CapAdd": null,
"CapDrop": null,
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"SecurityOpt": null,
"ReadonlyRootfs": false
}
}
Fri, 27 Mar 2015 04:13:25 GMT action:start start container: 996329a8eaff8e1f5e9b8231a77b6ba930b3fd192fe19b983897db6ef35a48d0
Fri, 27 Mar 2015 04:13:25 GMT action:start attach container: 996329a8eaff8e1f5e9b8231a77b6ba930b3fd192fe19b983897db6ef35a48d0 -> 10.255.0.51/24
[aanm@localhost ~]$
Hey - thanks for this - I wish I could just reproduce this and then we don't need to play log output tennis
:-)
Right - so, overall the logs look good i.e. the adapter is getting the create request -> remapping the required parts (entrypoint + volumes from). Its getting the start request and no obvious errors are triggering there.
The suspicious part of the log is this:
[debug] stdcopy.go:98 Corrupted prefix: []
[debug] hijack.go:102 [hijack] End of stdout
[debug] commands.go:2229 End of CmdRun(), Waiting for hijack to finish.
This is not the javascript logging that - it looks like docker output!
Let me check to see if I get similar output my end - thanks again
After dealing with this bug like terminators we found out the problem was in my machine the weave took more than 10 seconds to connect. @binocarlos change the timeout from 10 to 30 seconds and it work. Thanks for the patience @binocarlos @sbhaskaran you should see if the similar problem still occur with you
I'm unable to run this script completely because of the error that gives me
@binocarlos I think here we can solve it properly ;-)