cancel
Showing results for 
Search instead for 
Did you mean: 

Pem error message

Highlighted
Silver Adventurer

Pem error message

when i click on memory analysis dash board i get this message. Is this because of a misconfiguration?

 

Capture.JPG

Tags (1)
16 REPLIES 16
Highlighted
Level 3 Adventurer

Re: Pem error message

Hi MattGorham,

 

It seems like the local pem agent is unable to connect to server due to pg_hba authentication.

 

Can you please check worker.log and attach here as well.

Highlighted
Silver Adventurer

Re: Pem error message

checked worker.log and found these messages at the end of the log.

 

Fri Jan 25 15:16:28 2019 WARNING: Heartbeat: Unable to connect to server: 14, error: unable to connect to server 14 dbname postgres: fe_sendauth: no password supplied
.
Fri Jan 25 15:16:29 2019 WARNING: Heartbeat: Unable to connect to server: 6, error: asb cache miss for server 6.
Fri Jan 25 15:16:30 2019 WARNING: Heartbeat: Unable to connect to server: 25, error: unable to connect to server 25 dbname postgres: fe_sendauth: no password supplied
.
Fri Jan 25 15:16:30 2019 WARNING: Heartbeat: Unable to connect to server: 14, error: unable to connect to server 14 dbname postgres: fe_sendauth: no password supplied
.
Fri Jan 25 15:16:31 2019 WARNING: Heartbeat: Unable to connect to server: 6, error: asb cache miss for server 6.
Fri Jan 25 15:16:31 2019 WARNING: probe execution error (id=2 param={25}): unable to connect to server 25 dbname postgres: fe_sendauth: no password supplied

Fri Jan 25 15:16:31 2019 WARNING: probe execution error (id=1 param={14}): unable to connect to server 14 dbname postgres: fe_sendauth: no password supplied

Fri Jan 25 15:16:31 2019 WARNING: Heartbeat: Unable to connect to server: 25, error: unable to connect to server 25 dbname postgres: fe_sendauth: no password supplied
.
Fri Jan 25 15:16:31 2019 WARNING: Heartbeat: Unable to connect to server: 14, error: unable to connect to server 14 dbname postgres: fe_sendauth: no password supplied
.
Fri Jan 25 15:16:33 2019 WARNING: Heartbeat: Unable to connect to server: 6, error: asb cache miss for server 6.
Fri Jan 25 15:16:33 2019 WARNING: Heartbeat: Unable to connect to server: 25, error: unable to connect to server 25 dbname postgres: fe_sendauth: no password supplied
.
Fri Jan 25 15:16:33 2019 WARNING: Heartbeat: Unable to connect to server: 14, error: unable to connect to server 14 dbname postgres: fe_sendauth: no password supplied

Highlighted
Level 3 Adventurer

Re: Pem error message

Hi MattGorham,

 

The issue is with connection string used for connecting local database on PEM server. As log says unable to connect to server database due to no password supplied/failing to authenticate.

 

You can set .pgpass or just try to put trust entry for pem user connecting to pem database for a local server (127.0.0.1) and check.

 

Let us know if you need further assistance on this. 

Highlighted
Silver Adventurer

Re: Pem error message

so i have to create an entry in the .pgpass file for each postgres system i am attempting to monitor?

 

matt

Highlighted
Level 3 Adventurer

Re: Pem error message

Hi  MattGorham,

 

The snapshot you send is indicating local agent for pem server unable to connect to pem server itself, it is not related to database instance it is monitoring.

pem server local agent uses below pg_hba entry to connect to the pem server database.

hostssl pem +pem_user 127.0.0.1/32 md5
hostssl pem +pem_agent 127.0.0.1/32 cert

 

pem server local agent unable to connect to pem server database as failing for password. 

 

Either you can set password to the PEM_MONITORED_SERVER_PASSWORD environment variable on pem server or to create .pgpass file on pem server.

.pgpass file format: (you can put '*' matching any entries)

hostname:port:database:username:password
<pem-server/IP>:<pem-db-port>:<db-name>:<user-connectiong-to-db>:<password>

Highlighted
Silver Adventurer

Re: Pem error message

where is this located.

 

"Either you can set password to the PEM_MONITORED_SERVER_PASSWORD environment variable on pem server"

