PostgreSQL

[PostgresSQL] 복제테스트 돌려보는데 에러 떨어짐

bbugge 2025. 10. 6. 15:56

-- postgresql 17.2

pg_basebackup -h <마스터서버IP> -p 5432 -D $PGDATA -U dbarep -c fast -X stream -v -R -P --waldir=/pg_wal -W

 

 listen_addresses 파라메터의 기본값이 localhost로 되어있음 그래서 연결을 거부함.
pg_basebackup: error: connection to server at "<마스터서버IP>", port 5432 failed: 연결이 거부됨
  Is the server running on that host and accepting TCP/IP connections?

listen_addresses 파라메터 값을 *(아스타)로 바꿔줌

떨어지는 에러내용이 바뀜

 pg_basebackup: error: connection to server at "<마스터서버IP>", port 5432 failed: FATAL:  no pg_hba.conf entry for replication connection from host "<복제해올서버IP>", user "dbarep", no encryption