Hi Lec, you have to provide the name of the database *and* the name of the replica set, e. g. mongodb://db1.example.net,db2.example.net:2500/graylog?replicaSet=rs-name
Cheers, Jochen On Friday, 13 May 2016 17:10:40 UTC+2, [email protected] wrote: > > Hello, > > I am testing 2 cluster system, on both are running graylog 2.x, > elasticsearch 2.x and mongodb 3.x > Till now mongodb was configured standalone and uri was: > mongodb_uri = mongodb://127.0.0.1:27017/graylog > > of course mongodb was listening localy. > > Now I want to move mongodb replica set. I configured mongodb in replica > set and > it seems ok, rs.conf is shown bellow. > > > > > The name of replicaset is reptst > It is listening on two nodes on VLAN IPs. > > reptst:PRIMARY> rs.conf() > { > "_id" : "reptst", > "version" : 2, > "protocolVersion" : NumberLong(1), > "members" : [ > > > So my first question, where in the mongodb_uri should I specify the name > of replicaset ? > > Now I tried several possible uri syntaxes, but mosty I get MongoDB error. > > ----------------------------------------------------------------------- > 2016-05-13T10:15:01.628+02:00 ERROR [CmdLineTool] Guice error (more detail > on log level debug): Error injecting constructor, > java.lang.NullPointerException > > > ################################################################################ > > ERROR: Unable to connect to MongoDB. Is it running and the configuration > correct? > Details: host and port should be specified in host:port format > ------------------------------------------------------- > > > Somewhwere on mongodb documentation > https://docs.mongodb.com/manual/reference/connection-string/ > I found this idea : > mongodb://db1.example.net,db2.example.net:2500/?replicaSet=test > But its also not working. > > Finally the only uri that seems to be workig,I found this more by chance: > > mongodb_uri = mongodb://10.139.123.5/test,10.139.123.6/test > > so if i add /test it is working. So nowhere to add the name of replica > reptst ? > > Thanks, > Lec > > > -- You received this message because you are subscribed to the Google Groups "Graylog Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/15d1d3c4-2bcf-435c-8ef2-835c3a7ee339%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
