Replication issue

Started by Sonam Sharmaalmost 6 years ago5 messagesgeneral
Jump to latest
#1Sonam Sharma
sonams1209@gmail.com

I have setup db replication. And added below parameter in jdbc file . The
connection is failing and it's throwing error like db doesn't exist on
secondary server.

jdbc:postgresql://<primaryhost>:50001,
172.29.195.216:50001/crowd?targetServerType=master&reWriteBatchedInserts=true

.PSQLException: FATAL: database ",172.29.195.216 <+17229195216>:50001/crowd"
does not exist

Can someone help on this issue?

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Sonam Sharma (#1)
Re: Replication issue

On 4/17/20 6:31 AM, Sonam Sharma wrote:

I have setup db replication. And added below parameter in jdbc file .
The connection is failing and it's throwing error like db doesn't exist
on secondary server.

jdbc:postgresql://<primaryhost>:50001,172.29.195.216:50001/crowd?targetServerType=master&reWriteBatchedInserts=true
<http://172.29.195.216:50001/crowd?targetServerType=master&amp;reWriteBatchedInserts=true&gt;

.PSQLException: FATAL: database ",172.29.195.216
<tel:+17229195216>:50001/crowd" does not exist

Can someone help on this issue?

Set up replication using what?

The URL above does not look correct to me. Pretty sure the ',' does not
belong there.

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Julien Rouhaud
rjuju123@gmail.com
In reply to: Adrian Klaver (#2)
Re: Replication issue

On Fri, Apr 17, 2020 at 4:02 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:

On 4/17/20 6:31 AM, Sonam Sharma wrote:

I have setup db replication. And added below parameter in jdbc file .
The connection is failing and it's throwing error like db doesn't exist
on secondary server.

jdbc:postgresql://<primaryhost>:50001,172.29.195.216:50001/crowd?targetServerType=master&reWriteBatchedInserts=true
<http://172.29.195.216:50001/crowd?targetServerType=master&amp;reWriteBatchedInserts=true&gt;

.PSQLException: FATAL: database ",172.29.195.216
<tel:+17229195216>:50001/crowd" does not exist

Can someone help on this issue?

Set up replication using what?

The URL above does not look correct to me. Pretty sure the ',' does not
belong there.

This was probably intended to be the "connection failover" feature
(https://jdbc.postgresql.org/documentation/head/connect.html). I'm
wondering if the issue is just that the driver is too old to support
that, but I have no idea when this was introduced in jdbc.

#4Sonam Sharma
sonams1209@gmail.com
In reply to: Julien Rouhaud (#3)
Re: Replication issue

Yes, you are right. It's for connection failover from application end. I
have set up db replication using repmgr. Version : 9.5

On Fri, Apr 17, 2020, 8:15 PM Julien Rouhaud <rjuju123@gmail.com> wrote:

Show quoted text

On Fri, Apr 17, 2020 at 4:02 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

On 4/17/20 6:31 AM, Sonam Sharma wrote:

I have setup db replication. And added below parameter in jdbc file .
The connection is failing and it's throwing error like db doesn't exist
on secondary server.

jdbc:postgresql://<primaryhost>:50001,

172.29.195.216:50001/crowd?targetServerType=master&reWriteBatchedInserts=true

<

http://172.29.195.216:50001/crowd?targetServerType=master&amp;reWriteBatchedInserts=true

.PSQLException: FATAL: database ",172.29.195.216
<tel:+17229195216>:50001/crowd" does not exist

Can someone help on this issue?

Set up replication using what?

The URL above does not look correct to me. Pretty sure the ',' does not
belong there.

This was probably intended to be the "connection failover" feature
(https://jdbc.postgresql.org/documentation/head/connect.html). I'm
wondering if the issue is just that the driver is too old to support
that, but I have no idea when this was introduced in jdbc.

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Sonam Sharma (#4)
Re: Replication issue

On 4/17/20 7:47 AM, Sonam Sharma wrote:

Yes, you are right. It's for connection failover from application end. I
have set up db replication using repmgr. Version : 9.5

Can you reach the database crowd at host 172.29.195.216:50001 using psql
or some other client?

On Fri, Apr 17, 2020, 8:15 PM Julien Rouhaud <rjuju123@gmail.com
<mailto:rjuju123@gmail.com>> wrote:

On Fri, Apr 17, 2020 at 4:02 PM Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:

On 4/17/20 6:31 AM, Sonam Sharma wrote:

I have setup db replication. And added below parameter in jdbc

file .

The connection is failing and it's throwing error like db

doesn't exist

on secondary server.

jdbc:postgresql://<primaryhost>:50001,172.29.195.216:50001/crowd?targetServerType=master&reWriteBatchedInserts=true
<http://172.29.195.216:50001/crowd?targetServerType=master&amp;reWriteBatchedInserts=true&gt;

<http://172.29.195.216:50001/crowd?targetServerType=master&amp;reWriteBatchedInserts=true&gt;

.PSQLException: FATAL: database ",172.29.195.216
<tel:+17229195216>:50001/crowd" does not exist

Can someone help on this issue?

Set up replication using what?

The URL above does not look correct to me. Pretty sure the ','

does not

belong there.

This was probably intended to be the "connection failover" feature
(https://jdbc.postgresql.org/documentation/head/connect.html).  I'm
wondering if the issue is just that the driver is too old to support
that, but I have no idea when this was introduced in jdbc.

--
Adrian Klaver
adrian.klaver@aklaver.com