Skip site navigation (1) Skip section navigation (2)

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

From: "Albretch Mueller" <lbrtchx(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend
Date: 2008-05-07 02:16:58
Message-ID: 9ef66fac0805061916y5cf117a1m561235b0e5c1dcbe@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
 Hi,
~
 I am having a problem with PG I don't quite understand. I know the
server is running but I am getting exceptions as it is not. The
exception is thrown exactly after setting the parameters of a
preparedStatement, when I try to execute the query
~
    ResultSet RS = PSt.executeQuery();
~
org.postgresql.util.PSQLException: An I/O error occured while sending
to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:218)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
        at JDBCPrepStSelWhr06.getRx(JDBCPrepStSelWhr06.java:223)
        at JDBCPrepStSelWhr06Test.main(JDBCPrepStSelWhr06Test.java:72)
Caused by: java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:26)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:121)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
        at org.postgresql.core.PGStream.flush(PGStream.java:507)
        at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:676)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
        ... 5 more
~
 I do know PG is running in my box:
~
sh-3.1# telnet localhost 5432
Trying 127.0.0.1...
Connected to Knoppix.
Escape character is '^]'.
~
pgtest(at)Knoppix:~/bin$ ./pgpostmaster.sh
pgtest(at)Knoppix:~/bin$ psql -l
       List of databases
   Name    | Owner  | Encoding
-----------+--------+-----------
 postgres  | pgtest | SQL_ASCII
 template0 | pgtest | SQL_ASCII
 template1 | pgtest | SQL_ASCII
 testdb    | pgtest | SQL_ASCII
(4 rows)

pgtest(at)Knoppix:~/bin$ select current_timestamp;
> ;
bash: syntax error near unexpected token `;'
pgtest(at)Knoppix:~/bin$ psql testdb;
Welcome to psql 8.3.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

testdb=# select current_timestamp;
              now
-------------------------------
 2008-05-06 21:50:52.618359-04
(1 row)

testdb=# select * from testtbl;
 testid |  usr  |  pw  |  usrid  |      ctm      |     laxtm
--------+-------+------+---------+---------------+---------------
      1 | usr00 | pw00 | usrpw00 | 1068457566818 | 1068457579818
      2 | usr02 | pw02 | usrpw02 | 1068455566818 | 1068455566999
      3 | usr04 | pw04 | usrpw04 | 1068447566818 | 1068447566865
(3 rows)

testdb=#
~

Responses

pgsql-jdbc by date

Next:From: Albretch MuellerDate: 2008-05-07 02:33:35
Subject: Re: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend
Previous:From: Stephen FrostDate: 2008-05-06 14:01:20
Subject: JDBC and GSSAPI/Krb5 with uDig

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group