binocarlos / powerstrip-weave

A Powerstrip plugin that runs weave inside a container and ensures that containers are connected to the weave network before running their entrypoints.
36 stars 3 forks source link

transport closed before response received error #2

Closed binocarlos closed 9 years ago

binocarlos commented 9 years ago

Hey, I'm having a little trouble connecting via powerstrip - here is what I did:

endpoints:
  "/*/containers/create":
    pre: [debug]
  "/*/containers/*/start":
    post: [debug]
plugins:
  debug: http://debug/v1/extension
$ docker run -d --name powerstrip \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v ~/powerstrip-demo/plugins.yml:/etc/powerstrip/plugins.yml \
  --link powerstrip-debug:debug \
  -p 2375:2375 \
  clusterhq/powerstrip
$ export DOCKER_HOST=localhost:2375
$ docker run --rm ubuntu bash -c "echo hello"

I get the following error when doing this:

FATA[0000] Post http://127.0.0.1:2375/v1.16/containers/create: net/http: transport closed before response was received. Are you trying to connect to a TLS-enabled daemon without TLS?

There is nothing logged from the debugger container so I don't think the request is making it that far.

Am a bit stuck - sorry if this is something obvious - any clues?

Thanks

binocarlos commented 9 years ago

Ignore this - I've found the problem.

Internally the powerstrip container is listening on port 4243

The command to start the container was using -p 2375:2375.

As soon as I change that to -p 2375:4243 everything works great!

Sorry for noise - I will open a PR for the Readme change.

lukemarsden commented 9 years ago

I think the PR should be against powerstrip.tac, because it should be listening on the documented (newly IANA-assigned) Docker port.

lukemarsden commented 9 years ago

btw, thanks for finding this bug and sorry for wasting your time with it!

binocarlos commented 9 years ago

good point I was thinking perhaps we should change the port number