freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153"
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153"
- Date: Mon, 14 Jan 2013 23:27:25 -0500
On Tue, 15 Jan 2013 12:45:31 +1300
Jochen Daum <jd AT automatem.co.nz> wrote:
> looking for [freshco] in /usr/local/etc/freetds.conf
> found this section:
> [freshco]
> host = 192.168.10.153
> ;host = vm
> port = 1433
> tds version = 7.1
> looking up hostname for ip address 192.168.10.153
> osql: warning: no DNS hostname found for "192.168.10.153"
> Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]
> [-R number] [-m flag] hostname [server]
>
>
> I have also added
> 192.168.10.153 vm
> to /etc/hosts, but it cannot be resolved either
>
> Any idea, why I can't use an IP address here?
You can use an IP address. You found a bug in osql. Thanks for
reporting it. The attached patch corrects it, as will the version of
osql in the next nightly snapshot.
When
$ host 192.168.10.153
returns an error, e.g.,
Host 153.10.168.192.in-addr.arpa. not found: 3(NXDOMAIN)
the string "domain" doesn't occur in the output because the
address has no name. In osql, the logic of looking for the address's
name destroys the contents of the variable HOST. When that (now empty)
variable is passed to host(1) a few lines later, it returns an error
and the script aborts.
> P.S: When there is no space either side of the = on the host line, I
> get "no host line found"
I looked at that, too. All uses of awk(1) to split a line on the '='
sign now permit missing spaces on either side of it. Previously osql
was inconsistently stricter about whitespace.
Many Linux distributions, including e.g. Ubuntu, use mawk, which does
not recognize POSIX character classes,
cf. https://bugs.launchpad.net/ubuntu/+source/mawk/+bug/69724.
For that reason, osql now allows any number of ASCII space characters
(U+0020) but not other whitespace e.g. TAB.
HTH.
--jkl
Attachment:
t
Description: Binary data
-
[freetds] osql: warning: no DNS hostname found for "192.168.10.153",
Jochen Daum, 01/14/2013
-
Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153",
Frediano Ziglio, 01/14/2013
- Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153", Jochen Daum, 01/14/2013
-
Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153",
Tony Esposito, 01/15/2013
- Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153", James K. Lowden, 01/15/2013
-
Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153",
James K. Lowden, 01/14/2013
- Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153", Jochen Daum, 01/15/2013
-
Re: [freetds] osql: warning: no DNS hostname found for "192.168.10.153",
Frediano Ziglio, 01/14/2013
Archive powered by MHonArc 2.6.24.