Socket Exception : Stream Truncated

Having an issue when connecting to mongodb with TLS configuration . getting the error below when trying to connect with the tls option

mongod service is up and running

OS : Rhel8
MongoDB Version : 4.2.18


Hi @Daniel_Inciong,

Can you share your command line maybe with the options you are trying to use? Are you able to connect by any other mean?


Hi Maxime,

Here is the command line use for connecting

mongo admin --tls --host vbmfarirdbs01.mbtc.mgc.local -tlsCertificateKeyFile vbmfarirdbs01_4096.pem --port 37027 -u testuser

As you are using FIPS mode (which is an Enterprise Advanced feature) I suggest that you open directly a support ticket if you still cannot connect. I don’t see anything wrong except maybe the fact that your --host only includes one of the nodes when it should - in theory - contain the full connection string with the 3 nodes from your Replica Set and the RS name.

That being said, I haven’t touched TLS & these security options for quite some time now so I could also completely miss something obvious.

Maybe someone will have a better idea :confused:. But at least the support will be able to help you more directly.


Also worth looking at the monogd log, and ideally turning up the debug level on the log and seeing if there are clues there.

1 Like

hi john,

thank you for your feedback , already turned up the log but cannot see any error messages. connection accepted then end connection im seeing on the logs

Hi MaBeuLux88

Server is not yet on replica mode since i’m on the initial setup and configuration of a single node. will also check on with support. Thanks


This issue already resolved. Per checking crypto policy is set to FUTURE, resolved when i changed it to FIPS mode


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