Discussion:
[freetds] freetds.log message
Evan Panagiotopoulos
2012-10-17 23:25:53 UTC
Permalink
I keep working on debugging a connection to a ms sql server and I get the
following message in the log file:

net.c:542:Received packet
0000 aa 68 00 18 48 00 00 01-0e 21 00 4c 00 6f 00 67 |.h..H... .!.L.o.g|
0010 00 69 00 6e 00 20 00 66-00 61 00 69 00 6c 00 65 |.i.n. .f .a.i.l.e|
0020 00 64 00 20 00 66 00 6f-00 72 00 20 00 75 00 73 |.d. .f.o .r. .u.s|
0030 00 65 00 72 00 20 00 27-00 6f 00 73 00 64 00 61 |.e.r. .' .o.s.d.a|
0040 00 64 00 6d 00 69 00 6e-00 27 00 2e 00 0d 4b 00 |.d.m.i.n .'....K.|
0050 43 00 53 00 44 00 2d 00-5a 00 4f 00 4e 00 45 00 |C.S.D.-. Z.O.N.E.|
0060 2d 00 49 00 4e 00 54 00-00 01 00 fd 02 00 00 00 |-.I.N.T. ........|
0070 00 00 00 00 - |....|

The above is teling me that the user id failed to connect.
I am trying to understand what the following means, though.

token.c:314:looking for login token, got aa(ERROR)
token.c:105:tds_process_default_tokens() marker is aa(ERROR)
token.c:2439:tds_process_msg() reading message from server
read.c:179:tds_get_string: reading 66 from wire to give 33 to client.
read.c:179:tds_get_string: reading 26 from wire to give 13 to client.
token.c:2501:tds_process_msg() calling client msg handler

We test the user id and password on the ms sql server and we have no
problem connecting but when I try to connect from a freebsd server I
receive the above messages. The php log file says:
mssql_connect(): message: Login failed for user 'osdadmin'. (severity 14)
in /home/epanagio/play/remote_connect.php on line 3
mssql_connect(): Unable to connect to server: kcsd-zone-int in
/home/epanagio/play/remote_connect.php on line 3

I also tried other versions of the php script including the port, without
the port, with the server name, the ip address but none of those got me
connected.

Any suggestions?
--
Evan Panagiotopoulos
James K. Lowden
2012-10-18 05:29:11 UTC
Permalink
On Wed, 17 Oct 2012 19:25:53 -0400
Post by Evan Panagiotopoulos
I keep working on debugging a connection to a ms sql server and I get
net.c:542:Received packet
0000 aa 68 00 18 48 00 00 01-0e 21 00 4c 00 6f 00 67
|.h..H... .!.L.o.g| 0010 00 69 00 6e 00 20 00 66-00 61 00 69 00 6c 00
|65 |.i.n. .f .a.i.l.e|
....
Post by Evan Panagiotopoulos
The above is teling me that the user id failed to connect.
I am trying to understand what the following means, though.
Not to be pedantic, but I think it's helpful to distinguish: the above
is telling you that the client connected to the server. The login
packet was sent to the server, and the server rejected it.
You're connecting; your network settings are OK. You're just not
logging in.
Post by Evan Panagiotopoulos
token.c:314:looking for login token, got aa(ERROR)
token.c:105:tds_process_default_tokens() marker is aa(ERROR)
Instead of a login acknowledgement,
the server returned an ERROR packet, type 0xAA.
Post by Evan Panagiotopoulos
token.c:2439:tds_process_msg() reading message from server
read.c:179:tds_get_string: reading 66 from wire to give 33 to client.
read.c:179:tds_get_string: reading 26 from wire to give 13 to client.
token.c:2501:tds_process_msg() calling client msg handler
The text of the message in the error packet was reduced by 50% because
it arrived as UCS-2 and was converted to a single-byte encoding,
perhaps UTF8 or ISO 8859-1. The message was forwarded to the client
handler, which eventually gave it to PHP, where I believe you saw it.
Post by Evan Panagiotopoulos
Any suggestions?
What kind of authentication is your server set up to accept? If it
doesn't accept a plaintext login, you'll have to link FreeTDS to
Kerberos. I would look in that vicinity.

--jkl

Loading...