No subject
Fri May 2 19:13:14 EDT 2003
can say conclusively from #3 that the problem lies in interpreting
freetds.conf or reading the "wrong" one. Which file was used is logged if
TDSDUMPCONFIG is defined (http://www.freetds.org/userguide/x305.htm#AEN369).
Without DNS, though, #3 and #4 work. Why? DNS should *never* be consulted,
because this hostname appears in /etc/hosts, and /etc/hosts.conf says to use
hosts before DNS. Unless, of course, the "wrong" file is being used to
lookup the servername, yielding the wrong hostname, yielding the wrong
address.
BTW, does the line in /etc/hosts have a domain name? It should look like
this:
10.1.2.3 servername.domain.com servername
where ".domain.com" matches what hostname(1) returns (unless they're in
different domains, of course). Some people don't include the domain name in
the hostname; that's a mistake.
You might want to run tsql -S under gdb, set breakpoint at
tds/threadsafe.c:81, which is where gethostbyname(3) is called. Take a look
at the contents of the returned pointer. It will contain the name and
address of the host FreeTDS will connect to. If the name is wrong,
something's up with freetds.conf (or $SYBASE/interfaces). If the ip is
wrong, something's awry in the resolver.
If you're not so enterprising, you might try just setting the ip address in
freetds.conf. That circumvents name resolution, of course, at the cost of
foregoing name resolution. ;)
> Thanks for not blowing me off for being some wanker who
> doesn't know jack about networking.....even though I am :-)
HTH. Your message was clear and polite, and no one knows everything. And I
never learned anything blowing someone off. :)
Regards,
--jkl
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.
More information about the FreeTDS
mailing list