Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Unable to connect to loaclhost:5984 from the docker container #1

Open
pradeep122 opened this issue Jun 9, 2015 · 4 comments
Open

Comments

@pradeep122
Copy link

I pulled the latest docker image and ran it (frodenas/couchdb:1.6).

It does start the couch db service but fails connecting to it.

on running docker logs couchdb, this is what I see

Apache CouchDB has started, time to relax.
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
...
...

Possibly related issue - docker/issues/#98

@frodenas
Copy link
Owner

frodenas commented Jun 9, 2015

Interesting, I'm not able to reproduce your issue. What docker version are you using?

➜  ~  docker run -d --name couchdb -p 5984:5984 frodenas/couchdb:1.6
6f5151d5a0a3e20f25f287b2069cc4ab16b7523564f55a25a5ca0802ea1dfadb
➜  ~  docker logs couchdb
Apache CouchDB has started, time to relax.
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
nc: connect to localhost port 5984 (tcp) failed: Connection refused
Connection to localhost 5984 port [tcp/*] succeeded!
Creating user: "couchdb"...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    21  100     3  100    18    102    614 --:--:-- --:--:-- --:--:--   620
""
Apache CouchDB has been shutdown.
========================================================================
CouchDB User: "couchdb"
CouchDB Password: "H9eF4TUIXBxZNKzb"
========================================================================
Starting CouchDB...
Apache CouchDB 1.6.0 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.32.0>] Apache CouchDB has started on http://0.0.0.0:5984/

@pradeep122
Copy link
Author

$>> sudo docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 7c8fca2
OS/Arch (client): linux/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64

@jessecarrigan
Copy link

I'm having a similar issue. I'm running Docker via Boot2Docker on OSX. I am able to get information from docker logs couchdb, but any other attempts to connect to http://localhost:5894 result in a refused connection.

Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
Server version: 1.7.0
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 0baf609
OS/Arch (server): linux/amd64

@pirafrank
Copy link

this issue can be closed. localhost:5894 is wrong.
if you're on OS X, check the IP of the Linux VM where your docker container is running. you can find that when starting the Docker Quickstart Terminal.
the address should be something like 192.168.99.100. It's not 0.0.0.0 or localhost.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants