pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown
7+ messages / 4 participants
[nested] [flat]
* ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown
@ 2006-01-19 14:46 Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-19 22:06 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
0 siblings, 1 reply; 7+ messages in thread
From: Antonio Rodriguez Anaya @ 2006-01-19 14:46 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I have some problems with jdbc and postgresql 7.3.
I've developed a class java to read form file, to get interesting
information and to store them in database. The class gets connect with
postgrsql by jdbc (pg73jdbc3.jar) without problems. It does some
queries (select, update, insert) but a error happens in the same point.
The error message in the java class is:
ErrorCod: 0
Message: The backend has broken the connection. Possibly the action you
have attempted has caused it to close.
State: null
The query inserts data in the database and gets identificator by
function.
I execute the query by psql and there isn't any problem. I check if the
query has been executed in postgresql by java class, and yes, it has
been executed correctly. But the data isn't got by java class.
There is a error message in postgresql:
FATAL: Socket command type unknown
I don't know what is happened. I've changed the query but the errors go
on. The query is executed in a method of the class and the error
appear after 5 queries are executed correctly in the same method.
I need help because I don't know where is the problem.
Thanks in advanced.
Toni.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: The backend has broken the connection -- AND: FATAL:
2006-01-19 14:46 ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
@ 2006-01-19 22:06 ` Oliver Jowett <oliver@opencloud.com>
2006-01-24 11:11 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
0 siblings, 1 reply; 7+ messages in thread
From: Oliver Jowett @ 2006-01-19 22:06 UTC (permalink / raw)
To: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>; +Cc: pgsql-jdbc
Antonio Rodriguez Anaya wrote:
> The class gets connect with
> postgrsql by jdbc (pg73jdbc3.jar) without problems.
This version of the driver is essentially unmaintained, I suggest you
upgrade to a more recent build (later driver versions should still
operate correctly against a 7.3 server).
-O
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: The backend has broken the connection -- AND: FATAL:
2006-01-19 14:46 ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-19 22:06 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
@ 2006-01-24 11:11 ` Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-24 13:49 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Andres Olarte <olarte.andres@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Antonio Rodriguez Anaya @ 2006-01-24 11:11 UTC (permalink / raw)
To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc
Hi,
Sorry, I don't have time to reply the message.
Thanks for the advice. I've changed the jdbc file for the newest.
However I have errors in the same point but the message has changed.
The java error is:
FATAL: Socket command type unknown
And the error message in postgrsql server is:
FATAL: unsupported frontend protocol
FATAL: Socket command type unknown
I don't know why postgresql does'nt support frontend protocol, and I
don't know how to change that protocol.
Thanks in advanced,
Toni.
El 19/01/2006, a las 23:06, Oliver Jowett escribió:
> Antonio Rodriguez Anaya wrote:
>> The class gets connect with postgrsql by jdbc (pg73jdbc3.jar) without
>> problems.
>
> This version of the driver is essentially unmaintained, I suggest you
> upgrade to a more recent build (later driver versions should still
> operate correctly against a 7.3 server).
>
> -O
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: The backend has broken the connection -- AND: FATAL:
2006-01-19 14:46 ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-19 22:06 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
2006-01-24 11:11 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
@ 2006-01-24 13:49 ` Andres Olarte <olarte.andres@gmail.com>
2006-01-25 00:40 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
0 siblings, 1 reply; 7+ messages in thread
From: Andres Olarte @ 2006-01-24 13:49 UTC (permalink / raw)
To: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>; +Cc: pgsql-jdbc
What backend version are you using? I seems you are using a very old version
of the backend (server) and the driver is trying to comunicate in a newer
protocol. Theres a way to change the protocol, using the connection string,
but I think it will be better to update the server to the newest version.
On 1/24/06, Antonio Rodriguez Anaya <arodriguez@dia.uned.es> wrote:
>
> Hi,
>
> Sorry, I don't have time to reply the message.
>
> Thanks for the advice. I've changed the jdbc file for the newest.
> However I have errors in the same point but the message has changed.
>
> The java error is:
>
> FATAL: Socket command type unknown
>
> And the error message in postgrsql server is:
>
> FATAL: unsupported frontend protocol
> FATAL: Socket command type unknown
>
>
> I don't know why postgresql does'nt support frontend protocol, and I
> don't know how to change that protocol.
>
> Thanks in advanced,
>
> Toni.
>
> El 19/01/2006, a las 23:06, Oliver Jowett escribió:
>
> > Antonio Rodriguez Anaya wrote:
> >> The class gets connect with postgrsql by jdbc (pg73jdbc3.jar) without
> >> problems.
> >
> > This version of the driver is essentially unmaintained, I suggest you
> > upgrade to a more recent build (later driver versions should still
> > operate correctly against a 7.3 server).
> >
> > -O
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: The backend has broken the connection -- AND: FATAL:
2006-01-19 14:46 ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-19 22:06 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
2006-01-24 11:11 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-24 13:49 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Andres Olarte <olarte.andres@gmail.com>
@ 2006-01-25 00:40 ` Oliver Jowett <oliver@opencloud.com>
2006-01-30 18:08 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
0 siblings, 1 reply; 7+ messages in thread
From: Oliver Jowett @ 2006-01-25 00:40 UTC (permalink / raw)
To: Andres Olarte <olarte.andres@gmail.com>; Antonio Rodriguez Anaya <arodriguez@dia.uned.es>; +Cc: pgsql-jdbc
Andres Olarte wrote:
> What backend version are you using? I seems you are using a very old
> version of the backend (server) and the driver is trying to comunicate
> in a newer protocol. Theres a way to change the protocol, using the
> connection string, but I think it will be better to update the server to
> the newest version.
The driver automatically falls back to the older v2 protocol when
necessary. It tries the v3 protocol initially, which is what produces
the "unsupported frontend protocol" error on the server side, and then
falls back to v2 when that fails.
Antonio, can you try to reproduce this with debug logging enabled (add
"?loglevel=2" to the end of your JDBC URL), and send me the resulting
debug output to me off-list?
-O
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: The backend has broken the connection -- AND: FATAL:
2006-01-19 14:46 ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-19 22:06 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
2006-01-24 11:11 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-24 13:49 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Andres Olarte <olarte.andres@gmail.com>
2006-01-25 00:40 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
@ 2006-01-30 18:08 ` Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-30 20:29 ` Re: ERROR: The backend has broken the connection -- AND: Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 7+ messages in thread
From: Antonio Rodriguez Anaya @ 2006-01-30 18:08 UTC (permalink / raw)
To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc; Andres Olarte <olarte.andres@gmail.com>
Hi,
I have followed the recommendations and I have installed in other
computer the newest versión and I have added "?loglevel=2" to the end
on my JDBC URL. The results are:
JDBC: 8.2; Postgresql: 8.2
Java error:
18:36:11.202 (1) simple execute,
handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandl
er@2c3327, maxRows=0, fetchSize=0, flags=17
18:36:11.204 (1) FE=> Parse(stmt=null,query="SELECT
insert_op_hour('[samap-opening-plan-23431-act-23432]', 'opening_hours',
2, 2) AS id",oids={})
18:36:11.207 (1) FE=> Bind(stmt=null,portal=null)
18:36:11.209 (1) FE=> Describe(portal=null)
18:36:11.212 (1) FE=> Execute(portal=null,limit=0)
18:36:11.215 (1) FE=> Sync
18:36:11.241 (1) <=BE ErrorMessage(ERROR: insufficient data left in
message)
org.postgresql.util.PSQLException: ERROR: insufficient data left in
message
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecu
torImpl.java:1514)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImp
l.java:1299)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:
190)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme
nt.java:430)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdb
c2Statement.java:332)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2St
atement.java:231)
at infoplan.GetPlanInfo.SelDB(GetPlanInfo.java:90)
at infoplan.ReadPlanFile.TimeToDB(ReadPlanFile.java:256)
at infoplan.ReadPlanFile.<init>(ReadPlanFile.java:162)
at infoplan.ReadPlanFile.main(ReadPlanFile.java:334)
SQLException: SQLState(08P01)
18:36:11.296 (1) <=BE ReadyForQuery(I)
Error en la ejecucion de: SELECT
insert_op_hour('[samap-opening-plan-23431-act-23432]', 'opening_hours',
2, 2) AS id ErrorCode: 0 Message: ERROR: insufficient data left in
message State: 08P01
Exception in thread "main" java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:259)
at infoplan.ReadPlanFile.TimeToDB(ReadPlanFile.java:257)
at infoplan.ReadPlanFile.<init>(ReadPlanFile.java:162)
at infoplan.ReadPlanFile.main(ReadPlanFile.java:334)
Postgrsql error:
LOG: database system is ready
LOG: transaction ID wrap limit is 2147484146, limited by database
"postgres"
ERROR: insufficient data left in message
LOG: unexpected EOF on client connection
JDBC: 8.2; Postgresql: 7.3
Java error:
18:42:38.110 (1) FE=> Query("SELECT
insert_op_hour('[samap-opening-plan-23431-act-23432]', 'opening_hours',
15, 15) AS id")
18:42:38.175 (1) <=BE PortalName(blank)
18:42:38.176 (1) <=BE RowDescription(1)
18:42:38.177 (1) <=BE DataRow
18:42:38.178 (1) <=BE CommandStatus(SELECT)
18:42:38.178 (1) <=BE ReadyForQuery
Ejecutando: SELECT
insert_op_hour('[samap-opening-plan-23431-act-23432]', 'opening_hours',
15, 15) AS id
558
18:42:38.179 (1) FE=> Query("SELECT insert_timetable
('[samap-timetable-plan-23431-act-23432]', 'timetable') AS id")
18:42:38.179 (1) <=BE ErrorResponse(FATAL: Socket command type
unknown)
org.postgresql.util.PSQLException: FATAL: Socket command type unknown
at
org.postgresql.core.v2.QueryExecutorImpl.receiveErrorMessage(QueryExecut
orImpl.java:542)
at
org.postgresql.core.v2.QueryExecutorImpl.processResults(QueryExecutorImp
l.java:466)
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:
364)
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:
258)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme
nt.java:430)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdb
c2Statement.java:332)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2St
atement.java:231)
at infoplan.GetPlanInfo.SelDB(GetPlanInfo.java:90)
at infoplan.ReadPlanFile.TimeToDB(ReadPlanFile.java:262)
at infoplan.ReadPlanFile.<init>(ReadPlanFile.java:162)
at infoplan.ReadPlanFile.main(ReadPlanFile.java:334)
SQLException: SQLState()
18:42:38.188 (1) FE=> Terminate
18:42:38.188 (1) Discarding IOException on close:
java.net.SocketException: Broken pipe
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:66)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at org.postgresql.core.PGStream.flush(PGStream.java:500)
at
org.postgresql.core.v2.ProtocolConnectionImpl.close(ProtocolConnectionIm
pl.java:130)
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:
368)
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:
258)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme
nt.java:430)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdb
c2Statement.java:332)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2St
atement.java:231)
at infoplan.GetPlanInfo.SelDB(GetPlanInfo.java:90)
at infoplan.ReadPlanFile.TimeToDB(ReadPlanFile.java:262)
at infoplan.ReadPlanFile.<init>(ReadPlanFile.java:162)
at infoplan.ReadPlanFile.main(ReadPlanFile.java:334)
org.postgresql.util.PSQLException: Un error de E/S ha ocurrido mientras
se enviaba al backend.
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:
369)
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:
258)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme
nt.java:430)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdb
c2Statement.java:332)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2St
atement.java:231)
at infoplan.GetPlanInfo.SelDB(GetPlanInfo.java:90)
at infoplan.ReadPlanFile.TimeToDB(ReadPlanFile.java:262)
at infoplan.ReadPlanFile.<init>(ReadPlanFile.java:162)
at infoplan.ReadPlanFile.main(ReadPlanFile.java:334)
SQLException: SQLState(08006)
Error en la ejecucion de: SELECT insert_timetable
('[samap-timetable-plan-23431-act-23432]', 'timetable') AS id
ErrorCode: 0 Message: FATAL: Socket command type unknown State:
Exception in thread "main" java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:259)
at infoplan.ReadPlanFile.TimeToDB(ReadPlanFile.java:264)
at infoplan.ReadPlanFile.<init>(ReadPlanFile.java:162)
at infoplan.ReadPlanFile.main(ReadPlanFile.java:334)
Postgresql error:
LOG: database system is ready
FATAL: unsupported frontend protocol
FATAL: Socket command type unknown
Note: the error happens on versión 7.3 in the following query than on
versión 8.2.
Thanks,
Toni.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: The backend has broken the connection -- AND:
2006-01-19 14:46 ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-19 22:06 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
2006-01-24 11:11 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-24 13:49 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Andres Olarte <olarte.andres@gmail.com>
2006-01-25 00:40 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
2006-01-30 18:08 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
@ 2006-01-30 20:29 ` Kris Jurka <books@ejurka.com>
0 siblings, 0 replies; 7+ messages in thread
From: Kris Jurka @ 2006-01-30 20:29 UTC (permalink / raw)
To: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>; +Cc: Oliver Jowett <oliver@opencloud.com>; pgsql-jdbc; Andres Olarte <olarte.andres@gmail.com>
On Mon, 30 Jan 2006, Antonio Rodriguez Anaya wrote:
> I have followed the recommendations and I have installed in other computer
> the newest versión and I have added "?loglevel=2" to the end on my JDBC URL.
> The results are:
>
> 18:36:11.241 (1) <=BE ErrorMessage(ERROR: insufficient data left in message)
> org.postgresql.util.PSQLException: ERROR: insufficient data left in message
Fascinating. Is this reproducible? Can you send us a test case? If not
we'll probably need to see what the server thinks it is getting. Can you
get tcpdump data from this error?
tcpdump -s 1514 -w file.log
Kris Jurka
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2006-01-30 20:29 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-19 14:46 ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-19 22:06 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
2006-01-24 11:11 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-24 13:49 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Andres Olarte <olarte.andres@gmail.com>
2006-01-25 00:40 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Oliver Jowett <oliver@opencloud.com>
2006-01-30 18:08 ` Re: ERROR: The backend has broken the connection -- AND: FATAL: Antonio Rodriguez Anaya <arodriguez@dia.uned.es>
2006-01-30 20:29 ` Re: ERROR: The backend has broken the connection -- AND: Kris Jurka <books@ejurka.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox