cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

script start_replication.sh fails

dgalan
4-Participant

script start_replication.sh fails

Hello,

I'm trying to configure a database with replication streaming.

I have three nodes. Red Hat 8.2

Thingworx is version 8.5.4

I'm following this guide https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/ThingWorxHighAvailability/ExampleDeploymentofPostgreSQLHAwithPgpoolII.html#

 

When I run the script /db/bin/start_replication.sh in the first node (master) I get this error:

 

[postgres@MACHINE0 db]$ sh -x /db/bin/start_replication.sh node0
+ cp /db/postgres/postgresql.conf /db/bin/postgresql.conf
+ cp /db/postgres/pg_hba.conf /db/bin/pg_hba.conf
+ rm -rf /db/postgres
+ rm -rf /db/thingworx/install /db/thingworx/PG_9.6_201608131 /db/thingworx/platform-settings.json /db/thingworx/Thingworx.war /db/thingworx/update
+ pg_basebackup -h node0 -D /db/postgres -U replicator --xlog-method=stream -v -P
pg_basebackup: FATAL: no se pudo abrir el archivo de mapeo de relaciones «global/pg_filenode.map»: No existe el fichero o el directorio
+ cp /db/bin/postgresql.conf /db/postgres/postgresql.conf
+ cp /db/bin/pg_hba.conf /db/postgres/pg_hba.conf

 

The database is runing in this node.

 

The /etc/hosts is

10.98.146.20 MACHINE2 node2
10.98.133.93 MACHINE0 node0
10.98.133.94 MACHINE1 node1

 

Can you some suggestion about this error?

 

Error Message Text Translated by Sharon Langley, 10-mar-2022 using Google Translate: 

could not open relationship mapping file 'global/pg_filenode.map': No such file or directory

 

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:dgalan)

Hi @dgalan

 

It appears the Help Center documentation has been updated.  

 

Regards.

 

--Sharon

View solution in original post

13 REPLIES 13
slangley
23-Emerald II
(To:dgalan)

Hi @dg_10127178.

 

Here are some things to check:

  • Have you validated there aren't any permissions issues?  Does the postgres user have access to the file?
  • Have you tried restarting the server to ensure a clean startup?
  • Did you check postgresql.conf for any typos?   

Regards.

 

--Sharon

 

  

dgalan
4-Participant
(To:slangley)

  • Have you validated there aren't any permissions issues?  Does the postgres user have access to the file?

Yes, I did a "chown -R postgres:postgres /db"

 

  • Have you tried restarting the server to ensure a clean startup?

Yes, several times.

  • Did you check postgresql.conf for any typos?   

This file is ok. The database startup ok.

 

The problem is when I exec this command "pg_basebackup -h node0 -D /db/postgres -U replicator --xlog-method=stream -v -P" after exec "rm -rf /db/postgres"

 

slangley
23-Emerald II
(To:slangley)

Hi @dg_10127178.

 

I recommend opening a case so that one of our Support engineers can review firsthand. Please let me know if you would like me to open the case on your behalf.

 

Regards.

 

--Sharon

dgalan
4-Participant
(To:slangley)

Yes, please, open the case.

slangley
23-Emerald II
(To:slangley)

Hi @dg_10127178.

 

The case has been opened and you should be receiving an email with the case number.

 

Regards.

 

--Sharon

 

dgalan
4-Participant
(To:slangley)

Hello,

Thanks for your help.

I have received the mail with the case number but I cant to access to those case.

 

I get this error:

 

Error: You do not have access to view case 16302986. Please try different case number below.

slangley
23-Emerald II
(To:dgalan)

Hi @dgalan.

 

I have reported the issue with your inability to access the case to the appropriate team.

 

Regards.

 

--Sharon

Hi David,

 

Can you confirm that the issue is generic to the pg_basebackup command on all nodes ?

Are you getting the same error when running the following command on node01 (it just performs a tar backup of the database in the my_backup folder).

pg_basebackup  -h localhost -D my_backup -Ft -z -P -U replicator

 

dgalan
4-Participant
(To:smainente)

Hello,

I don't want to do a backup with the name "my_backup". If I do those backup, it works fine.

The problem is with the documentation about to configure Postgres HA for Thingworx.

 

The first steps are:

 

# cp /db/postgres/postgresql.conf /db/bin/postgresql.conf
# cp /db/postgres/pg_hba.conf /db/bin/pg_hba.conf
# rm -rf /db/postgres
# rm -rf /db/thingworx/install /db/thingworx/PG_9.6_201608131 /db/thingworx/platform-settings.json /db/thingworx/Thingworx.war /db/thingworx/update
# pg_basebackup -h node0 -D /db/postgres -U replicator --xlog-method=stream -v -P

 

(my database is in /db/postgres and /db/thingworx)

dgalan
4-Participant
(To:dgalan)

The use case was clear, the purpose of the test was to validate the pg_basebackup utility.

I will contact you in the context of the case.

slangley
23-Emerald II
(To:dgalan)

Hi @dgalan.

 

Per the case, the issue results when attempting to make a backup of node1 while the db is running.  To avoid the issue, need to make the backup from another node.  An internal case has been opened to review and correct the documentation.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:dgalan)

Hi @dgalan

 

It appears the Help Center documentation has been updated.  

 

Regards.

 

--Sharon

Top Tags