Skip to Content.
Sympa Menu

freetds - Re: What do these errors mean?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "David MacKenzie" <djm AT web.us.uu.net>
  • To: freetds
  • Subject: Re: What do these errors mean?
  • Date: Thu, 21 Oct 1999 16:2:16


Ok, I've tried a few more things. I compiled sqsh with -DDEBUG, and
added a little diagnostic code to FreeTDS.current, which revealed that
it's not getting the information from the entry in the interfaces file;
the ip_addr and ip_port are both empty strings. So I let it default.
I'm now trying it against a SQL Server 6.5 database, --with-tdsver=4.2.
I don't actually have a logon on this database, unlike the Sybase ones,
so I'm just trying to see how far it will get.

And it appears that connect() is now working. However, it still dies
with the property 26 message. I also switched to EGCS 1.1.1, in case
GCC 2.7.2 was the culprit. Currently trying this on BSD/OS 4.0.1, fully
patched.

Below are the diff I made, the messages from sqsh -l 99999 (I'm not sure
what the debugging levels are, so I picked one that seems high :-), and
the /tmp/freetds.log from the connection.

--- ./src/tds/login.c 1999/09/17 20:06:05 1.1
+++ ./src/tds/login.c 1999/10/21 19:36:27
@@ -104,13 +104,23 @@
memcpy(tds->capabilities,login->capabilities,TDS_MAX_CAPABILITY);
if (!login->port) {
get_server_info(login->server_name, ip_addr, ip_port);
+ if (!*ip_addr) {
+ fprintf(stderr, "tds_connect: cannot get IP address
for server %s\n", login->server_name);
+ return NULL;
+ }
+ if (!*ip_port) {
+ fprintf(stderr, "tds_connect: cannot get port for
server %s\n", login->server_name);
+ return NULL;
+ }
sin.sin_addr.s_addr = inet_addr(ip_addr);
sin.sin_family = AF_INET;
sin.sin_port = htons(atoi(ip_port));
+ fprintf(stderr, "connect: server_name=%s, ip_addr=%s,
ip_port=%s\n", login->server_name, ip_addr, ip_port);
} else {
sin.sin_addr.s_addr = inet_addr(login->server_name);
sin.sin_family = AF_INET;
sin.sin_port = htons(login->port);
+ fprintf(stderr, "connect: server_name=%s, port=%d\n",
login->server_name, login->port);
}

if ((tds->s = socket (AF_INET, SOCK_STREAM, 0)) < 0) {

djm@genghis 154 $ ./sqsh -P 'foo' -U bar -S farms.wcom.net -l 99999
dsp_prop: dsp_prop(DSP_SET, DSP_WIDTH, 127)
var_set_width: Width now set to 127
sqsh_main: Screen width = 127
env_nget: Hit on banner.
sqsh-1.7 (DEBUG) Copyright (C) 1995-1999 Scott C. Gray
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
env_nget: Hit on username.
env_nget: Hit on history.
env_nget: Hit on keyword_file.
jobset_get_cmd: Testing '\loop'
env_nget: Miss on script, checking environment.
env_nget: Miss on script, checking environment.
fop_push(FOP_SAVE): Adding save-point
env_nget: Hit on interactive.
jobset_get_cmd: Testing '\connect'
fop_push(FOP_SAVE): Adding save-point
env_tran: Establishing save-point
env_nget: Hit on username.
env_nget: Hit on DSQUERY.
env_nget: Hit on interfaces.
env_nget: Hit on width.
dsp_prop: dsp_prop(DSP_GET, DSP_WIDTH) = 127
env_nget: Hit on colsep.
dsp_prop: dsp_prop(DSP_GET, DSP_COLSEP) =
env_nget: Hit on packet_size.
env_nget: Miss on autouse, checking environment.
env_nget: Hit on database.
env_nget: Hit on charset.
env_nget: Hit on language.
env_nget: Hit on encryption.
env_nget: Hit on hostname.
env_nget: Hit on session.
connect: server_name=farms.wcom.net, ip_addr=208.226.12.14, ip_port=1433
env_save: Save-point restored
Unknown property 26
fop_pop(FOP_SAVE): Restoring save-point
fop_pop(FOP_SAVE): Restoring save-point
env_nget: Hit on history.
env_nget: Hit on histsave.
env_nget: Hit on interactive.
~/src/usr.local/bin/sqsh
djm@genghis 155 $ cat /tmp/freetds.log
Sending packet @ 1999-10-21 16:00:25
0000 02 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0020 00 00 00 00 00 00 00 62 61 72 00 00 00 00 00 00 |.......bar......|
0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0040 00 00 00 00 00 03 66 6f 6f 00 00 00 00 00 00 00 |......foo.......|
0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0060 00 00 00 00 03 33 37 38 37 36 00 00 00 00 00 00 |.....37876......|
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 02 00 |................|
0090 00 00 00 00 73 71 73 68 00 00 00 00 00 00 00 00 |....sqsh........|
00a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00b0 00 00 04 66 61 72 6d 73 2e 77 63 6f 6d 2e 6e 65 |...farms.wcom.ne|
00c0 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |t...............|
00d0 00 0e 66 6f 6f 00 00 00 00 00 00 00 00 00 00 00 |..foo...........|
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 03 04 02 00 00 43 54 2d 4c 69 62 72 61 72 79 |......CT-Library|
01e0 0a 00 00 00 00 00 0d 11 00 00 00 00 00 00 00 00 |................|
01f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|


Sending packet @ 1999-10-21 16:00:25
0000 02 01 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 |...L............|
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 00 00 00 00 |............|


1999-10-21 16:00:25 inside tds_process_login_tokens()
1999-10-21 16:00:25 inside tds_process_default_tokens() marker is aa
1999-10-21 16:00:25 inside tds_process_default_tokens() marker is fd
1999-10-21 16:00:25 leaving tds_process_login_tokens() returning 0
1999-10-21 16:00:25 leaving ct_connect() returning 0
1999-10-21 16:00:25 inside ct_con_props() action = CS_GET property = 26
1999-10-21 16:00:25 inside ct_con_drop()




Archive powered by MHonArc 2.6.24.

Top of Page