I drop the server by stopping and initdb then adding enterprisedb user a passord. Stopping httpd service
Then I start config-pem-server.sh as root
And I get at end this:
--> [Info] Registering database server with PEM server. ERROR: insert or update on table "agent_server_binding" violates foreign key constraint "agent_server_binding_agent_id_fkey" DETAIL: Key (agent_id)=(1) is not present in table "agent". CONTEXT: SQL statement "INSERT INTO pem.agent_server_binding (agent_id, server_id, server, port, username, database, password) VALUES (agentid, serverid, server_host, server_port, user_name, agent_database, passwd)" PL/pgSQL function pem.startup(text,text,text,integer,text,integer,text,text,text,integer,text) line 39 at SQL statement
As you have mentioned that you have cleaned the data directory and re-initialized the database from scratch.
However, this process will not create the required schema's inside the database which is required for the PEM server to run.
Hence, we request you to setup PEM server itself from the scratch.
Kindly refer below link which will help you to proceed with the setup.
Kindly let us know in case of any concerns or issues.
I was able to recreate successfully PEM server by following this procedure:
/usr/edb/pem/bin/configure-pem-server.sh -un Installation directory: /usr/edb/as10
/usr/edb/as10/bin/initdb --pgdata=/opt/postgres/data --no-redwood
systemctl start edb-as-10
alter user enterprisedb password '<strong password>';
Our development team was able to reproduce the issue. At time of uninstallation one may need to uninstall PEM packages as well by using "yum erase edb-pem-server". Steps to follow should be as below.
This uninstall solution works as expected. Request you to try at your end.
Just an addition to previous response. You may skip second step in case you would not wish to uninstall PEM server installation.