Ask Your Question

PackStack fails with - Error: Unable to connect to mongodb server!

asked 2016-01-01 01:34:40 -0500

prithvee zankat gravatar image

updated 2016-01-01 01:42:16 -0500

Openstack - Kilo
OS - CentOS Linux release 7.2.1511 (Core)

Applying [ ERROR ]
Applying Puppet manifests [ ERROR ]

ERROR : Error appeared during Puppet run:
Error: Unable to connect to mongodb server! (
You will find full trace in log /var/tmp/packstack/20160101-065236-2OHqyr/manifests/
Please check log file /var/tmp/packstack/20160101-065236-2OHqyr/openstack-setup.log for more information
Additional information:
* A new answerfile was created in: /root/packstack-answers-20160101-065237.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* To use Nagios, browse to username: nagiosadmin, password: d11c096693bb44cd

mabgodb.log detail

2015-12-31T14:18:24.233-0500 [initandlisten] MongoDB starting : pid=34017 port=27017 dbpath=/var/lib/mongodb 64-bit
2015-12-31T14:18:24.234-0500 [initandlisten]
2015-12-31T14:18:24.234-0500 [initandlisten] * WARNING: You are running on a NUMA machine.
2015-12-31T14:18:24.234-0500 [initandlisten] *
We suggest launching mongod like this to avoid performance problems:
2015-12-31T14:18:24.234-0500 [initandlisten] * numactl --interleave=all mongod [other options]
2015-12-31T14:18:24.234-0500 [initandlisten]
2015-12-31T14:18:24.234-0500 [initandlisten] db version v2.6.6
2015-12-31T14:18:24.234-0500 [initandlisten] git version: nogitversion
2015-12-31T14:18:24.234-0500 [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2015-12-31T14:18:24.235-0500 [initandlisten] build info: Linux 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 BOOST_LIB_VERSION=1_53
2015-12-31T14:18:24.235-0500 [initandlisten] allocator: tcmalloc
2015-12-31T14:18:24.235-0500 [initandlisten] options: { command: [ "run" ], config: "/etc/mongodb.conf", net: { bindIp: "", http: { enabled: false }, port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", path: "/var/log/mongodb/mongodb.log", quiet: true } }
2015-12-31T14:18:24.235-0500 [initandlisten]
2015-12-31T14:18:24.235-0500 [initandlisten] *
WARNING: Readahead for /var/lib/mongodb is set to 4096KB
2015-12-31T14:18:24.235-0500 [initandlisten] * We suggest setting it to 256KB (512 sectors) or less
2015-12-31T14:18:24.235-0500 [initandlisten] *
2015-12-31T14:18:24.236-0500 [initandlisten] journal dir=/var/lib/mongodb/journal
2015-12-31T14:18:24.237-0500 [initandlisten] recover : no journal files present, no recovery needed
2015-12-31T14:18:24.260-0500 [initandlisten] allocating new ns file /var/lib/mongodb/local.ns, filling with zeroes...
2015-12-31T14:18:24.293-0500 [FileAllocator] allocating new datafile /var/lib/mongodb/local.0, filling with zeroes...
2015-12-31T14:18:24.293-0500 [FileAllocator] creating directory /var/lib/mongodb/_tmp
2015-12-31T14:18:24.295-0500 [FileAllocator] done allocating ...


edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2016-01-09 14:45:22 -0500

dbaxps gravatar image

updated 2016-01-09 14:56:55 -0500

Workaround here :-
Hackery setting up RDO Kilo on CentOS 7.2 with Mongodb && Nagios up and running as of 01/08/2016

Core issue comes up via `netstat -antp | grep mongod`
It shows  binding port to localhost , e.g.  instead oh Node IP. 
With hack applied make sure binding is done correct Node-IP:27017

I was unable to get needed update with puppet patching. See :-

   Whatever I did daemon mongod selected  /etc/mongodb.conf for start, but RDO Kilo placed correct IP into puppet's generated file /etc/mongod.conf. So, fooling mongod I did `ln -s /etc/mongod.conf  /etc/mongodb.conf`. That's it.
edit flag offensive delete link more

answered 2016-01-01 05:16:39 -0500

Praveen N gravatar image

Hi ,

You can try with the below work arounds:

1.If you are not interested in Ceilometer service, disable ceilometer service in packstack answer file and rerun the packstack.

2.If Ceilometer service needs to enabled, its required to edit puppet file /usr/lib/python2.7/site-packages/packstack/puppet/templates/mongodb.pp

> class { 'mongodb::server': smallfiles => true, 
>                                       bind_ip =>['%(CONFIG_MONGODB_HOST)s'],
>                                       pidfilepath => '/var/run/mongodb/',}


edit flag offensive delete link more


Thanks a lot Praveen for help. I am able to configure Open stack successfully and that's save my time. Can you educate me how it is related to ceilometer service? And why mongodb connection was failing?

prithvee zankat gravatar imageprithvee zankat ( 2016-01-01 07:51:27 -0500 )edit

answered 2016-01-02 01:26:13 -0500

uts9 gravatar image

You need to change mongo db bind ip in /etc/mongod.conf file. You can still use Ceilometer.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-01-01 01:34:40 -0500

Seen: 1,295 times

Last updated: Jan 09 '16