Skip to Content.
Sympa Menu

freetds - Re: [freetds] Getting DB error = 20017 - Unexpected EOF from the server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jeff.Goodwin AT fairchildsemi.com
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Getting DB error = 20017 - Unexpected EOF from the server
  • Date: Sun, 15 Mar 2009 10:59:18 -0400

>>Looking at http://h71000.www7.hp.com/doc/82final/6529/6529pro_030.html
>>and searching for TDSESEOF (you can find it in net.c, tds_goodwrite
>>would be safer to replace "sock_errno == EAGAIN" in net.c (there are 4
>>occurrencies) with "(sock_errno == EAGAIN || sock_errno == EWOULDBLOCK
>>|| sock_errno == EINPROGRESS)". The problem is that in some situations
>>tds_select can return even if data are not pending (or not possible to
>>write) and catching these errors keep looping.
>>
>>Regards,
>> Frediano
>
>Thanks Frediano.
>
>I've made your suggested changes and have rebuilt FreeTDS. I'll report
back on the result.
>
>Thank you,
>Jeff Goodwin

It appears that the change did not have the desired effect:

DB error = 20004, Severity code = 9
DB error msg Read from the server failed
OS error # 54
OS error msg connection reset by peer
DB error = 20047, Severity code = 1
DB error msg DBPROCESS is dead or not enabled
OS error # 0
OS error msg error 0
FreeTDS: db-lib: exiting because client error handler returned 0 for msgno
20047

This error came up after about a day of proper processing. This is in the
same time frame where we had previously received the EINPROGRESS
condition.

Any ideas on how to proceed would be appreciated.

Below is the freetds.log.

Thank you,
Jeff

SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]token.c;1:2217:tds_process_end()
state set to TDS_IDLE
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:162:Changed query
state from READING to IDLE
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]token.c;1:2232: rows_affected
= 0
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:110:logic error:
cannot change query state from IDLE to PENDING
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:4601:dbsqlok() end
status was success
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1243:dbcmd(BF9AB0,
set rowcount 1)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1250:dbcmd() bufsz
= 15
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:5727:dbfreebuf(BF9AB0)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1298:dbsqlexec(BF9AB0)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:6722:dbsqlsend(BF9AB0)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]mem.c;1:563:tds_free_all_results()
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:162:Changed query
state from IDLE to QUERYING
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:162:Changed query
state from QUERYING to PENDING
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:779:Sending packet
0000 0f 01 00 1c 00 00 00 00-21 0f 00 00 00 00 73 65 |........ !.....se|
0010 74 20 72 6f 77 63 6f 75-6e 74 20 31 |t rowcou nt 1|

SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:4532:dbsqlok(BF9AB0)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:334:tdserror(BF9970,
BF9DD0, 20004, 54)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7782:dbperror(BF9AB0,
20004, 54)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7835:20004: "Read
from the server failed"
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:4747:dbdead(BF9AB0)
[alive]
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7856:"Read from
the server failed", client returns 2 (INT_CANCEL)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:368:tdserror: client
library returned TDS_INT_CANCEL(2)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:389:tdserror:
returning TDS_INT_CANCEL(2)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:162:Changed query
state from PENDING to DEAD
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:4565:dbsqlok() not
done, calling tds_process_tokens()
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]token.c;1:495:tds_process_tokens(BF9DD0,

7ACDFB00, 7ACDFB08, 0x6914)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:118:logic error:
cannot change query state from DEAD to READING
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1243:dbcmd(BF9AB0,
update INFOTAP)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7782:dbperror(BF9AB0,
20047, 0)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7835:20047:
"DBPROCESS is dead or not enabled"
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:4747:dbdead(BF9AB0)
[dead]
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7856:"DBPROCESS is
dead or not enabled", client returns 0 (INT_EXIT)
SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7903:FreeTDS:
db-lib: exiting because client error handler returned 0 for msgno 20047




Archive powered by MHonArc 2.6.24.

Top of Page