Guest User

Untitled

a guest
Nov 16th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. version: "3.3"
  2. networks:
  3. postdock:
  4. external: true
  5.  
  6. services:
  7. pgmaster:
  8. image: postdock/postgres
  9. environment:
  10. PARTNER_NODES: "pgmaster,pgslave1"
  11. CLUSTER_NODE_NETWORK_NAME: pgmaster
  12. NODE_PRIORITY: 100
  13. NODE_ID: 1
  14. NODE_NAME: pgmaster
  15. POSTGRES_PASSWORD: 123
  16. POSTGRES_USER: postgres
  17. POSTGRES_DB: postgres
  18. CONFIGS: "listen_addresses:'*'"
  19. CLUSTER_NAME: pg_cluster
  20. REPLICATION_DB: replication_db
  21. REPLICATION_USER: replication_user
  22. REPLICATION_PASSWORD: replication_pass
  23. ports:
  24. - 4000:5432
  25. volumes:
  26. - /data/master_slave:/var/lib/postgresql/data
  27. networks:
  28. - postdock
  29. deploy:
  30. placement:
  31. constraints:
  32. - node.role == manager
  33. - node.hostname == 192.168.1.161
  34.  
  35. pgslave1:
  36. image: postdock/postgres
  37. environment:
  38. PARTNER_NODES: "pgmaster,pgslave1"
  39. REPLICATION_PRIMARY_HOST: pgmaster
  40. NODE_ID: 2
  41. NODE_NAME: pgslave1
  42. CLUSTER_NODE_NETWORK_NAME: pgslave1
  43. REPLICATION_PRIMARY_PORT: 5432
  44. CONFIGS: "max_replication_slots:10"
  45. ports:
  46. - 4001:5432
  47. volumes:
  48. - /data/slave_1:/var/lib/postgresql/data
  49. networks:
  50. - postdock
  51. deploy:
  52. placement:
  53. constraints:
  54. - node.role == manager
  55. - node.hostname == 192.168.1.161
  56.  
  57. pgslave2:
  58. image: postdock/postgres
  59. environment:
  60. PARTNER_NODES: "pgmaster,pgslave1,pgslave2"
  61. REPLICATION_PRIMARY_HOST: pgmaster
  62. NODE_ID: 3
  63. NODE_NAME: pgslave2
  64. CLUSTER_NODE_NETWORK_NAME: pgslave2
  65. REPLICATION_PRIMARY_PORT: 5432
  66. CONFIGS: "max_replication_slots:10"
  67. ports:
  68. - 4002:5432
  69. volumes:
  70. - /data/slave_2:/var/lib/postgresql/data
  71. networks:
  72. - postdock
  73. deploy:
  74. placement:
  75. constraints:
  76. - node.role == manager
  77. - node.hostname == 192.168.1.161
  78.  
  79. db:
  80. image: postdock/pgpool
  81. environment:
  82. PCP_USER: pcp_user
  83. PCP_PASSWORD: pcp_pass
  84. WAIT_BACKEND_TIMEOUT: 60
  85. CHECK_USER: postgres
  86. CHECK_PASSWORD: 123
  87. CHECK_PGCONNECT_TIMEOUT: 3
  88. DB_USERS: postgres:123
  89. BACKENDS: "0:pgmaster:5432:1:/var/lib/postgresql/data:ALLOW_TO_FAILOVER,1:pgslave1::::,2:pgslave2::::,"
  90. REQUIRE_MIN_BACKENDS: 1
  91. CONFIGS: "num_init_children:250,max_pool:4"
  92. ports:
  93. - 4003:5432
  94. - 9899:9898
  95. networks:
  96. - postdock
  97. deploy:
  98. placement:
  99. constraints:
  100. - node.role == manager
  101. - node.hostname == 192.168.1.161
  102.  
  103. docker network create -d overlay postdock
  104.  
  105. docker stack deploy -c docker-compose.yml postdock
  106.  
  107. >>> Waiting for local postgres server start...,
  108. expr: non-integer argument,
  109. >>> Wait schema . on pgmaster:5432(user: public,password: *******), will try times with delay 10 seconds (TIMEOUT=)
  110.  
  111. 2018-11-16 04:45:33.310 UTC [122] FATAL: password authentication failed for user "public",
  112. 2018-11-16 04:45:33.310 UTC [122] DETAIL: Role "public" does not exist.,
  113. Connection matched pg_hba.conf line 95: "host all all all md5",
  114. psql: FATAL: password authentication failed for user "public",
  115. 2018-11-16 04:45:37.974 UTC [125] FATAL: no PostgreSQL user name specified in startup packet,
  116. 2018-11-16 04:45:39.345 UTC [127] FATAL: no PostgreSQL user name specified in startup packet,
  117. 2018-11-16 04:45:40.374 UTC [128] FATAL: no PostgreSQL user name specified in startup packet,
  118. 2018-11-16 04:45:41.386 UTC [129] FATAL: no PostgreSQL user name specified in startup packet,
  119. 2018-11-16 04:45:42.421 UTC [130] FATAL: no PostgreSQL user name specified in startup packet,
  120. >>>>>> Host pgmaster:5432 is not accessible (will try times more),
  121. expr: non-integer argument,
  122.  
  123. >>> Waiting for local postgres server start...,
  124. >>> Wait schema replication_db.public on pgmaster:5432(user: replication_user,password: *******), will try 9 times with delay 10 seconds (TIMEOUT=90),
  125. >>>>>> Schema replication_db.public exists on host pgmaster:5432!,
  126. >>> Registering node with role master
Add Comment
Please, Sign In to add comment