admin管理员组

文章数量:1291597

We are running a self-hosted mongodb deployment as a three member replica set (PSA), recently upgraded from mongodb 6.0.3 to 8.0.4. We are running in a containerized environment. Every so often, I see logs like the following:

{"t":{"$date":"2025-02-10T17:08:53.642+00:00"},"s":"I", "c":"ACCESS", "id":5286307, "ctx":"conn440","msg":"Failed to authenticate","attr":{"client":"172.22.0.1:39686","isSpeculative":false,"isClusterMember":false,"mechanism":"","user":"","db":"","error":"AuthenticationAbandoned: Authentication session abandoned, client has likely disconnected","result":337,"metrics":{"conversation_duration":{"micros":358000215,"summary":{}}},"extraInfo":{}}}

I see no evidence of failure to replicate or other problems. The message may be logged by any of the 3 members of the replica set. The log message does not show up if we deploy our application without a replica set. What does this log mean? Is there a way to address a problem it relates to, or is it “expected”?

EDIT: Here is a docker compose file that shows how we're running mongo

version: '2'
services:
  mongodb:
    image: "mongo:8.0.4"
    logging: &log
      driver: json-file
    command: --replSet myReplSet --wiredTigerEngineConfigString="cache_size=512M" --maxConns=26214
    environment:
      GLIBC_TUNABLES: glibc.pthread.rseq=0
    depends_on:
      - mongodb-arb
      - mongodb-dr
  mongodb-arb:
    image: "mongo:8.0.4"
    ports:
      - "27018:27017"
    logging: *log
    restart: always
    command: --replSet myReplSet --wiredTigerEngineConfigString="cache_size=512M" --maxConns=26214
  mongodb-dr:
    image: "mongo:8.0.4"
    ports:
      - "27019:27017"
    logging: *log
    restart: always
    command: --replSet myReplSet --wiredTigerEngineConfigString="cache_size=512M" --maxConns=26214

and the arguments to rs.initiate() to configure it:

          {
            "_id": "myReplSet",
            "members": [
            { "_id": 0, "host": "mongodb:27017", "priority": 1 },
            { "_id": 1, "host": "mongodb-dr:27017", "priority": 0},
            { "_id": 2, "host": "mongodb-arb:27017", "arbiterOnly": true }
            ]}

本文标签: