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: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Getting DB error = 20017 - Unexpected EOF from the server
  • Date: Fri, 13 Mar 2009 18:43:57 +0100

Il giorno ven, 13/03/2009 alle 09.18 -0400,
Jeff.Goodwin AT fairchildsemi.com ha scritto:
> We have started testing the FreeTDS client on OpenVMS Itanium V8,3-1H1.
> The Sybase Server is running on SunOS V5.9. We have been able to get the
> connection to work properly, but the connection fails within 24 hours with
> the following:
>
> DB error = 20017, Severity code = 9
> DB error msg Unexpected EOF from the server
> OS error # 36
> OS error msg operation in progress
> 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
>
> I've turned on debugging and the header and end of the log is below. This
> problem is repeatable.
>
> Anyone have any ideas?
>
> Thank you,
> Jeff Goodwin
>

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
probably raised the error) it seems a constants problem. I think it
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

> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]log.c;1:190:Starting log file
> for FreeTDS '0.82'
> on 2009-03-13 07:23:51 with debug flags 0x4fff.
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.REPLACEMENTS]LIBICONV.C;2:78:Using
> trivial iconv
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]iconv.c;1:197:names for
> ISO-8859-1: ISO-8859-1
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]iconv.c;1:197:names for UTF-8:
> UTF-8
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]iconv.c;1:197:names for
> UCS-2LE: UCS-2LE
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]iconv.c;1:197:names for
> UCS-2BE: (null)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]iconv.c;1:363:iconv to convert
> client-side data to the "ISO-8859-1" character set
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]iconv.c;1:516:tds_iconv_info_init:
>
> converting "ISO-8859-1"->"UCS-2LE"
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:210:Connecting to
> 172.21.141.141 port 5002 (TDS version 5.0)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:264:tds_open_socket:
> connect(2) returned "operation in progress"
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:303:tds_open_socket()
> succeeded
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:162:Changed query
> state from DEAD to IDLE
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:779:Sending packet
>
> ....
>
> 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,
> update INFOTAP)
> 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:1205:dbfcmd(BF9AB0,
> %s, ...)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1243:dbcmd(BF9AB0,
> set FROM_LOC_DEPT = 'P3100', STARTS_AREA = '3', WIRE_M>
> 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: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 e8 00 00 00 00-21 db 00 00 00 00 75 70 |...è.... !Û....up|
> 0010 64 61 74 65 20 49 4e 46-4f 54 41 50 20 20 73 65 |date INF OTAP se|
> 0020 74 20 46 52 4f 4d 5f 4c-4f 43 5f 44 45 50 54 20 |t FROM_L OC_DEPT |
> 0030 3d 20 27 50 33 31 30 30-27 2c 20 53 54 41 52 54 |= 'P3100 ', START|
> 0040 53 5f 41 52 45 41 20 3d-20 27 33 27 2c 20 57 49 |S_AREA = '3', WI|
> 0050 52 45 5f 4d 41 54 45 52-49 41 4c 20 3d 20 27 41 |RE_MATER IAL = 'A|
> 0060 55 27 2c 20 57 49 52 45-5f 53 49 5a 45 20 3d 20 |U', WIRE _SIZE = |
> 0070 27 32 2e 30 20 4d 49 4c-27 2c 20 57 49 52 45 5f |'2.0 MIL ', WIRE_|
> 0080 54 59 50 45 5f 31 20 3d-20 27 41 55 27 2c 20 57 |TYPE_1 = 'AU', W|
> 0090 49 52 45 5f 54 59 50 45-5f 32 20 3d 20 27 27 2c |IRE_TYPE _2 = '',|
> 00a0 20 57 49 52 45 5f 53 49-5a 45 5f 31 20 3d 20 27 | WIRE_SI ZE_1 = '|
> 00b0 32 2e 30 20 4d 49 4c 27-2c 20 57 49 52 45 5f 53 |2.0 MIL' , WIRE_S|
> 00c0 49 5a 45 5f 32 20 3d 20-27 27 20 20 77 68 65 72 |IZE_2 = '' wher|
> 00d0 65 20 4c 4f 54 5f 4e 4f-20 3d 20 27 41 30 31 30 |e LOT_NO = 'A010|
> 00e0 32 33 39 31 34 39 27 20- |239149' |
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:4532:dbsqlok(BF9AB0)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:592:Received header
> 0000 04 01 00 11 00 00 00 00- |........|
>
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:671:Received packet
> 0000 fd 10 00 02 00 01 00 00-00 |ý....... .|
>
> 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,
>
> 7ACDFDD0, 7ACDFDD8, 0x6914)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:162:Changed query
> state from PENDING to READING
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]token.c;1:510:processing
> result tokens. marker is fd(DONE)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]token.c;1:2201:tds_process_end:
> more_results = 0
> was_cancelled = 0
> error = 0
> done_count_valid = 1
> 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
> = 1
> 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:1599:dbresults(BF9AB0)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1608:dbresults:
> dbresults_state is 5 (_DB_RES_SUCCEED)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1587:dbresults
> returning 1 (SUCCEED)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:2678:dbcount(BF9AB0)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1243:dbcmd(BF9AB0,
> set rowcount 0)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:1250:dbcmd() bufsz
> = 219
> 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 30 |t rowcou nt 0|
>
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:4532:dbsqlok(BF9AB0)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:592:Received header
> 0000 04 01 00 11 00 00 00 00- |........|
>
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]net.c;1:671:Received packet
> 0000 fd 00 00 02 00 00 00 00-00 |ý....... .|
>
> 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,
>
> 7ACDFDD0, 7ACDFDD8, 0x6914)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]util.c;1:162:Changed query
> state from PENDING to READING
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]token.c;1:510:processing
> result tokens. marker is fd(DONE)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.TDS]token.c;1:2201:tds_process_end:
> more_results = 0
> was_cancelled = 0
> error = 0
> done_count_valid = 0
> 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, 20017, 36)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7782:dbperror(BF9AB0,
>
> 20017, 36)
> SYS$SYSDEVICE:[FREETDS.FREETDS-0_82.SRC.DBLIB]dblib.c;1:7835:20017:
> "Unexpected EOF from the server"
> 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:"Unexpected
> EOF from the server", 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
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page