Can´t connect to MongoDB

Started by Suraki, August 19, 2022, 10:18:35 AM

Previous topic - Next topic
Hello All,

I have the following problem when testing Zenamor on an Opnsense firewall.

Somehow I can't connect to the local database.

here are a few log extracts.

service mongod status

mongod is running as pid 74804.

netstat -an | grep 27017

tcp4       0    326 127.0.0.1.1329         127.0.0.1.27017        FIN_WAIT_1

tcp4       0    348 127.0.0.1.1328         127.0.0.1.27017        ESTABLISHED

tcp4       0      0 127.0.0.1.27017        .                    LISTEN

fffff80004c4da00 stream      0      0 fffff801a9e275b8                0                0                0 /tmp/mongodb-27017.sock

[socket timeout calling hello on 'localhost:27017']OPNsense\Sensei\SenseiMongoDB::executeQuery::Exception::No suitable servers found (`serverSelectionTryOnce` set): [socket timeout calling hello on 'localhost:27017'][2022-08-19T09:41:02+02:00][INFO] [45553][D:19.37] https://health.sunnyvalley.io/client_report.php could sended.

mongo --host localhost

MongoDB shell version v4.0.28

connecting to: mongodb://localhost:27017/?gssapiServiceName=mongodb

2022-08-19T10:12:22.781+0200 I NETWORK  [js] DBClientConnection failed to receive message from localhost:27017 - HostUnreachable: Connection reset by peer

2022-08-19T10:12:22.782+0200 E QUERY    [js] Error: network error while attempting to run command 'isMaster' on host 'localhost:27017'  :

connect@src/mongo/shell/mongo.js:356:17

@(connect):2:6

__cxa_thread_call_dtors: dtr 0x802f4e230 from unloaded dso, skipping

exception: connect failed

In the livelogs of the firewall nothing is rejected on port 27017.

Zenamor listens to the Laninterface, but the Webgui is bound to a vLan on the same.

Anyone have an idea where I could look for the problem?

i despair...;-)


Hi Sy,

unfortunately already done, without success...

Hi,

What are the hardware specs (Ram, CPU)?

maybe disable syncookies help. I have my enable by default and it caused issue to crowdsec & elasticsearch.