[freetds] Git master doesn't resolve the host.

arielCo arielco at gmail.com
Thu Jun 20 19:00:56 EDT 2013

To adapt a little fix I made for 0.91, I grabbed the tarball from
http://gitorious.org/freetds/freetds/trees/master and this is what I

$ TDSDUMP=/tmp/ftds.dump ~/freetds/bin/fisql -S prueba -U ariel -P xxxxxxx
* Success: [prueba] defined in /export/home/filtro/freetds/etc/freetds.conf.
* IP address pointer is empty
FreeTDS: db-lib: exiting because client error handler returned
INT_EXIT for msgno 20013

$ cat /tmp/ftds.dump
log.c:194:Starting log file for FreeTDS 0.92.dev.20130620
        on 2013-06-20 17:54:31 with debug flags 0x4fff.
config.c:721:Setting 'dump_file' to '/tmp/ftds.dump' from $TDSDUMP.
iconv.c:332:tds_iconv_open(2c120, ISO8859-1)
iconv.c:189:local name for ISO-8859-1 is ISO-8859-1
iconv.c:189:local name for UTF-8 is UTF-8
iconv.c:189:local name for UCS-2LE is UCS-2LE
iconv.c:189:local name for UCS-2BE is UCS-2BE
iconv.c:351:setting up conversions for client charset "ISO8859-1"
iconv.c:353:preparing iconv for "ISO8859-1" <-> "UCS-2LE" conversion
iconv.c:393:preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion
iconv.c:396:tds_iconv_open: done
util.c:315:tdserror(26b20, 2c120, 20013, 0)
dblib.c:7881:dbperror(2b9b8, 20013, 0)
dblib.c:7934:20013: "Unknown host machine name"
dblib.c:4858:dbdead(2b9b8) [dead]
dblib.c:7955:"Unknown host machine name", client returns 0 (INT_EXIT)
dblib.c:8002:FreeTDS: db-lib: exiting because client error handler
returned INT_EXIT for msgno 20013

                TDSEUHST = 20013,      /* Unknown host machine name. */

I added a couple of fprintf()s to be sure that server info is read
from freetds.conf - apparently the log has not even been created at
this point so many calls to tdsdump_log do nothing.
It doesn't even produce a log if I specify the hostname with -H.

I'm somewhat stumped here (also, the code is convoluted). Of course,
the 0.91 tarball connects fine.

Ariel Cornejo

More information about the FreeTDS mailing list