cancel
Showing results for 
Search instead for 
Did you mean: 

Pem error message

Highlighted
Silver Adventurer

Re: Pem error message

I cannot recall it has been a while, is it possible to do that now?
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.

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. 
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

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.

 

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.

serverSmiley Tongueort:database:usernameSmiley Tongueassword

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.