Skip to Content.
Sympa Menu

freetds - Re: [freetds] Unexpected EOF

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Adrian.Nye AT dimensional.com" <Adrian.Nye AT dimensional.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Unexpected EOF
  • Date: Tue, 6 Jan 2015 20:18:42 +0000

Solved: I set LC_ALL=en_US.UTF-8 in my ~/.bash_profile and start a new
terminal, and now it works.

Before the fix, I checked the SQL log and it was showing:

The login packet used to open the connection is structurally invalid


It may be a tsql bug that it prints 'locale is "en_US.UTF-8”' when
apparently it was actually not using UTF-8.

On 1/6/15, 9:32 AM, "Adrian.Nye AT dimensional.com"
<Adrian.Nye AT dimensional.com> wrote:

>
>Hello, I’m a first time poster to this list.
>
>I am having a problem running TDS 0.91 on Mac OSX 10.9 (Mavericks) using
>a homebrew installation, where I can no longer connect to Microsoft SQL.
> The connection was working fine, but some unknown change broke it, and
>I cannot seem to recover.
>
>I did a brew update, then reinstalled unixodbc first, then reinstalled
>freetds with the —with-unixodbc option.
>
>The output of tsql –C is:
>
> Version: freetds v0.91
> freetds.conf directory: /usr/local/Cellar/freetds/0.91_2/etc
> MS db-lib source compatibility: no
> Sybase binary compatibility: no
> Thread safety: yes
> iconv library: yes
> TDS version: 7.1
> iODBC: no
> unixodbc: yes
> SSPI "trusted" logins: no
> Kerberos: no
>
>I am using the following command for testing:
>
>TDSVER=7.1 TDSDUMP=/tmp/freetds.log tsql -H <host> -p 1433 -U <username>
>-P <pw>
>
>I have confirmed using telnet that I can connect to the MSSQL server on
>port 1433.
>
>The TDSVER, host, username, password, and port are all known correct
>because this command line works on another developer’s identical laptop.
>He gets the tsql prompt as expected. What I get is:
>
>locale is "en_US.utf-8"
>locale charset is "utf-8"
>using default charset "utf-8"
>Error 20017 (severity 9):
> Unexpected EOF from the server
>Error 20002 (severity 9):
> Adaptive Server connection failed
>There was a problem connecting to the server
>
>The tail of the connection log shows the following:
>
>net.c:741:Sending packet
>0000 12 01 00 ce 00 00 00 00-16 03 01 00 86 10 00 00 |...##... ........|
>0010 82 00 80 6b 5a c8 0c d1-c0 da 5c 6a 77 93 de 55 |...kZ######\jw.##|
>0020 16 55 5f ec a7 04 09 1c-4a 67 0e 55 71 83 93 f9 |.U_###..
>Jg.Uq..#####030 d5 68 c0 15 9a 12 03 4e-ff 90 a6 dd c0 18 35 dd |####...N
>.###.5##
>0040 34 f9 53 26 2c 44 2a 3a-4c dd 3c 76 b7 1b 89 bd |4#####*: L##v#..#|
>0050 4d 54 03 b6 80 85 57 11-76 c9 2f 47 80 52 02 a5 |MT.#..W. v##G.R.#|
>0060 e5 7a 47 0b cd 73 7d 67-ec 28 12 76 3f f7 ef e4 |###.##}g ###v?####
>0070 d0 ff ad 74 bc ed fe da-e8 cb 85 17 00 fc 23 2a |###t####
>###..######0080 c9 56 d9 1c 4f c8 0f 5c-96 be 09 17 44 bf 7a a1 |####O##\
>.#..D#z#|
>0090 af 37 6d 14 03 01 00 01-01 16 03 01 00 30 64 03 |#7m..... .....0d.|
>00a0 fb bf 62 33 d7 68 b4 63-6c c2 52 51 b3 da 67 06 |#####h#c l##Q###.|
>00b0 f0 c4 a9 5f db e5 87 ee-37 a9 5c bd e0 2a 6e b7 |######.####\#####|
>00c0 0f 2a 94 b6 c1 33 23 3e-7b fb 75 66 57 1f |.*.####> {#####|
>
>net.c:1199:in tds_pull_func
>net.c:1212:have 0
>net.c:1216:before read
>net.c:555:Received header
>0000 12 01 00 43 00 00 00 00- |...C....|
>
>net.c:609:Received packet
>0000 12 01 00 43 00 00 00 00-14 03 01 00 01 01 16 03 |...C.... ........|
>0010 01 00 30 86 93 2b 59 46-af 12 50 b1 cc bb df 86 |..0..+YF #.P#̻##|
>0020 53 83 a2 77 4f 69 da b5-b9 11 34 b0 e4 3a 34 58 |S.#wOiڵ #.4####X|
>0030 5a d8 16 c7 a0 5b 44 56-7c 96 d4 cd 9d 83 b4 57 |Z####[DV |.##..#W|
>0040 a1 a5 a4 - |###|
>
>net.c:1219:after read
>net.c:1212:have 59
>net.c:1223:read 5 bytes
>net.c:1199:in tds_pull_func
>net.c:1212:have 54
>net.c:1223:read 1 bytes
>net.c:1199:in tds_pull_func
>net.c:1212:have 53
>net.c:1223:read 5 bytes
>net.c:1199:in tds_pull_func
>net.c:1212:have 48
>net.c:1223:read 48 bytes
>net.c:1519:handshake succeeded!!
>login.c:782:quietly sending TDS 7+ login packet
>token.c:328:tds_process_login_tokens()
>util.c:331:tdserror(0x7faceb404120, 0x7faceb404230, 20017, 0)
>util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
>util.c:384:tdserror: returning TDS_INT_CANCEL(2)
>util.c:156:Changed query state from IDLE to DEAD
>token.c:337:looking for login token, got 0()
>token.c:122:tds_process_default_tokens() marker is 0()
>token.c:125:leaving tds_process_default_tokens() connection dead
>login.c:466:login packet accepted
>util.c:331:tdserror(0x7faceb404120, 0x7faceb404230, 20002, 0)
>util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
>util.c:384:tdserror: returning TDS_INT_CANCEL(2)
>mem.c:615:tds_free_all_results()
>
>I have tried everything I know to fix this. Can anyone suggest a next
>step?
>
>Thanks
>Adrian
>This message and any attachments (the "Message") may contain
>confidential, proprietary and/or privileged information and are only for
>their intended recipient(s). If you are not the intended recipient, you
>should notify the sender and delete the Message. E-mail transmissions
>cannot be guaranteed to be secure or error-free. This Message is provided
>for information purposes and should not be construed as a solicitation or
>offer to buy or sell any securities or financial instruments, or to
>provide investment advice in any jurisdiction where the sender is not
>properly licensed or permitted to do so. This Message is subject to
>additional conditions and restrictions. Please read them here:
>http://legal.dimensional.com/email/
>_______________________________________________
>FreeTDS mailing list
>FreeTDS AT lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds

This message and any attachments (the "Message") may contain confidential,
proprietary and/or privileged information and are only for their intended
recipient(s). If you are not the intended recipient, you should notify the
sender and delete the Message. E-mail transmissions cannot be guaranteed to
be secure or error-free. This Message is provided for information purposes
and should not be construed as a solicitation or offer to buy or sell any
securities or financial instruments, or to provide investment advice in any
jurisdiction where the sender is not properly licensed or permitted to do so.
This Message is subject to additional conditions and restrictions. Please
read them here: http://legal.dimensional.com/email/


  • [freetds] Unexpected EOF, Adrian.Nye AT dimensional.com, 01/06/2015
    • <Possible follow-up(s)>
    • Re: [freetds] Unexpected EOF, Adrian.Nye AT dimensional.com, 01/06/2015

Archive powered by MHonArc 2.6.24.

Top of Page