1

I have a MongoDB 4.2.1 replica set, that I am trying to setup x.509 membership as documented here

https://docs.mongodb.com/manual/tutorial/configure-x509-member-authentication/

In doing so, I get the following error when I start up the mongo process.

"Error connecting to myserver.subdomain.domain.int:27017 (10.82.24.29:27017) :: caused by :: internal error"

I have tried to look at the standard log

/var/log/mongodb/mongod.log

and syslog and the kern.log but no other errors are showing up

I have verified that the certificate, Issuer, Subject, Subject Alternate Name and the CA chain are valid. I have also verified port 27017 and the certificate is being served is correct with the following command:

openssl s_client -connect black-duck-data-mart-member-member-3.mia.ucloud.int:27017 -showcerts | openssl x509 -noout -text

and adding grep to verify the SAN

| grep DNS:

Since the error message isn't very useful, I am looking for a way to troubleshoot this problem.

Here is an example configuration file that I am using

# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: /data/mongodb
  journal:
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 0.0.0.0
  tls:
    mode: preferTLS
    certificateKeyFile: "/etc/ssl/private/mongodb.pem"
    CAFile: "/etc/ssl/certs/ca-certificates.crt"
    clusterFile: "/etc/ssl/private/mongodb.pem"

# how the process runs
processManagement:
  timeZoneInfo: /usr/share/zoneinfo

security:
  clusterAuthMode: x509

#operationProfiling:

replication:
  replSetName: "replica01"

On the bindIp I have also set it to the FQDN and the IP but to no avail.

Any assistance in this matter would be greatly appreciated.

  • This error came when using the mongo client, or when starting the mongod process? – Marcos Zolnowski Oct 28 at 22:41
  • 1
    Thanks for the question, I will update my post with how I came up with this error – thxmike Oct 29 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.