Skip to Content.
Sympa Menu

freetds - Re: [freetds] Connection error

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Manuel J Contreras Maya <manuel AT agenteel.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Connection error
  • Date: Thu, 07 May 2009 13:28:40 -0500

Hello,

Thanks Roberto, in fact we managed to make the connection. What we changed
was the line

tds version = 4.2 for
tds version = 7.0

in the global section of freetds.conf and it worked (php made the connection as well with mssql_connect()).
Now we would like to start using tsql. Do you now if is something like a
mysql command line?


Cheers,

Manuel




Robert Gonzalez wrote:
Have you checked to see if the LANG environment var is set and is correct? I
think I ran into this once before when compiling the MS SQL extension
against FreeTDS. I think I also had to load that var so that it was readable
by Apache.

On Wed, May 6, 2009 at 5:15 PM, Manuel J Contreras Maya <manuel AT agenteel.com
wrote:

Hello,

I am trying to make a connection between php running on 64 bit fedora and
sql server 2005 running on windows server 2003. I managed to recompile php
with the directive --with-mssql=/usr/local/freetds' and compile freetds
itself. When I try to connect using tsql this happens:

----------------------
[root@latomy bin]# ./tsql -H 192.168.78.178 -U minaxsql -p1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
Password:
Msg 20017, Level 9, State -1, Server OpenClient, Line -1
Unexpected EOF from the server
Msg 20002, Level 9, State -1, Server OpenClient, Line -1
Adaptive Server connection failed
There was a problem connecting to the server
[root@latomy bin]#
---------------------

and the log file says:


-----------------------------
log.c:190:Starting log file for FreeTDS 0.82
on 2009-05-06 19:13:03 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"
net.c:210:Connecting to 192.168.78.178 port 1433 (TDS version 5.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
net.c:779:Sending packet
0000 02 00 02 00 00 00 00 00-6c 61 74 6f 6d 79 00 00 |........ latomy..|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0020 00 00 00 00 00 00 06 6d-69 6e 61 78 73 71 6c 00 |.......m inaxsql.|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 08 6d 31-6e 34 78 53 51 31 00 00 |......m1 n4xSQ1..|
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 08 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 05 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 31 39 32 2e 31-36 38 2e 37 38 2e 31 37 |...192.1 68.78.17|
00c0 38 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |8....... ........|
00d0 00 0e 00 08 6d 31 6e 34-78 53 51 31 00 00 00 00 |....m1n4 xSQ1....|
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 0a 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:779: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:312:tds_process_login_tokens()
util.c:334:tdserror(0x538120, 0x5446e0, 20017, 115)
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(0x538120, 0x5446e0, 20002, 0)
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()
---------------------------------


the msql server log says:

--------------------
Message
The login packet used to open the connection is structurally invalid; the
connection has been closed. Please contact the vendor of the client library.
[CLIENT: 192.168.78.123]
Error: 17832, Severity: 20, State: 15.
--------------------


any help is highly appreciated.



Manuel






_______________________________________________
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