Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      debezium-connector-mongodb version 1.9.0.Final

      What is the connector configuration?

      {
        "name": "test-mongodb-connector",
        "config": {
          "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
          "mongodb.hosts": "mongos.mongo-cluster:27017",
          "mongodb.name": "test_mongodb",
          "collection.include.list": "public.test_collection",
          "capture.mode": "oplog"
        }
      }
      

      What is the captured database version and mode of deployment?

      MongoDB v4.2.18, Kubernetes

      What behaviour do you expect?

      The connector is successfully created when I specify the data to connect to the shared MongoDB cluster.

      What behaviour do you see?

      The connector creation fails with the error:

      {
        "error_code": 400,
        "message": "Connector configuration is invalid and contains the following 1 error(s):\nUnable to connect: Command failed with error 20 (IllegalOperation): 'Can't use 'local' database through mongos' on server mongos.mongo-cluster:27017. The full response is {\"ok\": 0.0, \"errmsg\": \"Can't use 'local' database through mongos\", \"code\": 20, \"codeName\": \"IllegalOperation\", \"operationTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"YCO98zagOHfEzh2/tdz9tdYLnIw=\", \"subType\": \"00\"}}, \"keyId\": 7079052315168079876}}}\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
      }
      

      Do you see the same behaviour using the latest released Debezium version?

      Yes

      Implementation ideas (optional)

      I suggest using "config" database if the database exists, otherwise, use "local" database to get MongoDB version during connector validation.

            [DBZ-5003] Can't use 'local' database through mongos

            Debezium Builder made changes -
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            Released

            Debezium Builder added a comment - Released
            Debezium Builder made changes -
            Target Release New: 1.9.GA [ 12381652 ]
            Jiri Pechanec made changes -
            Resolution New: Done [ 1 ]
            Status Original: Pull Request Sent [ 10011 ] New: Resolved [ 5 ]
            Jiri Pechanec made changes -
            Fix Version/s New: 2.0-next [ 12380203 ]
            Fix Version/s New: 1.9.1.Final [ 12384300 ]
            Automated transition triggered when Andrey Pustovetov (Inactive) created pull request #3410 in GitHub -
            Status Original: Open [ 1 ] New: Pull Request Sent [ 10011 ]
            Andrey Pustovetov (Inactive) made changes -
            Description Original: In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
            h1. Bug report

            For bug reports, provide this information, please:
            h2. What Debezium connector do you use and what version?

            debezium-connector-mongodb version 1.9.0.Final

            h2. What is the connector configuration?

            {noformat}
            {
              "name": "test-mongodb-connector",
              "config": {
                "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
                "mongodb.hosts": "mongos.mongo-cluster:27017",
                "mongodb.name": "test_mongodb",
                "collection.include.list": "public.test_collection",
                "capture.mode": "oplog"
              }
            }
            {noformat}

            h2. What is the captured database version and mode of deployment?

            MongoDB v4.2.18, Kubernetes

            h2. What behaviour do you expect?

            The connector is successfully created when I specify the data to connect to the shared MongoDB cluster.

            h2. What behaviour do you see?

            The connector creation fails with the error:
            {noformat}
            {
              "error_code": 400,
              "message": "Connector configuration is invalid and contains the following 1 error(s):\nUnable to connect: Command failed with error 20 (IllegalOperation): 'Can't use 'local' database through mongos' on server mongos.mongo-cluster:27017. The full response is {\"ok\": 0.0, \"errmsg\": \"Can't use 'local' database through mongos\", \"code\": 20, \"codeName\": \"IllegalOperation\", \"operationTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"YCO98zagOHfEzh2/tdz9tdYLnIw=\", \"subType\": \"00\"}}, \"keyId\": 7079052315168079876}}}\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
            }
            {noformat}

            h2. Do you see the same behaviour using the latest released Debezium version?

            Yes

            h2. Implementation ideas (optional)

            I suggest to use "config" database if the database exists, otherwise, use "local" database to get MongoDB version during connector validation.
            New: h1. Bug report

            For bug reports, provide this information, please:
            h2. What Debezium connector do you use and what version?

            debezium-connector-mongodb version 1.9.0.Final

            h2. What is the connector configuration?

            {noformat}
            {
              "name": "test-mongodb-connector",
              "config": {
                "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
                "mongodb.hosts": "mongos.mongo-cluster:27017",
                "mongodb.name": "test_mongodb",
                "collection.include.list": "public.test_collection",
                "capture.mode": "oplog"
              }
            }
            {noformat}

            h2. What is the captured database version and mode of deployment?

            MongoDB v4.2.18, Kubernetes

            h2. What behaviour do you expect?

            The connector is successfully created when I specify the data to connect to the shared MongoDB cluster.

            h2. What behaviour do you see?

            The connector creation fails with the error:
            {noformat}
            {
              "error_code": 400,
              "message": "Connector configuration is invalid and contains the following 1 error(s):\nUnable to connect: Command failed with error 20 (IllegalOperation): 'Can't use 'local' database through mongos' on server mongos.mongo-cluster:27017. The full response is {\"ok\": 0.0, \"errmsg\": \"Can't use 'local' database through mongos\", \"code\": 20, \"codeName\": \"IllegalOperation\", \"operationTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"YCO98zagOHfEzh2/tdz9tdYLnIw=\", \"subType\": \"00\"}}, \"keyId\": 7079052315168079876}}}\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
            }
            {noformat}

            h2. Do you see the same behaviour using the latest released Debezium version?

            Yes

            h2. Implementation ideas (optional)

            I suggest using "config" database if the database exists, otherwise, use "local" database to get MongoDB version during connector validation.
            Andrey Pustovetov (Inactive) made changes -
            Git Pull Request New: https://github.com/debezium/debezium/pull/3410
            Description Original: In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
            h1. Bug report

            For bug reports, provide this information, please:
            h2. What Debezium connector do you use and what version?

            debezium-connector-mongodb version 1.9.0.Final

            h2. What is the connector configuration?

            {noformat}
            {
              "name": "test-mongodb-connector",
              "config": {
                "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
                "mongodb.hosts": "mongos.mongo-cluster:27017",
                "mongodb.name": "test_mongodb",
                "collection.include.list": "public.test_collection",
                "capture.mode": "oplog"
              }
            }
            {noformat}

            h2. What is the captured database version and mode of deployment?

            MongoDB v4.2.18, Kubernetes

            h2. What behaviour do you expect?

            The connector is successfully created when I specify the data to connect to the shared MongoDB cluster.

            h2. What behaviour do you see?

            The connector creation fails with the error:
            {noformat}
            {
              "error_code": 400,
              "message": "Connector configuration is invalid and contains the following 1 error(s):\nUnable to connect: Command failed with error 20 (IllegalOperation): 'Can't use 'local' database through mongos' on server mongos.mongo-cluster:27017. The full response is {\"ok\": 0.0, \"errmsg\": \"Can't use 'local' database through mongos\", \"code\": 20, \"codeName\": \"IllegalOperation\", \"operationTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"YCO98zagOHfEzh2/tdz9tdYLnIw=\", \"subType\": \"00\"}}, \"keyId\": 7079052315168079876}}}\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
            }
            {noformat}

            h2. Do you see the same behaviour using the latest released Debezium version?

            Yes

            h2. Do you have the connector logs, ideally from start till finish?

            (You might be asked later to provide [DEBUG/TRACE|https://debezium.io/documentation/reference/stable/operations/logging.html] level log)

            <Your answer>
            h2. How to reproduce the issue using our [tutorial|https://github.com/debezium/debezium-examples/tree/main/tutorial] deployment?

            <Your answer>
            h1. Feature request or enhancement

            For feature requests or enhancements, provide this information, please:
            h2. Which use case/requirement will be addressed by the proposed feature?

            <Your answer>
            h2. Implementation ideas (optional)

            <Your answer>
            New: In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
            h1. Bug report

            For bug reports, provide this information, please:
            h2. What Debezium connector do you use and what version?

            debezium-connector-mongodb version 1.9.0.Final

            h2. What is the connector configuration?

            {noformat}
            {
              "name": "test-mongodb-connector",
              "config": {
                "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
                "mongodb.hosts": "mongos.mongo-cluster:27017",
                "mongodb.name": "test_mongodb",
                "collection.include.list": "public.test_collection",
                "capture.mode": "oplog"
              }
            }
            {noformat}

            h2. What is the captured database version and mode of deployment?

            MongoDB v4.2.18, Kubernetes

            h2. What behaviour do you expect?

            The connector is successfully created when I specify the data to connect to the shared MongoDB cluster.

            h2. What behaviour do you see?

            The connector creation fails with the error:
            {noformat}
            {
              "error_code": 400,
              "message": "Connector configuration is invalid and contains the following 1 error(s):\nUnable to connect: Command failed with error 20 (IllegalOperation): 'Can't use 'local' database through mongos' on server mongos.mongo-cluster:27017. The full response is {\"ok\": 0.0, \"errmsg\": \"Can't use 'local' database through mongos\", \"code\": 20, \"codeName\": \"IllegalOperation\", \"operationTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1650033077, \"i\": 2}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"YCO98zagOHfEzh2/tdz9tdYLnIw=\", \"subType\": \"00\"}}, \"keyId\": 7079052315168079876}}}\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
            }
            {noformat}

            h2. Do you see the same behaviour using the latest released Debezium version?

            Yes

            h2. Implementation ideas (optional)

            I suggest to use "config" database if the database exists, otherwise, use "local" database to get MongoDB version during connector validation.
            Andrey Pustovetov (Inactive) created issue -

              Unassigned Unassigned
              andrey.pustovetov@gmail.com Andrey Pustovetov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: