Skip to content

Configuration missing on pg_hba.conf ? #3

Description

@orondon

ornellas-mbp:postgresbdr orondon$ docker version
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: darwin/amd64

Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:45:38 2017
OS/Arch: linux/amd64
Experimental: true
ornellas-mbp:postgresbdr orondon$ docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 27
Server Version: 17.09.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.49-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952GiB
Name: moby
ID: U6LD:JS66:5NCB:XI36:KWYD:BEEB:EZRJ:QWIR:D7KG:4FZS:KFHJ:ZVQM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 19
Goroutines: 31
System Time: 2017-11-17T20:39:08.286208735Z
EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Commands

docker run --name postgres --net=welcome-smsx --volume /Users/orondon/Documents/DockerProjects/postgresbdr/postgresql:/var/lib/postgresql -itd --restart always markrowsoft/postgresql-bdr

docker run --name postgres2 --net=welcome-smsx --volume /Users/orondon/Documents/DockerProjects/postgresbdr/postgresql:/var/lib/postgresql -itd --restart always markrowsoft/postgresql-bdr

On System Version: macOS 10.13.1 (17B48)
Kernel Version: Darwin 17.2.0

This is what I get when setting up BDR

wsmsxdb=# CREATE EXTENSION IF NOT EXISTS btree_gist; CREATE EXTENSION IF NOT EXISTS bdr;
NOTICE: extension "btree_gist" already exists, skipping
CREATE EXTENSION
CREATE EXTENSION
wsmsxdb=# SELECT bdr.bdr_group_create( local_node_name := 'node01', node_external_dsn := 'host=172.18.0.2 port=5432 dbname=wsmsxdb' );
FATAL: could not connect to the server in non-replication mode: fe_sendauth: no password supplied

DETAIL: dsn was: connect_timeout=30 keepalives=1 keepalives_idle=20 keepalives_interval=20 keepalives_count=5 host=172.18.0.2 port=5432 dbname=wsmsxdb fallback_application_name='bdr (6489480670487482405,1,16384,):bdrnodeinfo'
CONTEXT: SQL statement "SELECT * FROM bdr_get_remote_nodeinfo(node_local_dsn)"
PL/pgSQL function internal_begin_join(text,text,text,text) line 42 at SQL statement
SQL statement "SELECT bdr.internal_begin_join(
'bdr_group_join',
local_node_name,
CASE WHEN node_local_dsn IS NULL THEN node_external_dsn ELSE node_local_dsn END,
join_using_dsn)"
PL/pgSQL function bdr_group_join(text,text,text,text,integer,text[]) line 21 at PERFORM
SQL statement "SELECT bdr.bdr_group_join(
local_node_name := local_node_name,
node_external_dsn := node_external_dsn,
join_using_dsn := null,
node_local_dsn := node_local_dsn,
apply_delay := apply_delay,
replication_sets := replication_sets)"
PL/pgSQL function bdr_group_create(text,text,text,integer,text[]) line 84 at PERFORM
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

Online forums suggest to alter pg_hba.conf to add
host replication postgres 127.0.0.1/0 trust
If I try that then restart the container, it won’t start up

ornellas-mbp:postgresbdr orondon$ docker logs wsmsx-postgres
Initializing datadir...
Initializing certdir...
Initializing logdir...
Initializing rundir...
Setting resolv.conf ACLs...
pg_ctl: could not start server
Examine the log output.
Initializing datadir...
Initializing certdir...
Initializing logdir...
Initializing rundir...
Setting resolv.conf ACLs...
pg_ctl: could not start server
Examine the log output.
Initializing datadir...

Is there any reason why the original image doesn’t have pg_hba.conf replication configuration?
Could you please help out?

My other issue is that I’m trying to load a sql dump file into the database. Any suggestions as to when to do this, before/after BDR configuration?

Thanks a lot!
Ornella

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions