Thread: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.

Hi all I am getting  an error as following in my client application

org.postgresql.util.PSQLException: An I/O error occured while sending to the
backend.
    at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:283)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
    at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
    at
com.hp.bto.bsmr.common.util.HibernateUtil.getManagementDBSession(HibernateUtil.java:152)
com.hp.bto.bsmr.collection.utils.PostCollectionJobListener.jobWasExecuted(PostCollectionJobListener.java:84)
    at
org.quartz.core.QuartzScheduler.notifyJobListenersWasExecuted(QuartzScheduler.java:1881)
    at
org.quartz.core.JobRunShell.notifyJobListenersComplete(JobRunShell.java:355)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:226)
    at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: java.net.SocketException: Connection reset by peer: socket write
error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at org.postgresql.core.PGStream.flush(PGStream.java:508)
    at
org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:1107)
    at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:256)
    ... 14 more

    I have the following C3P0 settings:

    cpds = new ComboPooledDataSource();
                cpds.setDriverClass(BSMRCommonConstant.POSTGRES_DRIVER);
                cpds.setAcquireIncrement(5);
                cpds.setBreakAfterAcquireFailure(true);
                cpds.setAcquireRetryAttempts(20);
                cpds.setMaxPoolSize(20);
                cpds.setMaxIdleTime(60 * 10);
                cpds.setTestConnectionOnCheckout(true);
                cpds.setAcquireRetryDelay(3000);
                cpds.setIdleConnectionTestPeriod(300);
                cpds.setTestConnectionOnCheckout(true);

    And in my postgres.conf file I havent modified any tcp  parameters. . It is
all 0 ther.

    Please let me know whats going wrong here. I am not able to see any errors
in postgress.log as well




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/org-postgresql-util-PSQLException-An-I-O-error-occured-while-sending-to-the-backend-tp5713647.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

RoopaHC <roopa.chandrasekharaiah@hp.com> wrote:

> An I/O error occured while sending to the backend.

> Caused by: Connection reset by peer: socket write error

> I am not able to see any errors in postgress.log as well

If there is nothing in the log, it is likely to be a network or
firewall problem.

-Kevin

Or as someone pointed out a gentoo specific problem

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Wed, Jun 20, 2012 at 3:25 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> RoopaHC <roopa.chandrasekharaiah@hp.com> wrote:
>
>> An I/O error occured while sending to the backend.
>
>> Caused by: Connection reset by peer: socket write error
>
>> I am not able to see any errors in postgress.log as well
>
> If there is nothing in the log, it is likely to be a network or
> firewall problem.
>
> -Kevin
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc

Re: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.

From
"Chandrasekharaiah, Roopa Hiremath"
Date:
Thanks Dave Cramer and Kevin. I am using windows OS. firewall is on. What setting I should be doing in firewall to
avoidthis? Please reply 

-----Original Message-----
From: davecramer@gmail.com [mailto:davecramer@gmail.com] On Behalf Of Dave Cramer
Sent: Thursday, June 21, 2012 2:07 AM
To: Kevin Grittner
Cc: Chandrasekharaiah, Roopa Hiremath; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.

Or as someone pointed out a gentoo specific problem

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Wed, Jun 20, 2012 at 3:25 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> RoopaHC <roopa.chandrasekharaiah@hp.com> wrote:
>
>> An I/O error occured while sending to the backend.
>
>> Caused by: Connection reset by peer: socket write error
>
>> I am not able to see any errors in postgress.log as well
>
> If there is nothing in the log, it is likely to be a network or
> firewall problem.
>
> -Kevin
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc

Re: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.

From
"Chandrasekharaiah, Roopa Hiremath"
Date:
And also PostgreSQL is installed in the same machine in which I am running my application

-----Original Message-----
From: Chandrasekharaiah, Roopa Hiremath
Sent: Thursday, June 21, 2012 9:32 AM
To: 'Dave Cramer'; Kevin Grittner
Cc: pgsql-jdbc@postgresql.org
Subject: RE: [JDBC] org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.

Thanks Dave Cramer and Kevin. I am using windows OS. firewall is on. What setting I should be doing in firewall to
avoidthis? Please reply 

-----Original Message-----
From: davecramer@gmail.com [mailto:davecramer@gmail.com] On Behalf Of Dave Cramer
Sent: Thursday, June 21, 2012 2:07 AM
To: Kevin Grittner
Cc: Chandrasekharaiah, Roopa Hiremath; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.

Or as someone pointed out a gentoo specific problem

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Wed, Jun 20, 2012 at 3:25 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> RoopaHC <roopa.chandrasekharaiah@hp.com> wrote:
>
>> An I/O error occured while sending to the backend.
>
>> Caused by: Connection reset by peer: socket write error
>
>> I am not able to see any errors in postgress.log as well
>
> If there is nothing in the log, it is likely to be a network or
> firewall problem.
>
> -Kevin
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc

Well .... I'm hopelessly lost on windows, but as a first attempt can
you turn it off and see if the problem goes away ? If it does then I'd
suggest making sure port 5432 is completely open. But again remember I
have no clue how a firewall on windows works.

FWIW, deploying postgresql on windows is not really recommended. Yes
postgresql works on windows but the full potential is not realized .

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Thu, Jun 21, 2012 at 12:18 AM, Chandrasekharaiah, Roopa Hiremath
<roopa.chandrasekharaiah@hp.com> wrote:
> And also PostgreSQL is installed in the same machine in which I am running my application
>
> -----Original Message-----
> From: Chandrasekharaiah, Roopa Hiremath
> Sent: Thursday, June 21, 2012 9:32 AM
> To: 'Dave Cramer'; Kevin Grittner
> Cc: pgsql-jdbc@postgresql.org
> Subject: RE: [JDBC] org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
>
> Thanks Dave Cramer and Kevin. I am using windows OS. firewall is on. What setting I should be doing in firewall to
avoidthis? Please reply 
>
> -----Original Message-----
> From: davecramer@gmail.com [mailto:davecramer@gmail.com] On Behalf Of Dave Cramer
> Sent: Thursday, June 21, 2012 2:07 AM
> To: Kevin Grittner
> Cc: Chandrasekharaiah, Roopa Hiremath; pgsql-jdbc@postgresql.org
> Subject: Re: [JDBC] org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
>
> Or as someone pointed out a gentoo specific problem
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca
>
>
> On Wed, Jun 20, 2012 at 3:25 PM, Kevin Grittner
> <Kevin.Grittner@wicourts.gov> wrote:
>> RoopaHC <roopa.chandrasekharaiah@hp.com> wrote:
>>
>>> An I/O error occured while sending to the backend.
>>
>>> Caused by: Connection reset by peer: socket write error
>>
>>> I am not able to see any errors in postgress.log as well
>>
>> If there is nothing in the log, it is likely to be a network or
>> firewall problem.
>>
>> -Kevin
>>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc