Not the answer you need?
Register and ask your own question!

Adding postgres instance failing with error

sureshr7sureshr7 ContributorCurrent User Role Beginner
[[email protected] 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

Comments

  • sureshr7sureshr7 Contributor Current User Role Beginner
    Adding an account with user "postgres" works fine.

    [[email protected] 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
  • Michael CoburnMichael Coburn Principal Architect, Percona Percona Staff Role
    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!
  • nailyanailya Percona Percona Staff Role
    Hi sureshr7
    Thank you for the report! I've tried to reproduce the problem, but everything works ok:

    [email][email protected]:/home/nailya.kutlubaeva[/email]# 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?
  • sureshr7sureshr7 Contributor Current User Role Beginner
    Postgres Version : 10.5.1
  • sureshr7sureshr7 Contributor Current User Role Beginner
    Is there any additional debug option to troubleshoot this? Tried with verbose and not much help.
  • sureshr7sureshr7 Contributor Current User Role Beginner
    Found the problem with password with special characters. After removing pmm user worked fine. Just a bad error message.
  • Michael CoburnMichael Coburn Principal Architect, Percona Percona Staff Role
    Hi sureshr7
    Good find! What was the special character in particular?
  • Michael CoburnMichael Coburn Principal Architect, Percona Percona Staff Role
    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,
  • sureshr7sureshr7 Contributor Current User Role Beginner
    I had "?-" as special characters. I have passed within single quotes. Still failed.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.