Level 3 Adventurer

Re: Pem error message

This is just environment variable which you need to set by doing an export on pem server under 'postgres' user (if user account under which the PEM agent will run is postgres)

 

Please let us know.

Highlighted
Silver Adventurer

Re: Pem error message

i created and entry on the pem server under the postgres user,  in .pgpass file like below,  but with my info, 

<pem-server/IP>:<pem-db-port>:<db-name>:<user-connectiong-to-db>:<password>,

 

still getting error

 

however i am still seeing pemerror.JPG

Highlighted
Moderator

Re: Pem error message

Hi Matt,

 

Just curious--did you supply a password when registering your PEM agent(s)?

Highlighted
Silver Adventurer

Re: Pem error message

I cannot recall it has been a while, is it possible to do that now?
Highlighted
Moderator

Re: Pem error message


@MattGorham wrote:
I cannot recall it has been a while, is it possible to do that now?

I'm under the impression that you should still be able to do it if you un-register the agent and re-register it.  Even if you didn't provide the password at register time, I think you should be able to make it work with the .pgpass file.  As per the documentation  section 3.3.2.1 (https://www.enterprisedb.com/docs/en/7.1/peminstguide/installation_guide.1.12.html), you should be able to make it work with 1 of the 3 options.

 

I think there might be more details required here (i.e., how old is this installation? sounds like you've had it running for a while now) -- did you recently try to do an upgrade or something?  Also, which OS user does your pemagent/pemworker process belong to?  That might give a clue into which OS user's homedir needs the .pgpass file.

 

You may also want to get a more comprehensive view (i.e., look at all the Postgres logs on servers 6,14,25, as well as the PEM Server's Postgres logs) to see if any patterns surface.

Highlighted
Silver Adventurer

Re: Pem error message

thanks for the info

 

attempted to run this 

 

The RPM installer places the PEM agent in the /usr/pem/agent/bin directory. To register an agent, include the --register-agent keywords along with registration details when invoking the pemworker utility:
pemworker -–register-agent
 
however  when ever i try to run pemworker it comes back with 
 
[root@servername bin]# pemworker
-bash: pemworker: command not found
 
note that pemworker is in the directory. 
Highlighted
EDB Team Member

Re: Pem error message

Hi @MattGorham,

 

Thanks for the update. You need to execute the pemworker binary, Could you please try to register the PEM agent with below syntax :

 

./pemworker --register-agent

 

Please get back t us in case of any issues/queries.

 

Regards,

Sudhir

Highlighted
Silver Adventurer

Re: Pem error message

[root@servername bin]# ./pemworker --register-agent
Postgres Enterprise Manager Server Hostname: xx.xx.xx.xxx
Postgres Enterprise Manager Server Username: postgres
Wed Feb 6 14:04:23 2019 : WARNING: unable to connect to PEM database: fe_sendauth: no password supplied

Wed Feb 6 14:04:23 2019 : ERROR: Unable to connect to Postgres Enterprise Manager Server
[root@servername bin]#

 

note i have created a .pgpass file in the home directory for the postgres user with an entry for the pem server,  but it doesnt seem to be reading it.

 

Highlighted
EDB Team Member

Re: Pem error message

Hi MattGorham,

 

Below might be the possible causes that  .pgpass is not invoking while registring the PEM agnet.

 

1) Could you please check .pgpass file has 0600 permission and owner should be postgres.

 

2) .pgpass file should have entries in below sequence order.

server:port:database:username:password

3) .pgpass file should be created on the machine where your registring the PEM agent.

 

And also you can follow the below methods as well. 

 

When invoking the pemworker utility, you must provide the password associated with the PEM server administrative user role (postgres). There are three ways to specify the administrative password; you can:

 

1) Set the PEM_SERVER_PASSOWRD environemnt variable

EX: export PEM_SERVER_PASSWORD=postgres

2) Provide the password on the command line with the PGPASSWORD keyword.

EX: export $PGPASSWORD=postgres

3) Create an entry in the .pgpass file.

 

Failure to provide the password will result in a password authentication error; you will be prompted for any other required but omitted information. When the registration is complete, the server will confirm that the agent has been successfully registered.

 

 

Highlighted
Adventurer

Re: Pem error message

I'm also facing the same problem.