Graylog can't connect to MongoDb

Throws an error message if I create a secured mongodb instance with a custom port number rather than the default which has open access.

  • Can connect to the Mongo instance manually

  • Graylog can’t connect to Mongo Auth with Custom Port even when set in graylog.conf

      graylog     | 2020-09-06 15:14:09,623 INFO : org.mongodb.driver.cluster - Exception in monitor thread while connecting to server localhost:9995
    

    graylog | com.mongodb.MongoSocketOpenException: Exception opening socket
    graylog | at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[graylog.jar:?]
    graylog | at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:128) ~[graylog.jar:?]
    graylog | at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) [graylog.jar:?]
    graylog | at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
    graylog | Caused by: java.net.ConnectException: Connection refused (Connection refused)
    graylog | at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_265]
    graylog | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_265]
    graylog | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_265]
    graylog | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_265]
    graylog | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_265]
    graylog | at java.net.Socket.connect(Socket.java:607) ~[?:1.8.0_265]
    graylog | at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:64) ~[graylog.jar:?]
    graylog | at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79) ~[graylog.jar:?]
    graylog | at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65) ~[graylog.jar:?]
    graylog | … 3 more

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