Skip to Content.
Sympa Menu

freetds - Re: [freetds] cannot connect with tsql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Agnieszka Figiel <agnieszka AT llp.pl>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] cannot connect with tsql
  • Date: Mon, 11 Oct 2010 12:53:05 +0200

2010/10/4 Agnieszka Figiel <agnieszka AT llp.pl>

>
>
> 2010/10/4 Agnieszka Figiel <agnieszka AT llp.pl>
>
>
>> 2010/9/30 Frediano Ziglio <freddy77 AT gmail.com>
>>
>> 2010/9/30 Agnieszka Figiel <agnieszka AT llp.pl>
>>>
>>> > Hello,
>>> >
>>> > my first time here, so greetings to all!
>>> >
>>> > I found an old thread by Kevin Reed, regarding connecting to mssql
>>> > 2000 with tsql, which seems to describe the exact same problem I'm
>>> > having with mssql 2008:
>>> >
>>> > https://lists.ibiblio.org/sympa/arc/freetds/2009q1/024223.html
>>> >
>>> > Unfortunately, no solution was posted.
>>> >
>>> > I do not have admistrative access to the mssql instance, but I was
>>> > assured the db and firewall were enabled for me to connect from a
>>> > specified ip address, and indeed I can telnet to 1433. An additional
>>> > requirement is that I need to use encryption, which made me believe
>>> > that my connection is failing due to this:
>>> >
>>> > "Encrypted connections to Microsoft SQL Server 2008 using FreeTDS 0.82
>>> > do not work. Avoid them. Patches welcome! "
>>> >
>>> > However, my tsql dump looks exactly the same as the original poster's,
>>> > and in one of the replies James K. Lowden stated that there's no sign
>>> > of encryption problems there. So what else can it be?
>>> >
>>> > I'm using freetds 0.82-4
>>> >
>>> > The relevant portion of freetds.conf:
>>> >
>>> > [rt]
>>> > host = [filtered]
>>> > port = 1433
>>> > tds version = 8.0
>>> > client charset = UTF-8
>>> > encryption = request
>>> >
>>> > The dump:
>>> >
>>> > TDSDUMP=stderr FREETDSCONF=/tmp/freetds.conf tsql -S rt -U [***] -P
>>> > [***] -D [***]
>>> >
>>> > locale is "en_US.UTF-8"
>>> > locale charset is "UTF-8"
>>> > Default database being set to [***]
>>> > log.c:190:Starting log file for FreeTDS 0.82
>>> > on 2010-09-30 05:54:57 with debug flags 0x4fff.
>>> > iconv.c:197:names for ISO-8859-1: ISO-8859-1
>>> > iconv.c:197:names for UTF-8: UTF-8
>>> > iconv.c:197:names for UCS-2LE: UCS-2LE
>>> > iconv.c:197:names for UCS-2BE: UCS-2BE
>>> > iconv.c:363:iconv to convert client-side data to the "UTF-8" character
>>> set
>>> > iconv.c:516:tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
>>> > iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
>>> > net.c:210:Connecting to [***] port 1433 (TDS version 8.0)
>>> > net.c:264:tds_open_socket: connect(2) returned "Operation now in
>>> progress"
>>> > net.c:303:tds_open_socket() succeeded
>>> > util.c:162:Changed query state from DEAD to IDLE
>>> > login.c:735:quietly sending TDS 7+ login packet
>>> > token.c:312:tds_process_login_tokens()
>>> > util.c:334:tdserror(0x9a430a8, 0x9a43a08, 20017, 0)
>>> > Msg 20017, Level 9, State -1, Server OpenClient, Line -1
>>> > Unexpected EOF from the server
>>> > util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
>>> > util.c:389:tdserror: returning TDS_INT_CANCEL(2)
>>> > util.c:162:Changed query state from IDLE to DEAD
>>> > token.c:316:looking for login token, got 0()
>>> > token.c:108:tds_process_default_tokens() marker is 0()
>>> > token.c:111:leaving tds_process_default_tokens() connection dead
>>> > util.c:334:tdserror(0x9a430a8, 0x9a43a08, 20002, 0)
>>> > Msg 20002, Level 9, State -1, Server OpenClient, Line -1
>>> > Adaptive Server connection failed
>>> > util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
>>> > util.c:389:tdserror: returning TDS_INT_CANCEL(2)
>>> > mem.c:563:tds_free_all_results()
>>> > There was a problem connecting to the server
>>> >
>>> >
>>> > Cheers,
>>> > Agnieszka
>>> >
>>>
>>> Apply post-0.82 patches (you can download an updated version at
>>> http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/), compile with
>>> kerberos
>>> enabled (see user guide at http://www.freetds.org/userguide/ or after
>>> unpacking distribution) and enjoy.
>>>
>>> freddy77
>>>
>>>
>> Thank you for your response regarding enabling kerberos. I needed
>> sysadmin's help to proceed with upgrading freetds and he has not been
>> available before today. Unfortunately, we ran into problems installing the
>> patched version on ArchLinux. Any hints on the error below?
>>
>> gssapi.c:60:35: fatal error: gssapi/gssapi_generic.h: No such file or
>> directory
>>
>>
>>
> Hello again,
>
> we've managed to install the patched version (tsql -C returns Version:
> freetds v0.82.1.dev.20100810), with --enable-krb5, but still no luck
> connecting. The error dump is exactly the same as previously. Any further
> thoughts on where to look for the problem?
>
>
>
Hello again,

the answer to our problem was --with-gnutls. Thanks for your help!

--
Agnieszka Figiel




Archive powered by MHonArc 2.6.24.

Top of Page