streaming replication: could not receive data from client: Connection reset by peer

Started by Anson Abrahamover 12 years ago4 messagesgeneral
Jump to latest
#1Anson Abraham
anson.abraham@gmail.com

I'm on Debian Wheezy running postgres 9.3

both boxes are identical.

I see in log file on slaves:
LOG: could not receive data from client: Connection reset by peer

OpenSSL is the same version on master and slaves. The libssl is also too.

I set ssl_renegotiation=0. So not sure why i'm seeing this in the logs on
my slave environments. doing research (aka googling), i see that
everyone says to set ssl_renegotiation=0 but already done that. also
mentions of libssl library / OpenSSL could be different versions, but
that's not the case either.

Any ideas what else I should try doing?

-Anson

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Anson Abraham (#1)
Re: streaming replication: could not receive data from client: Connection reset by peer

Anson Abraham wrote:

I'm on Debian Wheezy running postgres 9.3

both boxes are identical.

I see in log file on slaves:
LOG: could not receive data from client: Connection reset by peer

That looks to me like a client that is connected to the slave
is dying.

Do you have hot standby turned on?

Are there any other messages on master or slave around this time?

Does this message come right away whan you start the slave or only
after a certain time?

OpenSSL is the same version on master and slaves. The libssl is also too.

Do you use SSL for streaming replication?

What connection options does the slave use to connect to the master?

I set ssl_renegotiation=0. So not sure why i'm seeing this in the logs on my slave environments.
doing research (aka googling), i see that everyone says to set ssl_renegotiation=0 but already done
that. also mentions of libssl library / OpenSSL could be different versions, but that's not the case
either.

That would help if you have a renegotiation problem, i.e.
streaming replication has a problem after a time of correct operation.

Yours,
Laurenz Albe

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Anson Abraham
anson.abraham@gmail.com
In reply to: Laurenz Albe (#2)
Re: streaming replication: could not receive data from client: Connection reset by peer

No client connecting to the slave. It's just streamed replication for HA.
This occurs when the slave starts immediately. SSL is used. And as I
mentioned the libraries are identical on both slave and master.
Interestingly, another slave that replicates from master does not have
this issue. The one difference between the two slaves, the slave w/ the
message is a VM. But other master dbs i have w/ slaves (that are VMs) and
have no issues. So it's kind of odd, that this message occurs.

On Mon, Oct 21, 2013 at 6:50 AM, Albe Laurenz <laurenz.albe@wien.gv.at>wrote:

Show quoted text

Anson Abraham wrote:

I'm on Debian Wheezy running postgres 9.3

both boxes are identical.

I see in log file on slaves:
LOG: could not receive data from client: Connection reset by peer

That looks to me like a client that is connected to the slave
is dying.

Do you have hot standby turned on?

Are there any other messages on master or slave around this time?

Does this message come right away whan you start the slave or only
after a certain time?

OpenSSL is the same version on master and slaves. The libssl is also

too.

Do you use SSL for streaming replication?

What connection options does the slave use to connect to the master?

I set ssl_renegotiation=0. So not sure why i'm seeing this in the logs

on my slave environments.

doing research (aka googling), i see that everyone says to set

ssl_renegotiation=0 but already done

that. also mentions of libssl library / OpenSSL could be different

versions, but that's not the case

either.

That would help if you have a renegotiation problem, i.e.
streaming replication has a problem after a time of correct operation.

Yours,
Laurenz Albe

#4Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Anson Abraham (#3)
Re: streaming replication: could not receive data from client: Connection reset by peer

Anson Abraham wrote:

No client connecting to the slave. It's just streamed replication for HA. This occurs when the slave
starts immediately. SSL is used. And as I mentioned the libraries are identical on both slave and
master. Interestingly, another slave that replicates from master does not have this issue. The one
difference between the two slaves, the slave w/ the message is a VM. But other master dbs i have w/
slaves (that are VMs) and have no issues. So it's kind of odd, that this message occurs.

So, right when the slave starts, you get the message in the log, right?

Is there anything else in the log?

Is there anything in the master's log around that time?
Try to set log_connections=on and log_disconnections=on, then you
should at least see when the slave connects.

Could there be a firewall or something that filters or disconnects sessions?

Yours,
Laurenz Albe

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general