Failed to start mongod com.Could not find appropriate mongod in `/opt/mongodb/mms/mongodb-releases - mongodb

I am getting following error when I tried to activate a backup for mongo instance.
I choosed local and copied all rpms to this folder /opt/mongodb/mms/mongodb-releases.
error:
Failed to start mongod
com.xgen.svc.brs.util.GenericMongoManager$MongodVersionException: Could not find appropriate mongod in `/opt/mongodb/mms/mongodb-releases/`, versions available to MMS: . Expecting version 3.4.4 or greater.
com.xgen.svc.brs.util.GenericMongoManager$Purpose.calculateBinaryPath(GenericMongoManager.java:166)
com.xgen.svc.brs.util.GenericMongoManager$Purpose.<init>(GenericMongoManager.java:125)
com.xgen.svc.brs.util.MongoManager$MongoDPurpose.<init>(MongoManager.java:331)
com.xgen.svc.brs.util.MongoManager$HeadPurpose.<init>(MongoManager.java:477)
com.xgen.svc.brs.job.ReplicaSetJob.startMongo(ReplicaSetJob.java:103)
com.xgen.svc.brs.job.ReplicaSetJob.startMongo(ReplicaSetJob.java:80)
com.xgen.svc.brs.job.IncrementalSyncJob.doWork(IncrementalSyncJob.java:82)
com.xgen.svc.brs.grid.Daemon.iterate(Daemon.java:116)
com.xgen.svc.brs.grid.Daemon.run(Daemon.java:305)

Related

MongoDB - configure encryption in cfg file

MongoDB v4 Ent, Windows Server 2016 Std
Starting mongodb from command line works fine:
mongod --enableEncryption --encryptionKeyFile c:\key\mongodb-keyfile
Now I need to change mongod.cfg so windows service starts with encryption enabled. After adding following parameters to file
security:
enableEncryption: true
encryptionKeyFile: c:\key\mongodb-keyfile
service throw error while starting
error 1067: the process terminated unexpectedly
Any ideas?

ERROR: child process failed, exited with error number 51 MongoDB

Getting this error while restarting MongoDB , I am using Mongo 3.2.4 and doing this set up on a new machine
Starting mongod... about to fork child process, waiting until server is ready for connections.
forked process: 19438
ERROR: child process failed, exited with error number 51
mongod(_ZN5mongo19MmapV1ExtentManager4initEPNS_16OperationContextE+0x4A8) [0x1040278]
mongod(_ZN5mongo26MMAPV1DatabaseCatalogEntryC1EPNS_16OperationContextENS_10StringDataES3_bb+0x187) [0x1036dc7]
mongod(_ZN5mongo12MMAPV1Engine23getDatabaseCatalogEntryEPNS_16OperationContextENS_10StringDataE+0x14E) [0x103a1de]
mongod(_ZN5mongo14DatabaseHolder6openDbEPNS_16OperationContextENS_10StringDataEPb+0x133) [0xac92a3]
----- END BACKTRACE -----
For me this error occured due to incorrect ownership of some files in my data directory. I fixed this using the following command:
sudo chown -R mongodb: /path/to/db/directory
Where mongodb was the database user in my case.
This is resolved by inserting the following lines into /etc/security/limits.conf:
mongodb soft nofile 65535
mongodb hard nofile 90000
mongodb soft nproc 65535
mongodb hard nproc 90000
We need to add the user account used to run the Mongo service. Generally, it is the mongodb user.
In my case the problem was that I haven't created the appropriate folders specified in the config files.

Migration From Tokumx 1.5 To Percona Server For mongodb 3.11

Migrating Data from Tokumx To Percona Server For MonoDB
Step 1 :
This guide describes how to upgrade existing Percona TokuMX instance to Percona Server for MongoDB. The following JavaScript files are required to perform the upgrade:
• allDbStats.js
• tokumx_dump_indexes.js
• psmdb_restore_indexes.js
You can download those files from GitHub.
Step 2 :
Run the allDbStats.js script to record database state before migration:
$ mongo ./allDbStats.js > ~/allDbStats.before.out
Step 3 :
Perform a dump of the database:
$ mongodump --out /your/dump/path
Step 4 :
Perform a dump of the indexes:
$ ./tokumx_dump_indexes.js > /your/dump/path/tokumxIndexes.json
Step 5 :
Restore the collections without indexes using “--noIndexRestore” switch:
$ mongorestore --noIndexRestore /your/dump/path
Step 6 :
Restore the indexes (this may take a while). This step will remove clustering options to the collections before inserting.
$./psmdb_restore_indexes.js --eval "data='/your/dump/path/tokumxIndexes.json' "
Step 7 :
Run the allDbStats.js script to record database state after migration:
mongo ./allDbStats.js > ~/allDbStats.after.out
This is the guide i have found in the Migration from Tokumx to Percona server for mongodb. at step 6 when i try to restore indexes i get below mentioned error :
/mnt/tokumx-bkup/tokumxIndexes.json
2016-06-29T05:28:20.028+0000 E QUERY SyntaxError: Unexpected identifier
at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78:1 at /mnt/tokumx-bkup/tokumxIndexes.json
2016-06-29T05:28:20.028+0000 E QUERY Error: error loading js file: /mnt/tokumx-bkup/tokumxIndexes.json
at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78:1 at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78
failed to load: /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js
Any help will be welcomed.
Thanks
check the tokumxIndexes.json file. When tokumx_dump_indexes.js is run, the mongo shell parameter --quiet must be used or the resulting json will contain the shell preamble at the beginning.
And check the file using something like http://jsonlint.com/
Also if preamble is present delete these two lines from the tokumxIndexes.json file.
"MongoDB shell version: 3.0.11-1.6
connecting to: 127.0.0.1:27017/test"
and Run the script again.
and Run the script again
$./psmdb_restore_indexes.js --eval "data='/your/dump/path/tokumxIndexes.json' "
Now this script will start build Index Process.

Meteor App not able to connect to MongoDB?

I am trying to run the meteor application on windows. I have local mongodb running on my machine and I have also set the environment variable <b>MONGO_URL=mongodb://127.0.0.1:27017/sample</b> on my system. Still meteor application is not able to connect to it. what could be the issue.
Below is the error:-
C:\workspace\node-workspace\gm>meteor
[[[[[ C:\workspace\node-workspace\gm ]]]]]
=> `Meteor server running on: <b>http://127.0.0.1:3000/</b>`
app/packages/mongo-livedata/mongo_driver.js:113
throw err;
^
Error: failed to connect to [127.0.0.1:3002]
at Server.connect.connectionPool.on.server._serverState (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongo
db\connection\server.js:564:74)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongodb\connection\connecti
on_pool.js:124:15)
at EventEmitter.emit (events.js:99:17)
at Socket.errorHandler (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongodb\connection\connection.js:465:1
0)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.self.errorEmitted (net.js:329:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
=> Exited with code: 1
=> Meteor server restarted
app/packages/mongo-livedata/mongo_driver.js:113
throw err;
^
Error: failed to connect to [127.0.0.1:3002]
at Server.connect.connectionPool.on.server._serverState (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongo
db\connection\server.js:564:74)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongodb\connection\connecti
on_pool.js:124:15)
at EventEmitter.emit (events.js:99:17)
at Socket.errorHandler (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongodb\connection\connection.js:465:1
0)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.self.errorEmitted (net.js:329:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
=> Exited with code: 1
=> Meteor server restarted
app/packages/mongo-livedata/mongo_driver.js:113
throw err;
^
Error: failed to connect to [127.0.0.1:3002]
at Server.connect.connectionPool.on.server._serverState (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongo
db\connection\server.js:564:74)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongodb\connection\connecti
on_pool.js:124:15)
at EventEmitter.emit (events.js:99:17)
at Socket.errorHandler (C:\Program Files (x86)\Meteor\packages\mongo-livedata\.npm\node_modules\mongodb\lib\mongodb\connection\connection.js:465:1
0)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.self.errorEmitted (net.js:329:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.
Given that the stack trace says that meteor is still trying to connect to the mongoDb instance on port 3002, then either you have't set the environment variable properly or you haven't reloaded the cmd shell to get the new value.
How did you set MONGO_URL ? If you set it through the System Properties or updated the autoexec.bat then you'll need to re-load the cmd shell.
You can see what the current value is by typing in the cmd shell:
echo %MONGO_URL%
Then to set it for the current env you can do :
set MONGO_URL=mongodb://127.0.0.1:27017/sample
I know it's been awhile but I ran into this same issue (in July 13') I didn't have time to figure it out and ended up going to a Linux installation which worked fine.
Recently however I got some time to circle back to it. Here is some discussion on the matter in the google group- https://groups.google.com/forum/#!topic/meteor-talk/AE6GYrJImAo
I found out that the Mongo DB process was not even starting, some conflict within mongo_runner.js ... My solution was to start mongo manually
C:\Program Files (x86)\Meteor\mongodb\bin>mongod -port 3002 --dbpath C:\Users\username\project\.meteor\local\db
The above starts the project on the needed port and specifies the database folder for your project... After this just start meteor as you normally would.
As of Version 0.7.1 the meteor mongodb port is 3001, instead of 3002.
The port is generally 1 higher (2 in the case of older versions of meteor) than the port Meteor is running on. e.g if Meteor runs on port 3000, MongoDB would be at port 3001

mongodb on VMPlayer ubuntu

I have installed mongoDB on ubuntu in VMplayer running on windows7.
I have edited the hosts file to have
machinename 192.168.1.12.
I installed all the packages and trying to start the mongod.
This is the error I am getting:
ubuntu:/etc/init.d$ start mongodb start: Rejected send message, 1
matched rules; type="method_call", sender=":1.128" (uid=1000 pid=9669
comm="start mongodb ") interface="com.ubuntu.Upstart0_6.Job"
member="Start" error name="(unset)" requested_reply="0"
destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
Can you please let me know what could be the issue?
I was able to install successfully in a pevious in ubuntu.
That's a permission error, you need to sudo, i.e. run the following and you will be ok -
sudo start mongodb