[SERVER-13246] couldn't connect to server 127.0.0.1 shell/mongo.js:84 Created: 18/Mar/14  Updated: 10/Dec/14  Resolved: 15/May/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: lanhong Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

docker building an Image with MongoDB


Participants:

 Description   

I start mongodb on docker, but can't connect successful.
the log as following:

{"log":"note: noprealloc may hurt performance in many applications\n","stream":"stdout","time":"2014-03-18T05:55:42.593722763Z"} {"log":"Tue Mar 18 05:55:42.604 [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/backup/dockerRepository/mongodb/data/db 64-bit host=d094da0e9512\n","stream":"stdout","time":"2014-03-18T05:55:42.605036922Z"} {"log":"Tue Mar 18 05:55:42.605 [initandlisten] db version v2.4.9\n","stream":"stdout","time":"2014-03-18T05:55:42.605115366Z"} {"log":"Tue Mar 18 05:55:42.605 [initandlisten] git version: 52fe0d21959e32a5bdbecdc62057db386e4e029c\n","stream":"stdout","time":"2014-03-18T05:55:42.60513023Z"} {"log":"Tue Mar 18 05:55:42.605 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49\n","stream":"stdout","time":"2014-03-18T05:55:42.605151936Z"} {"log":"Tue Mar 18 05:55:42.605 [initandlisten] allocator: tcmalloc\n","stream":"stdout","time":"2014-03-18T05:55:42.60517402Z"}

{"log":"Tue Mar 18 05:55:42.605 [initandlisten] options:

{ dbpath: \"/backup/dockerRepository/mongodb/data/db\", noprealloc: true, smallfiles: true }

\n","stream":"stdout","time":"2014-03-18T05:55:42.605180818Z"}

{"log":"Tue Mar 18 05:55:42.637 [initandlisten] journal dir=/backup/dockerRepository/mongodb/data/db/journal\n","stream":"stdout","time":"2014-03-18T05:55:42.637417335Z"} {"log":"Tue Mar 18 05:55:42.637 [initandlisten] recover : no journal files present, no recovery needed\n","stream":"stdout","time":"2014-03-18T05:55:42.637538851Z"} {"log":"Tue Mar 18 05:55:43.735 [initandlisten] preallocateIsFaster=true 12.98\n","stream":"stdout","time":"2014-03-18T05:55:43.735835471Z"} {"log":"Tue Mar 18 05:55:44.808 [initandlisten] preallocateIsFaster=true 12.2\n","stream":"stdout","time":"2014-03-18T05:55:44.808930395Z"} {"log":"Tue Mar 18 05:55:46.877 [initandlisten] preallocateIsFaster=true 11.92\n","stream":"stdout","time":"2014-03-18T05:55:46.877693245Z"} {"log":"Tue Mar 18 05:55:46.877 [initandlisten] preallocateIsFaster check took 4.24 secs\n","stream":"stdout","time":"2014-03-18T05:55:46.877898039Z"} {"log":"Tue Mar 18 05:55:46.877 [initandlisten] preallocating a journal file /backup/dockerRepository/mongodb/data/db/journal/prealloc.0\n","stream":"stdout","time":"2014-03-18T05:55:46.877941436Z"} {"log":"Tue Mar 18 05:55:47.498 [initandlisten] preallocating a journal file /backup/dockerRepository/mongodb/data/db/journal/prealloc.1\n","stream":"stdout","time":"2014-03-18T05:55:47.498707433Z"} {"log":"Tue Mar 18 05:55:48.000 [initandlisten] preallocating a journal file /backup/dockerRepository/mongodb/data/db/journal/prealloc.2\n","stream":"stdout","time":"2014-03-18T05:55:48.000820035Z"} {"log":"Tue Mar 18 05:55:48.575 [FileAllocator] allocating new datafile /backup/dockerRepository/mongodb/data/db/local.ns, filling with zeroes...\n","stream":"stdout","time":"2014-03-18T05:55:48.575854993Z"} {"log":"Tue Mar 18 05:55:48.575 [FileAllocator] creating directory /backup/dockerRepository/mongodb/data/db/_tmp\n","stream":"stdout","time":"2014-03-18T05:55:48.575917339Z"} {"log":"Tue Mar 18 05:55:48.631 [FileAllocator] done allocating datafile /backup/dockerRepository/mongodb/data/db/local.ns, size: 16MB, took 0.044 secs\n","stream":"stdout","time":"2014-03-18T05:55:48.631852483Z"} {"log":"Tue Mar 18 05:55:48.631 [FileAllocator] allocating new datafile /backup/dockerRepository/mongodb/data/db/local.0, filling with zeroes...\n","stream":"stdout","time":"2014-03-18T05:55:48.632129206Z"} {"log":"Tue Mar 18 05:55:48.663 [FileAllocator] done allocating datafile /backup/dockerRepository/mongodb/data/db/local.0, size: 16MB, took 0.03 secs\n","stream":"stdout","time":"2014-03-18T05:55:48.663222167Z"} {"log":"Tue Mar 18 05:55:48.664 [websvr] admin web console waiting for connections on port 28017\n","stream":"stdout","time":"2014-03-18T05:55:48.665074439Z"} {"log":"Tue Mar 18 05:55:48.665 [initandlisten] waiting for connections on port 27017\n","stream":"stdout","time":"2014-03-18T05:55:48.665138826Z"}

 Comments   
Comment by Thomas Rueckstiess [ 15/May/14 ]

Hi,

The mongod log does not indicate any issues, and the server is waiting for connections

Tue Mar 18 05:55:48.665 [initandlisten] waiting for connections on port 27017

The SERVER project is for reporting bugs or feature suggestions for the MongoDB server. This question is better suited for our mongodb-users Google Group or on Stack Overflow with the "mongodb" tag.

Regards,
Thomas

Generated at Thu Feb 08 03:31:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.