cancel
Showing results for 
Search instead for 
Did you mean: 

Error java edb driver and pgbouncer calling a procedure inside a package

SOLVED
Gold Adventurer

Error java edb driver and pgbouncer calling a procedure inside a package

I call a procedure inside a package using driver edb-jdbc17.jar and:

 

if i call this procedure directly to PostgreSQL EDB 

  call  INF_CARACTERIZACION.pkg_auditoria.p_ins_bitacora(...) 

execute  OK and return data in out parameter

 

if i call this procedure through pgbouncer 

 

  call  INF_CARACTERIZACION.pkg_auditoria.p_ins_bitacora(...) 

return: com.edb.util.PSQLException: ERROR: unknown pkt

ERROR: unknown pkt
An I/O error occurred while sending to the backend.
java.io.EOFException:

 

 

-postgres EDB 9.6.2.7

-pgbouncer server 1.7.2

pgbouncer logs

 

 

2017-12-14 00:14:29.855 19974 NOISE resync: done=0, parse=0, recv=0
2017-12-14 00:14:29.855 19974 NOISE C-0xae77c0: scj_data_oficial/usuario_sioc@192.168.24.22:54187 pkt='O' len=186
2017-12-14 00:14:29.855 19974 ERROR C-0xae77c0: scj_data_oficial/usuario_sioc@192.168.24.22:54187 unknown pkt from client: 79/0x4f
2017-12-14 00:14:29.855 19974 LOG C-0xae77c0: scj_data_oficial/usuario_sioc@192.168.24.22:54187 closing because: unknown pkt (age=115)
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 release_server: new state=13
2017-12-14 00:14:29.855 19974 DEBUG S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 Resetting: DISCARD ALL
2017-12-14 00:14:29.855 19974 WARNING C-0xae77c0: scj_data_oficial/usuario_sioc@192.168.24.22:54187 Pooler Error: unknown pkt
2017-12-14 00:14:29.855 19974 NOISE resync: done=0, parse=0, recv=0
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: pkt 'S', len=21
2017-12-14 00:14:29.855 19974 DEBUG S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: param: is_superuser = on
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: pkt 'S', len=40
2017-12-14 00:14:29.855 19974 DEBUG S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: param: session_authorization = usuario_sioc
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: pkt 'S', len=34
2017-12-14 00:14:29.855 19974 DEBUG S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: param: DateStyle = Redwood, SHOW_TIME
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: pkt 'S', len=24
2017-12-14 00:14:29.855 19974 DEBUG S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: param: TimeZone = Etc/GMT+4
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: pkt 'C', len=17
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 S: pkt 'Z', len=6
2017-12-14 00:14:29.855 19974 NOISE resync: done=142, parse=142, recv=142
2017-12-14 00:14:29.855 19974 NOISE S-0xaeca90: scj_data_oficial/usuario_sioc@172.16.10.52:5444 release_server: new state=10

 

 

 

any idea?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Error java edb driver and pgbouncer calling a procedure inside a package

Hi,

Hope you are doing good !
The issue that you are facing is known issue in pgbouncer as pgbouncer does not support CALL statements with EPAS.

 

As a workaround to this, you can use a Statement instead of a CallableStatement, and then use query sql="CALL procedure" in the Statement.execute(sql) method.
Please let us know if you have anymore queries in this regards.

2 REPLIES 2
Highlighted
Moderator

Re: Error java edb driver and pgbouncer calling a procedure inside a package

Hi,

Hope you are doing good !
The issue that you are facing is known issue in pgbouncer as pgbouncer does not support CALL statements with EPAS.

 

As a workaround to this, you can use a Statement instead of a CallableStatement, and then use query sql="CALL procedure" in the Statement.execute(sql) method.
Please let us know if you have anymore queries in this regards.

Gold Adventurer

Re: Error java edb driver and pgbouncer calling a procedure inside a package

Thanks, i will try your solutions!!!

Regards

Smiley Happy