2018-04-23T14:27:05Z E! Error in plugin [inputs.mongodb]: Unable to connect to MongoDB, no reachable servers
2018-04-23T14:27:15Z E! Error in plugin [inputs.mongodb]: Unable to connect to MongoDB, no reachable servers
2018-04-23T14:27:25Z E! Error in plugin [inputs.mongodb]: Unable to connect to MongoDB, no reachable servers
log on MongoDB:
2018-04-23T14:30:25.014+0000 I - [conn380] AssertionException handling request, closing client connection: 17189 The server is configured to only allow SSL connections
2018-04-23T14:30:25.014+0000 I - [conn380] end connection 10.244.2.114:46078 (1 connection now open)
2018-04-23T14:30:30.002+0000 I NETWORK [thread1] connection accepted from 10.244.2.114:46080 #381 (1 connection now open)
2018-04-23T14:30:30.002+0000 I - [conn381] AssertionException handling request, closing client connection: 17189 The server is configured to only allow SSL connections
2018-04-23T14:30:30.002+0000 I - [conn381] end connection 10.244.2.114:46080 (1 connection now open)
2018-04-23T14:30:30.003+0000 I NETWORK [thread1] connection accepted from 10.244.1.186:41688 #382 (1 connection now open)
If I try to add
[inputs.mongodb.ssl]
enabled = true
in the config, the log at MongoDB changes…
2018-04-23T14:33:14.537+0000 E NETWORK [conn400] no SSL certificate provided by peer; connection rejected
2018-04-23T14:33:14.537+0000 I - [conn400] end connection 10.244.2.115:34446 (1 connection now open)
Tried to use URI with ?ssl=true to force SSH connection.
2018-04-23T14:37:20Z E! Error in plugin [inputs.mongodb]: Unable to parse URL (mongodb://:@/?ssl=true), unsupported connection URL option: ssl=true
I notice that the mongodb plugin is not reporting errors parsing the certificates, I think this might be preventing us from seeing a problem loading the cert. I opened an issue, I’ll try to add this into the upcoming 1.6.1 release and hopefully this will help us debug the issue.
I had a problem with the cert and key file. After fixing those things worked just fine.
In case you want to know the error log was
2018-04-24T17:03:00Z E! Error in plugin [inputs.mongodb]: Could not load TLS client key/certificate from /ssl/mongodb/key.pem:/ssl/mongodb/cert.pem: tls: private key does not match public key