Re: cannot connect to MS-SQL
Nikhil <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
I have a similar error I am getting from OS X (Unexpected EOF from server, Adaptive Server Connection Failed, etc). Can you also check your WIndows event log for this SQL error: Event Type: Error Event Source: MSSQLSERVER Event Category: (4) Event ID: 17832 Date: 9/25/2009 Time: 11:29:16 AM User: N/A Computer: AC-501 Description: The login packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. However, I can connect with tsql no problem, my issue starts when I initiate a connection from a PHP web page. On Wed, Oct 7, 2009 at 7:51 PM, Dave Malhotra <[email protected]>wrote: > Trying to connect to an MS SQL server from a redhat enterprise 4 server. > Get > the below error. Connects, but then the login fails. Please help! > > [root@hostfx26 bin]# ./tsql -C > Compile-time settings (established with the "configure" script) > Version: freetds v0.83.dev.20091004 > freetds.conf directory: /home/nw99gmt/freetds/etc > MS db-lib source compatibility: no > Sybase binary compatibility: no > Thread safety: yes > iconv library: yes > TDS version: 5.0 > iODBC: no > unixodbc: yes > [root@host26fx bin]# ./tsql -H mssql01 -p 3205 -U patroldb -P read -D pdw > locale is "en_US.UTF-8" > locale charset is "UTF-8" > Msg 20012, Level 2, State -1, Server OpenClient, Line -1 > Server name not found in configuration files. > Default database being set to pdw > 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@hostfx26 bin]# cat /tmp/freetds.log > 23:48:13.720557 8166 (log.c:196):Starting log file for FreeTDS > 0.83.dev.20091004 > on 2009-10-07 23:48:13 with debug flags 0xffff. > 23:48:13.720867 8166 (iconv.c:336):tds_iconv_open(0x53c310, UTF-8) > 23:48:13.721015 8166 (iconv.c:197):local name for ISO-8859-1 is ISO-8859-1 > 23:48:13.721029 8166 (iconv.c:197):local name for UTF-8 is UTF-8 > 23:48:13.721039 8166 (iconv.c:197):local name for UCS-2LE is UCS-2LE > 23:48:13.721048 8166 (iconv.c:197):local name for UCS-2BE is UCS-2BE > 23:48:13.721058 8166 (iconv.c:364):setting up conversions for client > charset > "UTF-8" > 23:48:13.721067 8166 (iconv.c:366):preparing iconv for "UTF-8" <-> > "UCS-2LE" > conversion > 23:48:13.721096 8166 (iconv.c:407):preparing iconv for "ISO-8859-1" <-> > "ISO-8859-1" conversion > 23:48:13.721110 8166 (iconv.c:410):tds_iconv_open: done > 23:48:13.721121 8166 (net.c:221):Connecting to 3.32.198.15 port 3205 (TDS > version 5.0) > 23:48:13.721295 8166 (net.c:277):tds_open_socket: connect(2) returned > "Operation now in progress" > 23:48:13.736225 8166 (net.c:317):tds_open_socket() succeeded > 23:48:13.736250 8166 (util.c:162):Changed query state from DEAD to IDLE > 23:48:13.736269 8166 (net.c:786):Sending packet > 0000 02 00 02 00 00 00 00 00-67 69 73 6f 70 73 32 36 |........ hostfx26| > 0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| > 0020 00 00 00 00 00 00 08 70-61 74 72 6f 6c 64 62 00 |.......p atroldb.| > 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| > 0040 00 00 00 00 00 08 72 65-61 64 00 00 00 00 00 00 |......re ad......| > 0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| > 0060 00 00 00 00 04 38 31 36-36 00 00 00 00 00 00 00 |.....816 6.......| > 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 53 59 42 41 53-45 00 00 00 00 00 00 00 |...SYBAS E.......| > 00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| > 00d0 00 06 00 04 72 65 61 64-00 00 00 00 00 00 00 00 |....read ........| > 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 06 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...... ........| > > 23:48:13.736457 8166 (net.c:786):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 - |.| > > 23:48:13.736510 8166 (token.c:314):tds_process_login_tokens() > 23:48:13.752617 8166 (util.c:336):tdserror(0x53b140, 0x53c310, 20017, 115) > 23:48:13.752993 8166 (util.c:366):tdserror: client library returned > TDS_INT_CANCEL(2) > 23:48:13.753008 8166 (util.c:395):tdserror: returning TDS_INT_CANCEL(2) > 23:48:13.753033 8166 (util.c:162):Changed query state from IDLE to DEAD > 23:48:13.753048 8166 (token.c:318):looking for login token, got 0() > 23:48:13.753061 8166 (token.c:110):tds_process_default_tokens() marker is > 0() > 23:48:13.753084 8166 (token.c:113):leaving tds_process_default_tokens() > connection dead > 23:48:13.753095 8166 (login.c:470):login packet accepted > 23:48:13.753105 8166 (util.c:336):tdserror(0x53b140, 0x53c310, 20002, 0) > 23:48:13.753144 8166 (util.c:366):tdserror: client library returned > TDS_INT_CANCEL(2) > 23:48:13.753156 8166 (util.c:395):tdserror: returning TDS_INT_CANCEL(2) > 23:48:13.753166 8166 (mem.c:603):tds_free_all_results() > [root@hostfx26 bin]# > _______________________________________________ > FreeTDS mailing list > [email protected] > http://lists.ibiblio.org/mailman/listinfo/freetds >