Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQBsY-00084J-Qj for pgsql-admin@arkaria.postgresql.org; Tue, 05 Jun 2018 13:20:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fQBsW-000065-QI for pgsql-admin@arkaria.postgresql.org; Tue, 05 Jun 2018 13:20:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQBsW-00005t-1I for pgsql-admin@lists.postgresql.org; Tue, 05 Jun 2018 13:20:00 +0000 Received: from mail-sn1nam02on0074.outbound.protection.outlook.com ([104.47.36.74] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQBsN-0007mJ-3P for pgsql-admin@lists.postgresql.org; Tue, 05 Jun 2018 13:19:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=journyx.onmicrosoft.com; s=selector1-journyx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hBb12akptBu8pgkod9t2F4pE/4HdrX64PsSVZ+7BlxY=; b=bwcS5aUTU7aebAh+EuACp79muZjVmUFtLedOjwK7x8hUT0DzlupnUeMEa4eNnljB+E+L7KZnxGbEWX2UYE0CvoI82sM07G9QV4ch8+PqEGlsc0zR2gZhWZ6ZcGEjvx+z4lTCM8tUZ4Xs6nr+mpDGs1rXkLRWl2goQ7o4aneKkDg= Received: from BYAPR11MB2663.namprd11.prod.outlook.com (52.135.227.141) by BYAPR11MB2599.namprd11.prod.outlook.com (52.135.227.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.11; Tue, 5 Jun 2018 13:19:46 +0000 Received: from BYAPR11MB2663.namprd11.prod.outlook.com ([fe80::a831:2fbb:7324:26f3]) by BYAPR11MB2663.namprd11.prod.outlook.com ([fe80::a831:2fbb:7324:26f3%5]) with mapi id 15.20.0820.015; Tue, 5 Jun 2018 13:19:46 +0000 From: Scott Whitney To: Pierre Ochsenbein , "pgsql-admin@lists.postgresql.org" Subject: Re: PostgreSQL Streaming replication on two diff networks Thread-Topic: PostgreSQL Streaming replication on two diff networks Thread-Index: AQHT/M8E+PCURdZG5EaX/+IkgMdSTaRRpfrd Date: Tue, 5 Jun 2018 13:19:46 +0000 Message-ID: References: <1528204459993.51275@acceleris.ch> In-Reply-To: <1528204459993.51275@acceleris.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=scott@journyx.com; x-originating-ip: [70.123.158.127] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BYAPR11MB2599;7:LELt6OJhRQAbRvMvUJKFp0TjN17k+oJAjTevEHbZydqpm+fFHxd1oj+poO83VsxT254toDCDF+urHjjpwM6SoI+tbIMvqh6f4vXu0qPn8Tzv08DSEj5uhksK8q0qFZhiU3v1Sm0X274oNj6AC+FtYBxkM/O6cza76vpPn2FZIuwglm4+cHHdPxXuEF6We73GP9+Kx8FhqRkJACKd7gDGLP4ta7BshydxN0OokRGX/UBN50TuMSaFWYJXSHMr8vi5 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020);SRVR:BYAPR11MB2599; x-ms-traffictypediagnostic: BYAPR11MB2599: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(21532816269658); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(2016111802025)(6043046)(6072148)(201708071742011)(7699016);SRVR:BYAPR11MB2599;BCL:0;PCL:0;RULEID:;SRVR:BYAPR11MB2599; x-forefront-prvs: 0694C54398 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(346002)(39380400002)(39840400004)(366004)(189003)(199004)(55016002)(2501003)(105586002)(5250100002)(59450400001)(99286004)(733005)(6506007)(53546011)(25786009)(186003)(14454004)(19627405001)(26005)(106356001)(10126004)(110136005)(966005)(6436002)(53376002)(2906002)(8936002)(66066001)(33656002)(6246003)(7736002)(316002)(8676002)(81156014)(9686003)(102836004)(236005)(7696005)(5660300001)(54896002)(3280700002)(6306002)(229853002)(81166006)(86362001)(476003)(74316002)(68736007)(97736004)(486006)(446003)(6606003)(6116002)(3846002)(606006)(7066003)(15974865002)(2900100001)(1720100001)(3660700001)(11346002)(478600001)(53936002)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR11MB2599;H:BYAPR11MB2663.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: journyx.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: TSV6ZbNrBWJxiiF2FyGiCYNdr+UusBBYRf2Ja0Vy7cCYMAkksijk2j8s3pa6oH9AmqUTurXxvyNiTIqW32lAceUymUUse/vBxEel3JKEIK4JveHs5gBHp1yOuarJpToqMRkv7U7D7KNZS+64vbiQljnXDLmvwUlAFxnHzyTKSqgcocLa2/kXullJdIlGZhiM spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BYAPR11MB2663EE57770AEF7BEAF396E3A7660BYAPR11MB2663namp_" MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 60cbd973-3f2e-470e-f2db-08d5cae7025c X-OriginatorOrg: journyx.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60cbd973-3f2e-470e-f2db-08d5cae7025c X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2018 13:19:46.7601 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83db917a-cb55-44ba-82ef-25aa3e32343f X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2599 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_BYAPR11MB2663EE57770AEF7BEAF396E3A7660BYAPR11MB2663namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sure, but you need to be able to reach it. You need to be able to ping/ssh between the 2 hosts first. ________________________________ From: Pierre Ochsenbein Sent: Tuesday, June 5, 2018 8:14 AM To: pgsql-admin@lists.postgresql.org Subject: PostgreSQL Streaming replication on two diff networks Dear securtiy support, I want to deploy a PostgreSQL Cluster with streaming replication, but I hav= e a problem.. We have two VMs in two different data-centers with two different network. It's possible to made a streaming replication with two different network? My output : vm01:10.1.24.13 vm02:10.0.2.67 On my slave (vm02) : I can't make a pg_basebackup.. pg_basebackup: could not connect to server: could not connect to server: No= route to host Is the server running on host "10.1.24.13" and accepting TCP/IP connections on port 5432? pg_basebackup: removing data directory "/var/lib/pgsql/10/data" [root@vm02 ~]# tcptraceroute 10.1.24.13 5432 traceroute to 10.1.24.13 (10.1.24.13), 30 hops max, 60 byte packets 1 gateway (192.168.1.1) 0.375 ms 0.304 ms 0.282 ms 2 169.254.95.213 (169.254.95.213) 0.261 ms 0.241 ms 0.198 ms 3 10.0.2.1 (10.0.2.1) 1.761 ms 2.725 ms 3.449 ms 4 172.16.9.41 (172.16.9.41) 1.141 ms 172.16.9.33 (172.16.9.33) 1.190 ms= 172.16.9.41 (172.16.9.41) 1.642 ms 5 172.16.9.50 (172.16.9.50) 0.388 ms 172.16.9.54 (172.16.9.54) 0.367 ms= 172.16.9.62 (172.16.9.62) 0.430 ms 6 10.1.23.4 (10.1.23.4) 0.227 ms 0.388 ms 0.345 ms 7 10.1.23.4 (10.1.23.4) 0.298 ms !X 0.384 ms !X 0.326 ms !X pg_hba.conf file on my master : # replication privilege. local replication all peer host replication all 127.0.0.1/32 ident host replication all ::1/128 ident host replication replicate 10.0.2.67/32 scram-sha-256 Thank you so much for your help Best regards, Pierre [Acceleris] Acceleris AG | cloudifying IT Pierre Ochsenbein | Technical Consultant Schosshaldenstrasse 85 | CH-3006 Bern T : +41 31 911 33 22 | F : +41 31 911 62 63 pierre.ochsenbein@acceleris.ch | www.acceleris.ch Acceleris Offices are in : Bern | Zurich | Renens | Bucharest [Acceleris] Disclaimer This message possibly contains confidential data or items of information. I= t is intended solely for the rightful recipient. If you should have receive= d the message wrongfully, it is not permitted to disclose the e-mail messag= e or its contents to third parties, to copy or use it. We would respectfull= y request you to destroy the message with the exclusion of any reproduction= and to notify this to the originator by e-mail. Thank you very much. Journyx, Inc. 7600 Burnet Road #300 Austin, TX 78757 www.journyx.com p 512.834.8888 f 512-834-8858 Do you receive our promotional emails? Click here or visit http://journyx.com/communication-preferences= to unsubscribe. --_000_BYAPR11MB2663EE57770AEF7BEAF396E3A7660BYAPR11MB2663namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Sure, but you need to be able to = reach it.


You need to be able to ping/ssh b= etween the 2 hosts first.




From: Pierre Ochsenbein <= ;pierre.ochsenbein@acceleris.ch>
Sent: Tuesday, June 5, 2018 8:14 AM
To: pgsql-admin@lists.postgresql.org
Subject: PostgreSQL Streaming replication on two diff networks
 

Dear securtiy support,


I want to deploy a PostgreSQL Cluster with streaming replication, but I = have a problem..


We have two VMs in two different data-centers with two different network= .


It's possible to made a streaming replication with two different network= ?


My output :


vm01:10.1.24.13

vm02:10.0.2.67


On my slave (vm02) :

I can't make a pg_basebackup..


pg_basebackup: could not connect to server: could not = connect to server: No route to host
   =  Is the server running on host "10.1.24.13" and accepting
   =  TCP/IP connections on port 5432?
pg_basebackup= : removing data directory "/var/lib/pgsql/10/data"
<= /p>


[root@vm02 ~]# tcptraceroute 10.1.24.13 5432
traceroute to 10.1.24.13 (10.1.24.13), 30 hops max, 60 byte packets
 1  gateway (192.168.1.1)  0.375 ms  0.304 ms  = 0.282 ms
 2  169.254.95.213 (169.254.95.213)  0.261 ms  0.241= ms  0.198 ms
 3  10.0.2.1 (10.0.2.1)  1.761 ms  2.725 ms  3.= 449 ms
 4  172.16.9.41 (172.16.9.41)  1.141 ms 172.16.9.33 (172.= 16.9.33)  1.190 ms 172.16.9.41 (172.16.9.41)  1.642 ms
 5  172.16.9.50 (172.16.9.50)  0.388 ms 172.16.9.54 (172.= 16.9.54)  0.367 ms 172.16.9.62 (172.16.9.62)  0.430 ms
 6  10.1.23.4 (10.1.23.4)  0.227 ms  0.388 ms  = 0.345 ms
 7  10.1.23.4 (10.1.23.4)  0.298 ms !X  0.384 ms !X&= nbsp; 0.326 ms !X



pg_hba.conf file on my master :

# replication privilege.
local   replication     all   =             &nb= sp;            =          peer
host    replication     all  &= nbsp;          127.0.0.1/32&nb= sp;           ident
host    replication     all  &= nbsp;          ::1/128 &n= bsp;            = ;   ident
host    replication     replicate &= nbsp;     10.0.2.67/32      sc= ram-sha-256



Thank you so much for your help


Best regards,

Pierre



3D"Acceleris"

Acceleris= AG | cloudifying IT
Pierre Ochsenbein | Technical Consultant
Schosshaldenstrasse 85 | CH-3006 Bern
T : +41 31 911 33 22 | F : +41 31 911 62 63
pierre.ochsenbein@acceleris.ch | www.acceleris.ch  

Acceleris Offices are in :
Bern | Zurich | Renens | Bucharest
 
3D"Acceleris"
 

Disclaimer

This message possibly contains confidential data or items of information. I= t is intended solely for the rightful recipient. If you should have receive= d the message wrongfully, it is not permitted to disclose the e-mail messag= e or its contents to third parties, to copy or use it. We would respectfully request you to destroy the messag= e with the exclusion of any reproduction and to notify this to the originat= or by e-mail. Thank you very much.







Journyx, Inc.
7600 Burnet Road #300
Austin, TX 78757
www.journyx.com

p 512.834.8888 
f 512-834-8858 

Do you receive our promotional emails? Click here or visit http://journyx.com/communication-preferences to unsubscri= be.
--_000_BYAPR11MB2663EE57770AEF7BEAF396E3A7660BYAPR11MB2663namp_--