turnbullpress / dockerbook-code

The code and configuration examples from The Docker Book (http://www.dockerbook.com)
929 stars 580 forks source link

When i click submit war to tprov getting connection refused error #20

Closed MazharAhmed closed 8 years ago

MazharAhmed commented 8 years ago

Excon::Errors::SocketError - Connection refused - connect(2) (Errno::ECONNREFUSED): /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:142:in connect_nonblock' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:142:inrescue in block in connect' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:119:in block in connect' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:110:ineach' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:110:in connect' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/ssl_socket.rb:148:inconnect' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:28:in initialize' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/ssl_socket.rb:8:ininitialize' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:387:in new' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:387:insocket' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:106:in request_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/mock.rb:47:inrequest_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/instrumentor.rb:22:in request_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:inrequest_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in request_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:inrequest_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in request_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:233:inrequest' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/idempotent.rb:26:in error_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:inerror_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in error_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:inerror_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:256:in rescue in request' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:204:inrequest' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/idempotent.rb:26:in error_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:inerror_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in error_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:inerror_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:256:in rescue in request' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:204:inrequest' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/idempotent.rb:26:in error_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:inerror_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:in error_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/base.rb:10:inerror_call' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:256:in rescue in request' /var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:204:inrequest' /var/lib/gems/1.9.1/gems/docker-api-1.25.0/lib/docker/connection.rb:40:in request' /var/lib/gems/1.9.1/gems/docker-api-1.25.0/lib/docker/connection.rb:65:inblock (2 levels) in class:Connection' /var/lib/gems/1.9.1/gems/docker-api-1.25.0/lib/docker/container.rb:291:in all' /var/lib/gems/1.9.1/gems/tprov-0.0.5/lib/tprov/app.rb:87:inlist_instances' /var/lib/gems/1.9.1/gems/tprov-0.0.5/lib/tprov/app.rb:63:in block in <class:Application>' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:incall' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in block in compile!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in[]' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in block (3 levels) in route!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:993:inroute_eval' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in block (2 levels) in route!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1014:inblock in process_route' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in catch' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:inprocess_route' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:972:in block in route!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:ineach' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in route!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1084:inblock in dispatch!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in block in invoke' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:incatch' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in invoke' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1081:indispatch!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in block in call!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:inblock in invoke' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in catch' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:ininvoke' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in call!' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:894:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:incall' /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in context' /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:incall' /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/logger.rb:15:in call' /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:incall' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:218:in call' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:211:incall' /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/head.rb:13:in call' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/show_exceptions.rb:21:incall' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:181:in call' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:2021:incall' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in block in call' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1795:insynchronize' /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in call' /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:inservice' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:94:inrun'

wydream commented 8 years ago

same problem, @MazharAhmed have you fixed it?

xou commented 8 years ago

On Linux (or when docker daemon is listening on a socket), start tprov by setting the DOCKER_URL environment variable to the docker API, like this:

DOCKER_URL=unix:///var/run/docker.sock tprov

note that you'll also need to docker pull the jamtur01/fetcher and jamtur01/tomcat7 images, as the image names are hardcoded in tprov.