Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS, unixODBC, SUSE Linux -- help!

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] FreeTDS, unixODBC, SUSE Linux -- help!
  • Date: Wed, 10 Oct 2012 17:28:14 +0100

2012/10/10 Todd Brush <brush.todd AT gmail.com>:
> Thank you, it looks like my login packet is accepted, but immediately
> thereafter, the connection drops. Is there anything on the freetds side
> that has to be configured for SSL to allow domain authentication to the
> MSSQL Server ?
>
> (username, target server (host & ip), password, and local machine replaced
> in commands and log results in [BRACKETS])
>
>
> using TDSDUMP I found the following errors:
>
>
>
> $isql -v ServerManager
> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
> [01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
> [01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
> [ISQL]ERROR: Could not SQLConnect
>
> $less /tmp/freetds.log
> log.c:196:Starting log file for FreeTDS 0.91
> on 2012-10-10 11:50:21 with debug flags 0x4fff.
> iconv.c:330:tds_iconv_open(0x628320, UTF-8)
> iconv.c:187:local name for ISO-8859-1 is ISO-8859-1
> iconv.c:187:local name for UTF-8 is UTF-8
> iconv.c:187:local name for UCS-2LE is UCS-2LE
> iconv.c:187:local name for UCS-2BE is UCS-2BE
> iconv.c:349:setting up conversions for client charset "UTF-8"
> iconv.c:351:preparing iconv for "UTF-8" <-> "UCS-2LE" conversion
> iconv.c:391:preparing iconv for "ISO-8859-1" <-> "ISO-8859-1" conversion
> iconv.c:394:tds_iconv_open: done
> net.c:205:Connecting to [IPADDRESS] port 1433 (TDS version 5.0)

5.0 means only Sybase

> net.c:270:tds_open_socket: connect(2) returned "Operation now in progress"
> net.c:310:tds_open_socket() succeeded
> util.c:156:Changed query state from DEAD to IDLE
> net.c:741:Sending packet
> 0000 02 00 02 00 00 00 00 00-** ** ** ** ** ** ** ** ** ** |........
> [LOCALMACHINE]|
> 0010 63 74 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0020 00 00 00 00 00 00 0a 00-00 00 00 00 00 00 00 00 |........ ........|
> 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0060 00 00 00 00 00 32 39 34-34 00 00 00 00 00 00 00 |.....294 4.......|
> 0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0080 00 00 00 04 03 01 06 0a-09 01 00 00 00 00 00 00 |........ ........|
> 0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00b0 00 00 00 ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
> |...[MSSQLSERVER]|
> 00c0 32 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |....... ........|
> 00d0 00 0e 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01d0 00 02 05 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01e0 00 05 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
> 01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|
>
> net.c:741:Sending packet
> 0000 02 01 00 61 00 00 00 00-00 00 00 00 00 00 0a 00 |...a.... ........|
> 0010 00 00 00 00 00 00 00 00-00 00 00 00 00 69 73 6f |........ .....iso|
> 0020 5f 31 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |_1...... ........|
> 0030 00 00 00 00 00 00 00 00-00 00 00 05 01 35 31 32 |........ .....512|
> 0040 00 00 00 03 00 00 00 00-e2 16 00 01 09 00 08 0e |........ ........|
> 0050 6d 7f ff ff ff fe 02 09-00 00 00 00 02 68 00 00 |m....... .....h..|
> 0060 00 - |.|
>
> token.c:328:tds_process_login_tokens()
> util.c:331:tdserror(0x625440, 0x628320, 20017, 115)
> odbc.c:2270:msgno 20017 20003
> 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(0x625440, 0x628320, 20002, 0)
> odbc.c:2270:msgno 20002 20003
> 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()
> error.c:412:odbc_errs_add: "Unable to connect to data source"
> error.c:585:SQLError((nil), 0x6270e0, (nil), 0x7fffe70138e0,
> 0x7fffe70138f4, 0x7fffe70133c0, 513, 0x7fffe70138fe)
> error.c:517:SQLGetDiagRec(2, 0x6270e0, 1, 0x7fffe70138e0, 0x7fffe70138f4,
> 0x7fffe70133c0, 513, 0x7fffe70138fe)
> error.c:566:SQLGetDiagRec: "[FreeTDS][SQL Server]Unexpected EOF from the
> server"
> error.c:585:SQLError((nil), 0x6270e0, (nil), 0x7fffe70138e0,
> 0x7fffe70138f4, 0x7fffe70133c0, 513, 0x7fffe70138fe)
> error.c:517:SQLGetDiagRec(2, 0x6270e0, 1, 0x7fffe70138e0, 0x7fffe70138f4,
> 0x7fffe70133c0, 513, 0x7fffe70138fe)
> error.c:566:SQLGetDiagRec: "[FreeTDS][SQL Server]Adaptive Server connection
> failed"
> error.c:585:SQLError((nil), 0x6270e0, (nil), 0x7fffe70138e0,
> 0x7fffe70138f4, 0x7fffe70133c0, 513, 0x7fffe70138fe)
> error.c:517:SQLGetDiagRec(2, 0x6270e0, 1, 0x7fffe70138e0, 0x7fffe70138f4,
> 0x7fffe70133c0, 513, 0x7fffe70138fe)
> error.c:566:SQLGetDiagRec: "[FreeTDS][SQL Server]Unable to connect to data
> source"
> error.c:585:SQLError((nil), 0x6270e0, (nil), 0x7fffe70138e0,
> 0x7fffe70138f4, 0x7fffe70133c0, 513, 0x7fffe70138fe)
> error.c:517:SQLGetDiagRec(2, 0x6270e0, 1, 0x7fffe70138e0, 0x7fffe70138f4,
> 0x7fffe70133c0, 513, 0x7fffe70138fe)
> odbc.c:4040:SQLFreeConnect(0x6270e0)
> odbc.c:4006:_SQLFreeConnect(0x6270e0)
> odbc.c:4063:SQLFreeEnv(0x624080)
> odbc.c:4050:_SQLFreeEnv(0x624080)
>
>
> $TDSERVER=7.2 ./tsql -H [MSSQLSERVER] -p 1433 -U [USERID]

It's TDSVER, not TDSERVER.

> Password:
> 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
> OS error 115, "Operation now in progress"
> Error 20002 (severity 9):
> Adaptive Server connection failed
> There was a problem connecting to the server
>
>
> $less /tmp/freetds.log
> log.c:196:Starting log file for FreeTDS 0.91
> on 2012-10-10 11:53:13 with debug flags 0x4fff.
> iconv.c:330:tds_iconv_open(0x644350, UTF-8)
> iconv.c:187:local name for ISO-8859-1 is ISO-8859-1
> iconv.c:187:local name for UTF-8 is UTF-8
> iconv.c:187:local name for UCS-2LE is UCS-2LE
> iconv.c:187:local name for UCS-2BE is UCS-2BE
> iconv.c:349:setting up conversions for client charset "UTF-8"
> iconv.c:351:preparing iconv for "UTF-8" <-> "UCS-2LE" conversion
> iconv.c:391:preparing iconv for "ISO-8859-1" <-> "ISO-8859-1" conversion
> iconv.c:394:tds_iconv_open: done
> net.c:205:Connecting to 10.1.2.137 port 1433 (TDS version 5.0)

Still 5.0 (for the typo above I think).

> net.c:270:tds_open_socket: connect(2) returned "Operation now in progress"
> net.c:310:tds_open_socket() succeeded
> util.c:156:Changed query state from DEAD to IDLE
> net.c:741:Sending packet
> 0000 02 00 02 00 00 00 00 00-** ** ** ** ** ** ** ** ** ** |........
> [LOCALMACHINE]|
> 0010 63 74 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |...... ........|
> 0020 00 00 00 00 00 00 0a ** ** ** ** ** ** ** ** ** ** ** *
> |.......[USERID]...|
> 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0040 00 00 00 00 00 ** ** ** ** ** ** ** ** ** ** ** ** ** **
> |......********...|
> 0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0060 00 00 00 00 07 33 30 35-32 00 00 00 00 00 00 00 |.....305 2.......|
> 0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0080 00 00 00 04 03 01 06 0a-09 01 00 00 00 00 00 00 |........ ........|
> 0090 00 00 00 00 54 53 51 4c-00 00 00 00 00 00 00 00 |....TSQL ........|
> 00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00b0 00 00 04 ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
> |...[MSSQLSERVER]|
> 00c0 32 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |....... ........|
> 00d0 00 0e 00 ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
> |....*******.....|
> 00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
> 01d0 00 09 05 00 00 00 54 44-53 2d 4c 69 62 72 61 72 |......TD S-Librar|
> 01e0 0a 05 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
> 01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|
>
> net.c:741:Sending packet
> 0000 02 01 00 61 00 00 00 00-00 00 00 00 00 00 0a 00 |...a.... ........|
> 0010 00 00 00 00 00 00 00 00-00 00 00 00 00 69 73 6f |........ .....iso|
> 0020 5f 31 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |_1...... ........|
> 0030 00 00 00 00 00 00 00 00-00 00 00 05 01 35 31 32 |........ .....512|
> 0040 00 00 00 03 00 00 00 00-e2 16 00 01 09 00 08 0e |........ ........|
> 0050 6d 7f ff ff ff fe 02 09-00 00 00 00 02 68 00 00 |m....... .....h..|
> 0060 00 - |.|
>
> token.c:328:tds_process_login_tokens()
> util.c:331:tdserror(0x643c00, 0x644350, 20017, 115)
> 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(0x643c00, 0x644350, 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()
>
>
>
>

Frediano

>
>
> On Wed, Oct 10, 2012 at 8:45 AM, Randy Syring <rsyring AT gmail.com> wrote:
>
>> Todd,
>>
>> I have found TDSDUMP and TDSDUMPCONFIG to be invaluable when
>> troubleshooting connection issues:
>>
>> http://www.freetds.org/userguide/logging.htm
>>
>> ---------------------------------------------
>> Randy Syring
>> Development & Executive DirectorLevel 12 Technologies
>> <https://www.lev12.com/>
>> Direct: 502-276-0459
>> Office: 502-212-9913
>>
>> Principled People, Technology that Works
>>
>> On 10/09/2012 06:11 PM, Todd Brush wrote:
>>
>> Unfortunately I see limited troubleshooting documentation related to my
>> specific problem within the document you referenced. When I check externals
>> sources, I find conflicting information, and references to various config
>> files that reference each other. I do not understand why this is so
>> convoluted!
>>
>> In testing, tsql works sometimes, and osql does not, then I change a
>> configuration and test again, and not tsql does not work at ALL, and osql
>> output is further along, but still not successful. Frustration.
>>
>>
>> Please tell me what log files or config files I can send to shed light on
>> where I am obviously going wrong. I am trying to connect from a SUSE Linux
>> vm to MS SQL 2005 [Microsoft SQL Server 2005 - 9.00.4060.00 (X64) Mar 17
>> 2011 13:06:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise
>> Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2]
>>
>> Again, using the (now expired) Easysoft driver, I was able to set this up
>> in minutes and use their isql tool to run queries from a bash shell, from
>> the exact same vm to the exact same sql server. The problem must lie within
>> my freeTDS and or unixODBC configuration. It's not a network/protocol or
>> credentials/permissions issue.
>>
>>
>>
>> On Sat, Oct 6, 2012 at 2:04 PM, James K. Lowden <jklowden AT freetds.org>
>> <jklowden AT freetds.org>wrote:
>>
>>
>> On Fri, 5 Oct 2012 16:18:17 -0400
>> Todd Brush <brush.todd AT gmail.com> <brush.todd AT gmail.com> wrote:
>>
>>
>> #cat /usr/local/etc/odbc.ini
>> [NICKNAME]
>> Driver=FreeTDS
>> Description=mssql driver
>> Server=hostname.dnssuffix.com
>> Port=1433
>> User=domain\username
>> Password=password
>> Database=DBNAME
>>
>> http://www.freetds.org/userguide/odbcconnattr.htm
>>
>> Please read that document again. Some of what is in your odbc.ini is
>> not read by the driver; extra entries are silently ignored.
>>
>> Remember that specifying "Server" (not "Servername) in odbc.ini lets
>> the driver connect without reference to freetds.conf. osql will show
>> you that.
>>
>> I suspect what's missing is the TDS version. You don't say how you
>> configured FreeTDS or what kind of server you're connecting to. If you
>> didn't change the defaults and you're connecting to a Microsoft server,
>> it won't work!
>>
>> Two other tools at your disposal: osql and TDSDUMP.
>>
>> HTH.
>>
>> --jkl
>> _______________________________________________
>> FreeTDS mailing
>> listFreeTDS AT lists.ibiblio.orghttp://lists.ibiblio.org/mailman/listinfo/freetds
>>
>> _______________________________________________
>> FreeTDS mailing
>> listFreeTDS AT lists.ibiblio.orghttp://lists.ibiblio.org/mailman/listinfo/freetds
>>
>>
>>
>>
> _______________________________________________
> 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