Uploaded image for project: 'Percona Operator for MongoDB'
  1. Percona Operator for MongoDB
  2. K8SPSMDB-557

Allow user to change the port for MongoDB deployment

Details

    • Improvement
    • Status: Open
    • Medium
    • Resolution: Unresolved
    • None
    • None
    • None
    • Yes
    • Yes
    • Yes

    Description

      The user should be able to expose replicasets and mongos on other than default 27017 port.

      It may be valuable from security standpoint or for ease of logically separating clusters.

       

      Right now we have mongod.port variable, but it is not working properly for RS and throws the following error if some other port is set:

      {"level":"error","ts":1631183197.8572798,"logger":"controller_psmdb","msg":"failed to reconcile cluster","Request.Namespace":"default","Request.Name":"cr2","replset":"rs0","error":"handleReplsetInit: exec rs.initiate: command terminated with exit code 1 / Percona Server for MongoDB shell version v4.4.6-8\nconnecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb\nError: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :\[email protected]/mongo/shell/mongo.js:374:17\[email protected](connect):2:6\nexception: connect failed\nexiting with code 1\n / ","errorVerbose":"exec rs.initiate: command terminated with exit code 1 / Percona Server for MongoDB shell version v4.4.6-8\nconnecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb\nError: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017  

      Attachments

        Activity

          People

            Unassigned Unassigned
            sergey.pronin Sergey Pronin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Smart Checklist