- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
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
Option 1
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
Kind regards,
Polem
Archived Discussions
Effective March 31st, we will no longer engage on PostgresRocks.
How to engage with us further?
- Thought Leadership: EDB Blogs
- Tips and Tricks: Postgres Tutorials
- Customer Support: Create a Case Please note: Only customers with an active EDB support subscription and support portal authorization can create support ticket
- Engage on Stackoverflow While engaging on Stackoverflow tag the question with EDB or EnterpriseDB.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi @Polem
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.
- /usr/edb/pem/bin/configure-pem-server.sh -un
- yum erase edb-pem-server
- Drop the pem database. ( DROP DATABASE pem )
- Move the certificates from /root/.pem/ to other location. ( etc. mv /root/.pem/* /root )
- Move agent.cfg file from /usr/edb/pem/agent/etc/agent.
cfg to some other location. ( etc. mv /usr/edb/pem/agent/etc/agent. cfg /root ). - Try to run /usr/edb/pem/bin/configure-
pem-server.sh'
This uninstall solution works as expected. Request you to try at your end.
Thanks,
Ninad Shah
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: PEM: reinstall of Repo after corruption
Hi Polem,
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.
Installing Postgres Enterprise Manager
Kindly let us know in case of any concerns or issues.
Regards,
Dhananjay
Dhananjay
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: PEM: reinstall of Repo after corruption
Hi,
I was able to recreate successfully PEM server by following this procedure:
- stop pemagent and remove cert + config
- uninstall WEB server with
/usr/edb/pem/bin/configure-pem-server.sh -un Installation directory: /usr/edb/as10
- stop and drop cluster with remove $PGDATA content
- create cluster and adapt config to your setup:
/usr/edb/as10/bin/initdb --pgdata=/opt/postgres/data --no-redwood
- start cluster with
systemctl start edb-as-10
alter user enterprisedb password '<strong password>';
setenforce Permissive
- /usr/edb/pem/bin/configure-pem-server.sh with option 1
- connect to your PEM server on 8443
- recreate all users
Kindly,
Polem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: PEM: reinstall of Repo after corruption
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: PEM: reinstall of Repo after corruption
Hi @Polem
We are able to reproduce issue at our end. We will consult with our development panel and get back to you on same.
Thanks,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi @Polem
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.
- /usr/edb/pem/bin/configure-pem-server.sh -un
- yum erase edb-pem-server
- Drop the pem database. ( DROP DATABASE pem )
- Move the certificates from /root/.pem/ to other location. ( etc. mv /root/.pem/* /root )
- Move agent.cfg file from /usr/edb/pem/agent/etc/agent.
cfg to some other location. ( etc. mv /usr/edb/pem/agent/etc/agent. cfg /root ). - Try to run /usr/edb/pem/bin/configure-
pem-server.sh'
This uninstall solution works as expected. Request you to try at your end.
Thanks,
Ninad Shah
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: PEM: reinstall of Repo after corruption
Hi @Polem
Just an addition to previous response. You may skip second step in case you would not wish to uninstall PEM server installation.
Thanks,
Ninad Shah
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content