Repository navigation
Closed
Description
Getting this error when running docker v0.7.2. Here's the corresponding traceback:
Traceback (most recent call last):
File "/usr/local/bin/fig", line 9, in <module>
load_entry_point('fig==0.0.2', 'console_scripts', 'fig')()
File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 37, in main
command.sys_dispatch()
File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 19, in sys_dispatch
self.dispatch(sys.argv[1:], None)
File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 22, in dispatch
self.perform_command(*self.parse(argv, global_options))
File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 25, in perform_command
handler(command_options)
File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 226, in up
log_printer = LogPrinter(containers)
File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 13, in __init__
self.generators = self._make_log_generators()
File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 26, in _make_log_generators
generators.append(self._make_log_generator(container, color_fn))
File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 32, in _make_log_generator
websocket = self._attach(container)
File "/usr/local/lib/python2.7/dist-packages/fig/cli/log_printer.py", line 45, in _attach
return container.attach_socket(params=params, ws=True)
File "/usr/local/lib/python2.7/dist-packages/fig/container.py", line 131, in attach_socket
return self.client.attach_socket(self.id, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 251, in attach_socket
return self._attach_websocket(container, params)
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 217, in _attach_websocket
return self._create_websocket_connection(full_url)
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 220, in _create_websocket_connection
return websocket.create_connection(url)
File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 178, in create_connection
websock.connect(url, **options)
File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 419, in connect
hostname, port, resource, is_secure = _parse_url(url)
File "/usr/local/lib/python2.7/dist-packages/websocket.py", line 141, in _parse_url
raise ValueError("scheme %s is invalid" % scheme)
ValueError: scheme unix is invalid
Metadata
Metadata
Assignees
Labels
No labels
Activity
aronasorman commentedon Jan 8, 2014
Seems like it's for an old version of docker and expecting a tcp socket, while newer ones mount on /var/run/docker.sock.
tekknolagi commentedon Jan 9, 2014
@aronasorman Shouldn't be the case. I get this on 0.7.4. Unless you mean that fig expects older versions?
frankscholten commentedon Jan 11, 2014
I am having the same issue with Docker 0.7.5
dazzag24 commentedon Jan 13, 2014
I am seeing the same issue with docker 0.7.5:
Client version: 0.7.5
Go version (client): go1.2
Git commit (client): c348c04
Server version: 0.7.5
Git commit (server): c348c04
Go version (server): go1.2
Last stable version: 0.7.5
aanand commentedon Jan 13, 2014
Right, I'm pretty sure this is because we're using a websocket to attach, and the websockets library doesn't support
unix://URLs. Not entirely surprising.We needn't really be using websockets at all, except that I'm seeing some odd extra bytes in the output when using a raw socket.
While I'm investigating, a temporary fix is to run the Docker daemon on a TCP socket instead of the standard Unix one:
Fig will automatically connect to
127.0.0.1:4243if it's open, so that should be all you need.tekknolagi commentedon Jan 13, 2014
I changed the DOCKER_OPS in /etc/init.d/docker, but nothing appears to have
changed.
On Mon, Jan 13, 2014 at 8:52 AM, Aanand Prasad [email protected]:
bfirsh commentedon Jan 13, 2014
If you're using the standard Docker Ubuntu package, try putting this in
/etc/default/docker:tekknolagi commentedon Jan 13, 2014
I still get the error.
On Mon, Jan 13, 2014 at 9:23 AM, Ben Firshman [email protected]:
Use regular attach socket, not websocket
aanand commentedon Jan 14, 2014
Fixed in a branch, but we're waiting on a fix to docker-py to be accepted/released; if you're feeling brave, you can follow the instructions in #10 to install patched versions of both docker-py and fig.
@tekknolagi: sorry to hear it's still not working. Could you try removing the Unix socket from the config, i.e. just putting
export DOCKER_OPTS="-H tcp://0.0.0.0:4243"in/etc/default/docker?tekknolagi commentedon Jan 14, 2014
Well, now I get this.

aanand commentedon Jan 14, 2014
Oh dear. Right, last thing to try: run
export DOCKER_URL=http://127.0.0.1:4243in your shell before runningfig.bfirsh commentedon Jan 14, 2014
Can you
curl localhost:4243/version?bfirsh commentedon Jan 14, 2014
Actually let's try and debug this step by step. After setting
/etc/default/dockerto:export DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:4243"Run
restart docker. Checkps ax | grep dockerto see if Docker is running. If it isn't, it'll say why in/var/log/upstart/docker.log. If it is, trycurl localhost:4243/versionto see if it's listening on HTTP.frankscholten commentedon Jan 14, 2014
I got it working after I added DOCKER_OPTS="-H 127.0.0.1:4243" in /etc/default/docker
Fig is a great tool btw! I was looking for a Vagrant-like workflow for Docker and this fits the bill :-)
1 remaining item
tekknolagi commentedon Jan 14, 2014
I just have to export that before running the fig client.
On Tue, Jan 14, 2014 at 12:24 PM, Maxwell Bernstein
[email protected]:
tekknolagi commentedon Jan 14, 2014
How come I can't use the
dockerutil if I don't change the environment variable again? Is there no way fordockerdto listen on both the socket and IP?LogPrinter uses regular `attach()`, not websocket
LogPrinter uses regular `attach()`, not websocket
dz0ny commentedon Jan 16, 2014
I see. What about check?
LogPrinter uses regular `attach()`, not websocket
LogPrinter uses regular `attach()`, not websocket
tekknolagi commentedon Jan 16, 2014
Check?
On Thu, Jan 16, 2014 at 5:43 AM, Janez Troha [email protected]:
aanand commentedon Jan 16, 2014
We've released a new version that fixes this. Thanks for your help and patience, folks!
You should now be able to run
docker -dwithout specifying a host, as Fig works just fine against the Unix socket.Note: if you are running it on a TCP port, Fig now looks for the
DOCKER_HOSTenvironment variable (notDOCKER_URL) to maintain consistency with the official Docker client, so be sure to use that.tekknolagi commentedon Jan 16, 2014
Wonderful! Thanks.
On Thu, Jan 16, 2014 at 10:39 AM, Aanand Prasad [email protected]:
Merge pull request #7 from dnephin/speed_up_fig_up
LogPrinter uses regular `attach()`, not websocket
Merge pull request docker#7 from lyda/readme-fix
chore(deps): golang.org/x/crypto v0.53.0