You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
version: '4'networks:
cluster:
driver: bridgeservices:
pgmaster:
image: paunin/postdock-pgsqlenvironment:
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"NODE_ID: 1# Integer number of nodeNODE_NAME: node1 # Node nameCLUSTER_NODE_NETWORK_NAME: pgmaster # (default: hostname of the node)NODE_PRIORITY: 100# (default: 100)SSH_ENABLE: 1#database we want to use for applicationPOSTGRES_PASSWORD: postgresPOSTGRES_USER: postgresPOSTGRES_DB: db_testCLEAN_OVER_REWIND: 0CONFIGS: "listen_addresses:'*',max_replication_slots:5"# in format variable1:value1[,variable2:value2[,...]]# used for pgpool.conf file#defaults:CLUSTER_NAME: pg_cluster # default is pg_clusterREPLICATION_DB: db_test_replica # default is replication_dbREPLICATION_USER: postgres # default is replication_userREPLICATION_PASSWORD: postgres # default is replication_passports:
- 5432:5432volumes:
- pgmaster:/var/lib/postgresql/datanetworks:
cluster:
aliases:
- pgmasterpgslave1:
image: paunin/postdock-pgsqlenvironment:
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"REPLICATION_PRIMARY_HOST: pgmasterNODE_ID: 2NODE_NAME: node2CLUSTER_NODE_NETWORK_NAME: pgslave1 # (default: hostname of the node)CLEAN_OVER_REWIND: 1CONFIGS: "max_replication_slots:10"#some overridesports:
- 5441:5432volumes:
- pgslave1:/var/lib/postgresql/datanetworks:
cluster:
aliases:
- pgslave1# Add more slaves if requiredpgslave2:
image: paunin/postdock-pgsqlenvironment:
REPLICATION_PRIMARY_HOST: pgslave1 # I want to have cascade Streeming replicationNODE_ID: 3NODE_NAME: node3CLUSTER_NODE_NETWORK_NAME: pgslave2 # (default: hostname of the node)#USE_REPLICATION_SLOTS: 0ports:
- 5442:5432volumes:
- pgslave2:/var/lib/postgresql/datanetworks:
cluster:
aliases:
- pgslave2pgslave3:
image: paunin/postdock-pgsqlenvironment:
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"REPLICATION_PRIMARY_HOST: pgmasterNODE_ID: 4NODE_NAME: node4CLUSTER_NODE_NETWORK_NAME: pgslave3 # (default: hostname of the node)NODE_PRIORITY: 200# (default: 100)CLEAN_OVER_REWIND: 1ports:
- 5443:5432volumes:
- pgslave3:/var/lib/postgresql/datanetworks:
cluster:
aliases:
- pgslave3pgslave4:
image: paunin/postdock-pgsqlenvironment:
REPLICATION_PRIMARY_HOST: pgslave3NODE_ID: 5NODE_NAME: node5CLUSTER_NODE_NETWORK_NAME: pgslave4 # (default: hostname of the node)#USE_REPLICATION_SLOTS: 0ports:
- 5444:5432volumes:
- pgslave4:/var/lib/postgresql/datanetworks:
cluster:
aliases:
- pgslave4backup:
image: paunin/postdock-barmanenvironment:
REPLICATION_USER: postgres # default is replication_userREPLICATION_PASSWORD: postgres # default is replication_passREPLICATION_HOST: pgmasterPOSTGRES_PASSWORD: postgresPOSTGRES_USER: postgresPOSTGRES_DB: db_testSSH_ENABLE: 1BACKUP_SCHEDULE: "*/30 */5 * * *"volumes:
- backup:/var/backupsnetworks:
cluster:
aliases:
- backuppgpool:
image: paunin/postdock-pgpoolenvironment:
PCP_USER: pcp_userPCP_PASSWORD: pcp_passWAIT_BACKEND_TIMEOUT: 60CHECK_USER: postgresCHECK_PASSWORD: postgresCHECK_PGCONNECT_TIMEOUT: 3#timout for checking if primary node is healthySSH_ENABLE: 1DB_USERS: postgres:postgres # in format user:password[,user:password[...]]BACKENDS: "0:pgmaster:5432:1:/var/lib/postgresql/data:ALLOW_TO_FAILOVER,1:pgslave1::::,3:pgslave3::::,2:pgslave2::::"#,4:pgslaveDOES_NOT_EXIST::::# in format num:host:port:weight:data_directory:flag[,...]# defaults:# port: 5432# weight: 1# data_directory: /var/lib/postgresql/data# flag: ALLOW_TO_FAILOVERREQUIRE_MIN_BACKENDS: 3# minimal number of backends to start pgpool (some might be unreachable)CONFIGS: "num_init_children:250,max_pool:4"# in format variable1:value1[,variable2:value2[,...]]# used for pgpool.conf fileports:
- 5430:5432
- 9898:9898# PCPnetworks:
cluster:
aliases:
- pgpoolvolumes:
pgmaster:
pgslave1:
pgslave2:
pgslave3:
pgslave4:
backup:
But for some reason, in the master and all other nodes containers logs I've got this:
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 9 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 8 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 7 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 6 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 5 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 4 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 3 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 2 times more)
>>>>>> Db pix_gateway_test_replica is still not accessable on pgmaster:5432 (will try 1 times more)
>>> Db pix_gateway_test_replica is not accessable, even after 9 tries!
>>> Foreground processes returned code: '1'
psql: could not connect to server: Connection refused
Is the server running on host "pgmaster" (192.168.32.5) and accepting
TCP/IP connections on port 5432?
In the backup container logs I've got:
ERROR: Cannot connect to server 'pg_cluster'
2022-01-05 16:40:02,952 [45] barman.server ERROR: Cannot connect to server 'pg_cluster': could not translate host name "pgmaster" to address: Name or service not known
My machine is a Mac Pro with macOS Monterey 12.1. I've already tried to turn my firewall off but it was not effective.
Any idea of what could be causing it?
The text was updated successfully, but these errors were encountered:
Hi.
I was trying to run a docker-compose with postdock-pgsql, postdock-barman and postdock-pgpool using as reference the file in https://github.com/syndbg/postgres-docker-cluster/blob/master/docker-compose.yml.
The exact file I was using is this one:
But for some reason, in the master and all other nodes containers logs I've got this:
In the backup container logs I've got:
My machine is a Mac Pro with macOS Monterey 12.1. I've already tried to turn my firewall off but it was not effective.
Any idea of what could be causing it?
The text was updated successfully, but these errors were encountered: