Import Existing Server/Cluster fail after opening postgres port

Comments

11 comments

  • Avatar
    Vishal Kasle

    Hello,

         Can you please send the complete job description for this import activity?

     

    Regards,

    Vishal 

     

    0
    Comment actions Permalink
  • Avatar
    nidhin

    Please find the details,

    Full job details

    [11:15:45]:Adding existing cluster has failed.
    [11:15:45]:Specify one or more servers to add an existing cluster.
    [11:15:45]:Verifying controller host and cmon password.
    [11:15:45]:Adding cluster with type '<strong style='color: #59a449;'>postgresql_single</strong>', vendor '<strong style='color: #59a449;'>default</strong>'.
    Job spec: {
        "command": "add_cluster",
        "job_data":
        {
            "api_id": "1",
            "cluster_name": "gg travels",
            "cluster_type": "postgresql_single",
            "db_password": "asdfgh",
            "db_user": "admin",
            "disable_firewall": true,
            "disable_selinux": true,
            "generate_token": true,
            "install_software": true,
            "nodes": [  ],
            "port": "5432",
            "ssh_keyfile": "/home/traacx/.ssh/id_rsa",
            "ssh_port": "8833",
            "ssh_user": "traacx",
            "sudo_password": "$password",
            "tag": "",
            "user_id": 1,
            "vendor": "default",
            "version": "10"
        }
    }

     

    The message

     

    • [11:51:21]: Adding existing cluster has failed.
    • [11:51:21]: Specify one or more servers to add an existing cluster.
    • [11:51:21]: Verifying controller host and cmon password.
    • [11:51:21]: Adding cluster with type 'postgresql_single', vendor 'default'.

     

    0
    Comment actions Permalink
  • Avatar
    Vishal Kasle

    As you can notice in the job spec under the nodes section:

     "nodes": [  ], there are no ips specified in the nodes section which means there were no nodes specified to be added.

    Below is an example of my test job spec:

    {
      "command": "add_cluster",
      "job_data": {
        "api_id": 1,
        "cluster_name": "Postgres_1",
        "cluster_type": "postgresql_single",
        "db_password": "****",
        "db_user": "admin",
        "disable_firewall": true,
        "disable_selinux": true,
        "generate_token": true,
        "install_software": true,
        "nodes": [
          {
            "hostname": "172.31.30.209",
            "hostname_data": "172.31.30.209",
            "hostname_internal": "",
            "port": "5432"
          }
        ],
        "port": "5432",
        "ssh_keyfile": "/root/.ssh/id_rsa",
        "ssh_port": "22",
        "ssh_user": "root",
        "sudo_password": "",
        "tag": "",
        "user_id": 1,
        "vendor": "default",
        "version": "9.6"
      }
    }

    In this you can see in the blod section that there is IP of the host which needs to be imported.


    0
    Comment actions Permalink
  • Avatar
    Vishal Kasle

    Make sure when you fill the section of nodes while importing the node in the node section you have to enter the hostname/IP and press enter key for Clsuter control to check ssh connection from cluster control node to postgres node. Can you please send screen shots of the steps that you are carrying out for importing the node in a new cluster?

     

    Regards,

    Vishal 

    0
    Comment actions Permalink
  • Avatar
    nidhin

    Dear

    Thanks for the support. The issue is that am not pressing enter key after provoding the host ip.

    Now am facing an another issue that the server installed in ubuntu with username= test

    is the client systems need the same user test ..? am not able to use any other user except test. 

    0
    Comment actions Permalink
  • Avatar
    Paul Namuag

    Hi nidhin,

     

    Indeed, should need the same ssh user to be available on all of the nodes that have to be added in the ClusterControl. So that means, you make sure that user "test" shall be present in all of the nodes. Although that username seemed to be unlikely, but for some testing purposes, you have to make your ssh user available and be the same from all of the nodes and within ClusterControl.

    0
    Comment actions Permalink
  • Avatar
    nidhin

    Dear All,

     

    Thanks for the information, and am not using the user "test" for this purpose i have another custome user for this.

    Also am facing an error that, today one of my node showing red and saying 'failed to start', at that time i cant dump my postgres databases. The issue i found that my postgresql.conf permission has was changed from -rw-r--r--  to -rw-------

    Why the clustercontrol changing my configuration file permission..?

    0
    Comment actions Permalink
  • Avatar
    Vishal Kasle

    You will need to configre a user for ssh from cluster control node to the postgres node. So yes the user which you are using for ssh should be present on the postgres node. Can you please send us the job description for importing the postgres node/cluster. You will find it under activity on the top right of the screen and later in jobs tab.Evaluating those we can take investigate why the node failed to start.

     

    Regards,

    Vishal 

    0
    Comment actions Permalink
  • Avatar
    nidhin

    Dear Vishal,

     

    All the configuration and ssh users are configured and the job finished successfully. after some hours of using the postgresnode become fail and i found that the permission of the postgres.conf in the node was changed by the cluster controller.

    Why the controller changing my node files permissions ?

    Please find the client system ps aux result at that time

     

    ps aux |grep postgres
    traacs    9278  0.0  0.0  14236   876 pts/42   S+   08:33   0:00 grep --color=auto postgres
    postgres 19317  0.0  0.9 2334696 77872 ?       S    07:01   0:00 /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10/main -c config_file=/etc/postgresql/10/main/postgresql.conf
    postgres 19325  0.0  0.2 2334696 18848 ?       Ss   07:01   0:00 postgres: 10/main: checkpointer process   
    postgres 19326  0.0  0.2 2334696 19160 ?       Ss   07:01   0:00 postgres: 10/main: writer process   
    postgres 19327  0.0  0.2 2334696 21556 ?       Ss   07:01   0:00 postgres: 10/main: wal writer process   
    postgres 19328  0.0  0.0 2335100 6660 ?        Ss   07:01   0:00 postgres: 10/main: autovacuum launcher process   
    postgres 19329  0.0  0.0 166168  4788 ?        Ss   07:01   0:00 postgres: 10/main: stats collector process   
    postgres 19330  0.0  0.0 2334972 5192 ?        Ss   07:01   0:00 postgres: 10/main: bgworker: logical replication launcher   
    traacs   19374  0.0  0.0   9568  1684 pts/20   Ss+  03:33   0:00 bash -c echo '$Nuctraacs' | sudo -S 2>/dev/null  bash -c 'systemctl start postgresql'
    root     19376  0.0  0.0  51884  2976 pts/20   S+   03:33   0:00 sudo -S bash -c systemctl start postgresql
    root     19380  0.0  0.0  24184  3416 pts/20   S+   03:33   0:00 systemctl start postgresql
    postgres 30882  0.0  0.1 2335640 13920 ?       Ss   08:03   0:00 postgres: 10/main: admin postgres publicIP(54454) idle

     

    0
    Comment actions Permalink
  • Avatar
    Vishal Kasle

    Hello,

         Cluster Control changes the permission of the datadir files and the configuratrion files to 700 and 600 respectively. But that should not be the reason behind the postgres node to fail> I can see from the ps output that postgres is indeed running? Did you get any alerts? Can you send us the error report you will find it under cluster -> Logs tab -> error report. We will wait for your response.

     

     

    0
    Comment actions Permalink
  • Avatar
    nidhin

    Dear Vishal,

     

    Thanks for the info,

    Currently i dont have the log,  The node was deleted from the cluster because of the failure.

    At that issue time, postgres was running and i cant login to database via psql, its showing error and that error leads to the permission checking. after changing permission to dafault, am able to loging via psql. 

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk