FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-07-2011, 01:50 PM
Camaleón
 
Default cannot resolve hostname

On Sat, 07 May 2011 14:14:39 +0100, AG wrote:

> In what seems to be a string of related issues having to do with
> networking, I now find that not only has my IP address been changed from
> 192.168.1.40 to 192.168.1.64 but also that my machine's name (valhalla)
> cannot be resolved.
>
> This is the output of ifconfig:
> $ sudo ifconfig
> sudo: unable to resolve host valhalla

(...)

:-)

First, resolve your network layout by either using a dynamic setup (your
IP address could change on every reboot) or by using a static
configuration.

http://wiki.debian.org/NetworkConfiguration

Then, review your "/etc/hosts" file.

Do you see the same error if you run "/sbin/ifconfig", that is, using not
"sudo" at all?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.05.07.13.50.49@gmail.com">http://lists.debian.org/pan.2011.05.07.13.50.49@gmail.com
 
Old 05-07-2011, 02:15 PM
AG
 
Default cannot resolve hostname

On 07/05/11 14:50, Camaleón wrote:

On Sat, 07 May 2011 14:14:39 +0100, AG wrote:


In what seems to be a string of related issues having to do with
networking, I now find that not only has my IP address been changed from
192.168.1.40 to 192.168.1.64 but also that my machine's name (valhalla)
cannot be resolved.

This is the output of ifconfig:
$ sudo ifconfig
sudo: unable to resolve host valhalla

(...)

:-)

First, resolve your network layout by either using a dynamic setup (your
IP address could change on every reboot) or by using a static
configuration.

http://wiki.debian.org/NetworkConfiguration

Then, review your "/etc/hosts" file.

Do you see the same error if you run "/sbin/ifconfig", that is, using not
"sudo" at all?

Greetings,


Hiya

OK - I want to use a static IP address (easier for a simpleton like me
to configure the printer client machine to see it). The IP address I
have customarily used is 192.168.1.40 and that is what is in my
/etc/hosts file:


127.0.0.1 localhost
192.168.1.40 valhalla.org

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

(I don't know what all the IPv6 references are, but I assume that I can
safely ignore those).


When I run /sbin/ifconfig then I don't get the error message about
unable to resolve hostname, but I do get that my IP address is now
192.168.1.64


Personally I don't care if the IP address is *.40 or *.64, but I do want
it to stay static and I do want to be able to access the Net when I reboot.


So, I have just done the following:

(1) I altered the /etc/hosts IP address to *.64
(2) ensured that the /etc/network/interface file read "static" rather
than dhcp

(3) rebooted

When the machine came back on, I was (yet again) unable to access the
Net and the only way that I was able to do so was to use Brian's fix
#dhclient eth0 which, when checking the /sbin/ifconfig output again
shows that the IP address has been made *.64


The hostname is still unresolvable and it seems that I am destined to
have to use dhcp when I really don't want to do so ... and yet if I
don't I am stuck not being connected. This is rapidly spiralling into a
farce and I am still no further ahead than I was, except that I have a
partial fix to implement everytime I reboot and hope that the client can
find the printer server IP address okay.


Perhaps I am being really thick about all of this, but I am very
confused about why - in all of the times I have used and installed
Debian - this has just started to occur.


I am really grateful of any clear ideas or strategies about how to fix this.

Thanks

AG


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DC553F6.8040003@gmail.com">http://lists.debian.org/4DC553F6.8040003@gmail.com
 
Old 05-07-2011, 02:51 PM
Lisi
 
Default cannot resolve hostname

On Saturday 07 May 2011 14:14:39 AG wrote:
> Hello
>
> In what seems to be a string of related issues having to do with
> networking, I now find that not only has my IP address been changed from
> 192.168.1.40 to 192.168.1.64 but also that my machine's name (valhalla)
> cannot be resolved.
>
>
> (1) How do I fix my IP address so that it remains as I originally
> configured it (i.e. 192.168.1.40) which will make it easier and more
> predictable for the print client to find the server machine?
>
> (2) How do I do so in such a way that I can access the Net once I reboot
> - which I was unable to do and hence - on good advice - changed the
> /etc/network/interfaces so that the stanza changed from iface eth0 inet
> *static* to *dhcp* . This was the only thing that enabled this machine
> to access the Net after a reboot and I am loathe to change this back to
> something that didn't work.

Have you tried leaving your localhost on dhcp and setting a reserved IP in the
router for your localhost's mac address? That might achieve a fixed IP
address, while allowing you to keep your dhcp configuration in
your /etc/network/interfaces.

Lisi


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201105071551.07420.lisi.reisz@gmail.com">http://lists.debian.org/201105071551.07420.lisi.reisz@gmail.com
 
Old 05-07-2011, 03:24 PM
Bob McConnell
 
Default cannot resolve hostname

AG wrote:


(I don't know what all the IPv6 references are, but I assume that I can
safely ignore those).




That is not a safe assumption. If you do not have an IPv6 capable router
and DNS server, many applications will timeout before the IPv6 DNS
request does. You need to disable IPv6 completely. It may actually be
causing your current problem.


Bob McConnell
N2SPP


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DC56429.30102@lightlink.com">http://lists.debian.org/4DC56429.30102@lightlink.com
 
Old 05-07-2011, 03:31 PM
Tom H
 
Default cannot resolve hostname

On Sat, May 7, 2011 at 9:14 AM, AG <computing.account@googlemail.com> wrote:
>
> In what seems to be a string of related issues having to do with networking,
> I now find that not only has my IP address been changed from 192.168.1.40 to
> 192.168.1.64 but also that my machine's name (valhalla) cannot be resolved.
>
> This is the output of ifconfig:
> $ sudo ifconfig
> sudo: unable to resolve host valhalla
> eth0 * * *Link encap:Ethernet *HWaddr 00:90:47:05:a3:07
> * * * * *inet addr:192.168.1.64 *Bcast:192.168.1.255 *Mask:255.255.255.0
> * * * * *inet6 addr: fe80::290:47ff:fe05:a307/64 Scope:Link
> * * * * *UP BROADCAST RUNNING MULTICAST *MTU:1500 *Metric:1
> * * * * *RX packets:47117 errors:0 dropped:0 overruns:0 frame:0
> * * * * *TX packets:46335 errors:0 dropped:0 overruns:0 carrier:0
> * * * * *collisions:0 txqueuelen:1000
> * * * * *RX bytes:38194090 (36.4 MiB) *TX bytes:6237238 (5.9 MiB)
> * * * * *Interrupt:18 Base address:0xec00
>
> lo * * * *Link encap:Local Loopback
> * * * * *inet addr:127.0.0.1 *Mask:255.0.0.0
> * * * * *inet6 addr: ::1/128 Scope:Host
> * * * * *UP LOOPBACK RUNNING *MTU:16436 *Metric:1
> * * * * *RX packets:7309 errors:0 dropped:0 overruns:0 frame:0
> * * * * *TX packets:7309 errors:0 dropped:0 overruns:0 carrier:0
> * * * * *collisions:0 txqueuelen:0
> * * * * *RX bytes:2964856 (2.8 MiB) *TX bytes:2964856 (2.8 MiB)
>
> Any help would be appreciated in sorting this out, specifically:
>
> (1) How do I fix my IP address so that it remains as I originally configured
> it (i.e. 192.168.1.40) which will make it easier and more predictable for
> the print client to find the server machine?
>
> (2) How do I do so in such a way that I can access the Net once I reboot -
> which I was unable to do and hence - on good advice - changed the
> /etc/network/interfaces so that the stanza changed from iface eth0 inet
> *static* to *dhcp* . *This was the only thing that enabled this machine to
> access the Net after a reboot and I am loathe to change this back to
> something that didn't work.
>
> (3) Helping me to understand how/ why all of these changes have taken place?
> *What happened? *I had a perfectly running system - everything worked, and
> then yesterday I rebooted and I find this dog's breakfast of an arrangement.

sudo: What's the output of "cat /etc/hostname" and "cat /etc/hosts"?

static/dhcp: Do you have a dhcp server on which you can set
reservations and other options? If, yes, you can either specify that
the dhcp server hands out a specific address to valhalla or set
valhalla up with a static ip address and specify that the dhcp server
not hand out that address. (If you use a static ip address you also
have to set a default route for it to be able to access the internet.)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTimL5sB0qapd47_RSH2AWnbKjri5EQ@mail.gmail.com ">http://lists.debian.org/BANLkTimL5sB0qapd47_RSH2AWnbKjri5EQ@mail.gmail.com
 
Old 05-07-2011, 03:37 PM
Tom H
 
Default cannot resolve hostname

On Sat, May 7, 2011 at 11:24 AM, Bob McConnell <rmcconne@lightlink.com> wrote:
>>
>> (I don't know what all the IPv6 references are, but I assume that I can
>> safely ignore those).
>
> That is not a safe assumption. If you do not have an IPv6 capable router and
> DNS server, many applications will timeout before the IPv6 DNS request does.
> *You need to disable IPv6 completely. It may actually be causing your
> current problem.

Disabling ipv6 won't prevent ipv6 being made.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTi=6Lp0jmZ172+8ddsQh3yTVVCxCiQ@mail.gmail.com ">http://lists.debian.org/BANLkTi=6Lp0jmZ172+8ddsQh3yTVVCxCiQ@mail.gmail.com
 
Old 05-07-2011, 03:40 PM
AG
 
Default cannot resolve hostname

On 07/05/11 16:31, Tom H wrote:

On Sat, May 7, 2011 at 9:14 AM, AG<computing.account@googlemail.com> wrote:

In what seems to be a string of related issues having to do with networking,
I now find that not only has my IP address been changed from 192.168.1.40 to
192.168.1.64 but also that my machine's name (valhalla) cannot be resolved.

This is the output of ifconfig:
$ sudo ifconfig
sudo: unable to resolve host valhalla
eth0 Link encap:Ethernet HWaddr 00:90:47:05:a3:07
inet addr:192.168.1.64 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::290:47ff:fe05:a307/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47117 errors:0 dropped:0 overruns:0 frame:0
TX packets:46335 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38194090 (36.4 MiB) TX bytes:6237238 (5.9 MiB)
Interrupt:18 Base address:0xec00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7309 errors:0 dropped:0 overruns:0 frame:0
TX packets:7309 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2964856 (2.8 MiB) TX bytes:2964856 (2.8 MiB)

Any help would be appreciated in sorting this out, specifically:

(1) How do I fix my IP address so that it remains as I originally configured
it (i.e. 192.168.1.40) which will make it easier and more predictable for
the print client to find the server machine?

(2) How do I do so in such a way that I can access the Net once I reboot -
which I was unable to do and hence - on good advice - changed the
/etc/network/interfaces so that the stanza changed from iface eth0 inet
*static* to *dhcp* . This was the only thing that enabled this machine to
access the Net after a reboot and I am loathe to change this back to
something that didn't work.

(3) Helping me to understand how/ why all of these changes have taken place?
What happened? I had a perfectly running system - everything worked, and
then yesterday I rebooted and I find this dog's breakfast of an arrangement.

sudo: What's the output of "cat /etc/hostname" and "cat /etc/hosts"?

Tom

$ cat /etc/hostname
valhalla

$ cat /etc/hosts
127.0.0.1 localhost
#192.168.1.64 valhalla.org
192.168.1.40 valhalla.org
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


static/dhcp: Do you have a dhcp server on which you can set
reservations and other options? If, yes, you can either specify that
the dhcp server hands out a specific address to valhalla or set
valhalla up with a static ip address and specify that the dhcp server
not hand out that address. (If you use a static ip address you also
have to set a default route for it to be able to access the internet.)



This is what Lisi suggested, but considering the mess I am currently
wading through with the help of this list, I fear that I will be
waltzing directly into the lion's den with that approach.


Moreover, it doesn't address the whole issue of why/ how this has just
occurred over the last week when I've never had this problem before in
the 5 years I've been running Debian (or several with Slackware, before
that).


AG




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DC5680A.3090502@gmail.com">http://lists.debian.org/4DC5680A.3090502@gmail.com
 
Old 05-07-2011, 04:41 PM
Brian
 
Default cannot resolve hostname

On Sat 07 May 2011 at 15:15:18 +0100, AG wrote:

> OK - I want to use a static IP address (easier for a simpleton like me
> to configure the printer client machine to see it). The IP address I
> have customarily used is 192.168.1.40 and that is what is in my
> /etc/hosts file:
>
> 127.0.0.1 localhost
> 192.168.1.40 valhalla.org

valhalla.org does not have an IP address of 192.168.1.40. This may or
may not be a cause of your problem. Commenting it out would do no harm.
You can fix it later.

Similarily for the dns-servers and dns-search lines in the interfaces
file. Commenting them out loses you nothing. Just ensure/etc/resolv.conf
has an entry for a nameserver.

> When the machine came back on, I was (yet again) unable to access the
> Net and the only way that I was able to do so was to use Brian's fix
> #dhclient eth0 which, when checking the /sbin/ifconfig output again
> shows that the IP address has been made *.64

What I gave you wasn't a fix but a simple way to get you going .
Changing to a static stanza should still have kept you online but it
seems there are other things in your setup preventing that.

Pinging your router and nameserver by IP and www.debian,org would
establish the extent of your connectivity.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110507164128.GW13057@desktop">http://lists.debian.org/20110507164128.GW13057@desktop
 
Old 05-07-2011, 07:47 PM
Tom H
 
Default cannot resolve hostname

On Sat, May 7, 2011 at 11:40 AM, AG <computing.account@googlemail.com> wrote:
> On 07/05/11 16:31, Tom H wrote:
>> On Sat, May 7, 2011 at 9:14 AM, AG<computing.account@googlemail.com>
>> *wrote:
>>>
>>> In what seems to be a string of related issues having to do with
>>> networking,
>>> I now find that not only has my IP address been changed from 192.168.1.40
>>> to
>>> 192.168.1.64 but also that my machine's name (valhalla) cannot be
>>> resolved.
>>>
>>> This is the output of ifconfig:
>>> $ sudo ifconfig
>>> sudo: unable to resolve host valhalla
>>> eth0 * * *Link encap:Ethernet *HWaddr 00:90:47:05:a3:07
>>> * * * * *inet addr:192.168.1.64 *Bcast:192.168.1.255 *Mask:255.255.255.0
>>> * * * * *inet6 addr: fe80::290:47ff:fe05:a307/64 Scope:Link
>>> * * * * *UP BROADCAST RUNNING MULTICAST *MTU:1500 *Metric:1
>>> * * * * *RX packets:47117 errors:0 dropped:0 overruns:0 frame:0
>>> * * * * *TX packets:46335 errors:0 dropped:0 overruns:0 carrier:0
>>> * * * * *collisions:0 txqueuelen:1000
>>> * * * * *RX bytes:38194090 (36.4 MiB) *TX bytes:6237238 (5.9 MiB)
>>> * * * * *Interrupt:18 Base address:0xec00
>>>
>>> lo * * * *Link encap:Local Loopback
>>> * * * * *inet addr:127.0.0.1 *Mask:255.0.0.0
>>> * * * * *inet6 addr: ::1/128 Scope:Host
>>> * * * * *UP LOOPBACK RUNNING *MTU:16436 *Metric:1
>>> * * * * *RX packets:7309 errors:0 dropped:0 overruns:0 frame:0
>>> * * * * *TX packets:7309 errors:0 dropped:0 overruns:0 carrier:0
>>> * * * * *collisions:0 txqueuelen:0
>>> * * * * *RX bytes:2964856 (2.8 MiB) *TX bytes:2964856 (2.8 MiB)
>>
>> sudo: What's the output of "cat /etc/hostname" and "cat /etc/hosts"?
>
> $ cat /etc/hostname
> valhalla
>
> $ cat /etc/hosts
> 127.0.0.1 localhost
> #192.168.1.64 valhalla.org
> 192.168.1.40 valhalla.org

Set "valhalla" as an alias of "valhalla.org" on the "192.168.1.40
valhalla.org" line to stop the "sudo: unable to resolve host valhalla"
messages.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTimXFadwOuZyjX2VCd=yGmLWh9jMZA@mail.gmail.com ">http://lists.debian.org/BANLkTimXFadwOuZyjX2VCd=yGmLWh9jMZA@mail.gmail.com
 
Old 05-09-2011, 08:41 AM
AG
 
Default cannot resolve hostname

On 07/05/11 14:14, AG wrote:

<snip: description of connectivity problems>



Dear List

I am pleased - & very relieved!! - to report that for the first time in
several days now I have been able to reboot the machine and it retains
connectivity!! This is great news, and although I still don't know what
the cause of the problem was, but suspect that a configuration file or
two was being over-written, at least now I can be productive again and
have confidence in using the machine reliably.


I want to thank everyone here who has contributed so much to helping me
through this issue, and without alienating anyone else, I'd especially
like to thank Camaleón for having stuck through this with me with sage
advice and spot-on recommendations. If these lists had an award for
most helpful members of the community, Camaleón would get my
nomination. Also thanks to Brian, Klistvud, Hans and the others who
made suggestions, helped me think through the issues and didn't get
frustrated with my computing naivete.


All the best, & I hope that one day I might pay these good favours
forward to some other poor schmuk who finds themselves overwhelmed by a
mysterious computing issue.


AG


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DC7A89E.2050507@gmail.com">http://lists.debian.org/4DC7A89E.2050507@gmail.com
 

Thread Tools




All times are GMT. The time now is 11:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org