CenturyLinkLabs / dockerfile-from-image

574 stars 134 forks source link

Failed to run #15

Closed longtimeago closed 8 years ago

longtimeago commented 8 years ago

Could you please help to resolve the error?

/usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/unix_socket.rb:14:in `connect_nonblock': Connection refused - connect(2) for /var/run/docker.sock (Errno::ECONNREFUSED) (Excon::Errors::SocketError)
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/unix_socket.rb:14:in `connect'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/socket.rb:28:in `initialize'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:385:in `new'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:385:in `socket'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:106:in `request_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/mock.rb:47:in `request_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in `request_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in `request_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in `request_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in `request_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:233:in `request'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/idempotent.rb:26:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:256:in `rescue in request'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:204:in `request'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/idempotent.rb:26:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:256:in `rescue in request'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:204:in `request'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/idempotent.rb:26:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in `error_call'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:256:in `rescue in request'
    from /usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:204:in `request'
    from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:40:in `request'
    from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:65:in `block (2 levels) in <class:Connection>'
    from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/image.rb:172:in `all'
    from /usr/src/app/dockerfile-from-image.rb:32:in `<main>'

Docker info: docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 496 Server Version: 1.11.1 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 660 Dirperm1 Supported: false Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge null Kernel Version: 3.13.0-85-generic Operating System: Ubuntu 14.04.4 LTS OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 15.37 GiB Name: XXX ID: FMZO:5B63:3PIT:K463:SYKZ:CTIW:OYXI:FXVZ:HDYI:JZKE:BOEO:QDZT Docker Root Dir: /var/lib/docker Debug mode (client): false Debug mode (server): false Username: XXX Registry: https://index.docker.io/v1/ WARNING: No swap limit support

longtimeago commented 8 years ago

Solved, sorry for disturbing

levonlee commented 7 years ago

How do you solve this issue? I'm having the same problem. Thanks!

My first line is Errno::ENOENT instead of Errno::ECONNREFUSED

/usr/lib/ruby/gems/2.2.0/gems/excon-0.45.4/lib/excon/unix_socket.rb:14:in `connect_nonblock': No such file or directory - connect(2) for /var/run/docker.sock (Errno::ENOENT) (Excon::Errors::SocketError)
longtimeago commented 7 years ago

@levonlee I wish I could remember that :) Tried right now and faced the issue https://github.com/CenturyLinkLabs/dockerfile-from-image/issues/14

$docker -v
Docker version 17.05.0-ce, build 89658be

Probably, the tool broken :(

levonlee commented 7 years ago

@longtimeago I followed this reply in #14.

I modified the Dockerfile as stated and build the image myself. And it resolved my problem..

dorbodwolf commented 5 years ago

same error on Docker version 18.09.0, build 4d60db4