Mongodb access from anther server

i have two graylog servers. i try to access mongodb of one server from the other by using the mongodb_uri.
in the uri of the first i put the ip of the second server
mongodb_uri = mongodb://192.168.1.5:27017/graylog
but when i restart the first graylog server i keep getting this error message on it
org.graylog2.periodical.NodePingThread - Did not find meta info of this node. Re-registering.
and the connection between the first server and the second one is lost every few seconds/minutes

any ideas how to solve this issue

It can be that the graylog server was not able to make a connection to the remote mongodb. You can try testing the connection by using the mongo command from the remote server first:

mongo --host 192.168.1.5 --port 27017

See man mongo for more command line options.

i am using the graylog ova installation and the mongo command is not installed. do i have to install it or is there any other way to check this issue?

I don’t know what options there are. Probably many. But at least it it easy to install mongo shell to a ubuntu installation (which ova image seems to be):

If the already included mongodb is from mongodb-org packages:
sudo apt-get install mongodb-org-shell

If the already included mongodb is from ubuntu packages:
sudo apt-get install mongodb-clients

You can check the already included mongodb with the command:
dpkg -l | grep mongo

Btw. Have you considered making a mongodb replica set, as you are setting up a cluster anyway…
http://docs.graylog.org/en/2.3/pages/configuration/multinode_setup.html

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.