Обсуждение: ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown

Поиск
Список
Период
Сортировка

ERROR: The backend has broken the connection -- AND: FATAL: Socket command type unknown

От
Antonio Rodriguez Anaya
Дата:
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.



Re: ERROR: The backend has broken the connection -- AND: FATAL:

От
Oliver Jowett
Дата:
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

Re: ERROR: The backend has broken the connection -- AND: FATAL:

От
Antonio Rodriguez Anaya
Дата:
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
>


Re: ERROR: The backend has broken the connection -- AND: FATAL:

От
Andres Olarte
Дата:
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

Re: ERROR: The backend has broken the connection -- AND: FATAL:

От
Oliver Jowett
Дата:
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

Re: ERROR: The backend has broken the connection -- AND: FATAL:

От
Antonio Rodriguez Anaya
Дата:
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)

Re: ERROR: The backend has broken the connection -- AND:

От
Kris Jurka
Дата:

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