Buy Percona ServicesBuy Now!

Adding postgres instance failing with error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding postgres instance failing with error

    [root@dbhost pmm-client]# pmm-admin add postgresql:metrics --user pmm --password 'password' --host dbhost --port 5432
    Error adding PostgreSQL metrics: Cannot connect to PostgreSQL:
    * dial tcp: address tcp/zKF: unknown port

    User pmm is created on postgres database using below commands

    CREATE USER "pmm" WITH PASSWORD 'password';
    ALTER USER "pmm" SET SEARCH_PATH TO "pmm",pg_catalog;
    CREATE SCHEMA "pmm" AUTHORIZATION "pmm";
    CREATE OR REPLACE VIEW "pmm".pg_stat_activity AS SELECT * from pg_catalog.pg_stat_activity;
    GRANT SELECT ON "pmm".pg_stat_activity TO "pmm";
    CREATE OR REPLACE VIEW "pmm".pg_stat_replication AS SELECT * from pg_catalog.pg_stat_replication;
    GRANT SELECT ON "pmm".pg_stat_replication TO "pmm";

    PMM Version : 1.4.1
    Last edited by sureshr7; 09-21-2018, 01:24 PM.

  • #2
    Adding an account with user "postgres" works fine.

    [root@dbhost pmm-client]# pmm-admin add postgresql:metrics --user postgres --password 'password' --host dbhost --port 5432

    OK, now monitoring PostgreSQL metrics using DSN postgresql:***@dbhost:5432/postgres

    Comment


    • #3
      Hi sureshr7

      I'm going to see if I can get an engineer to look at this report and see if you've uncovered a bug. We'll update the thread, thanks!

      Comment


      • #4
        Hi sureshr7
        Thank you for the report! I've tried to reproduce the problem, but everything works ok:

        root@bm-dell02-qanqa01:/home/nailya.kutlubaeva# pmm-admin add postgresql:metrics --user pmm --password 'password' --host=localhost --port=5432
        OK, now monitoring PostgreSQL metrics using DSN postgresql:***@localhost:5432/postgres

        Which version of PostgreSQL do you use?

        Comment


        • #5
          Postgres Version : 10.5.1

          Comment


          • #6
            Is there any additional debug option to troubleshoot this? Tried with verbose and not much help.

            Comment


            • #7
              Found the problem with password with special characters. After removing pmm user worked fine. Just a bad error message.

              Comment


              • #8
                Hi sureshr7
                Good find! What was the special character in particular?

                Comment


                • #9
                  I reported it as https://jira.percona.com/browse/PMM-3039

                  We'll test a variety of characters, but if you can confirm which one(s) you used, that would be helpful! Thanks,

                  Comment


                  • #10
                    I had "?-" as special characters. I have passed within single quotes. Still failed.

                    Comment

                    Working...
                    X