Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems setting my hostname
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mattheweast
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2004
Posts: 121
Location: London, UK

PostPosted: Tue Jan 11, 2005 8:49 pm    Post subject: Problems setting my hostname Reply with quote

Hi there, I have some slight problems with this. I followed the guide at https://forums.gentoo.org/viewtopic.php?t=276942.

I get my IP for my server via dhcp. Here is my setup:

I use dyndns for my ip resolution, and the name is mdke.mine.nu

/etc/hosts:
Code:

127.0.0.1 euthathios.mdke.mine.nu euthathios localhost


/etc/hostname:
Code:
:
euthathios


/etc/domainname:
Code:

mdke.mine.nu


So everything is as in the guide. I have rebooted.

However I get this error with one of the commands that you specified to check the setup:
Code:

matt@eustathios matt $ hostname
eustathios
matt@eustathios matt $ hostname --fqdn
hostname: Unknown host


Further, Proftpd and tetrix fail to start, the errors being, respectively:

Code:

root@eustathios matt # /etc/init.d/tetrix start
 * Starting TetriNET Server...
Hostname self-lookup failed.                                              [ !! ]


Code:

root@eustathios matt # /etc/init.d/proftpd start
 * Starting proftpd...
 - getaddrinfo 'eustathios' error: Name or service not known
 - warning: unable to determine IP address of 'eustathios'
 - error: no valid servers configured
 - Fatal: error processing configuration file '/etc/proftpd/proftpd.conf  [ !! ]



I would appreciate some help with this!! I've never got my hostname/hosts/domainname set up exactly right on this network...

Thanks in advance!! Matt
Back to top
View user's profile Send private message
iarwain
Apprentice
Apprentice


Joined: 25 Sep 2003
Posts: 253

PostPosted: Tue Jan 11, 2005 8:57 pm    Post subject: Re: Problems setting my hostname Reply with quote

mattheweast wrote:

/etc/domainname:
Code:

mdke.mine.nu


So everything is as in the guide. I have rebooted.


Quote:
3) /etc/dnsdomainname should contain localnetwork
Code:
echo localnetwork > /etc/dnsdomainname

Have you created dnsdomainname?
Back to top
View user's profile Send private message
mattheweast
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2004
Posts: 121
Location: London, UK

PostPosted: Tue Jan 11, 2005 9:08 pm    Post subject: Reply with quote

Hi, thanks for your reply!!

Code:
root@eustathios matt # cat /etc/dnsdomainname
mdke.mine.nu


I also sym linked nisdomainname to this, and made sure the service was running and started upon boot.

M
Back to top
View user's profile Send private message
mattheweast
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2004
Posts: 121
Location: London, UK

PostPosted: Tue Jan 11, 2005 9:50 pm    Post subject: Reply with quote

Having said this, there is obviously something wrong with it, because:

Code:
matt@eustathios matt $ dnsdomainname
dnsdomainname: Unknown host


As i mentioned, mdke.mine.nu is the name I use with dyndns to resolve my IP. Does anyone have any suggestions?

Thanks again. M
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Jan 11, 2005 11:32 pm    Post subject: Reply with quote

make sure that you have those entered into your hosts file too...
_________________
Come and play in my land
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Wed Jan 12, 2005 3:16 am    Post subject: Reply with quote

here is mine
Code:
# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1        localhost
192.168.1.97        abbottdavid.localnetwork  abbottdavid
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


_________________
http://dev.gentoo.org/~dabbott/
Back to top
View user's profile Send private message
bone
Apprentice
Apprentice


Joined: 07 Jun 2002
Posts: 255
Location: Midwest, USA

PostPosted: Wed Jan 12, 2005 3:27 am    Post subject: Reply with quote

/etc/hostname and /etc/domainname are deprecieated. Use /etc/conf.d/hostname and /etc/conf.d/domainname.

Note: Using these will not cause the problem, I am just stating that they are deprecieated.


jt
Back to top
View user's profile Send private message
Braempje
l33t
l33t


Joined: 31 Jan 2003
Posts: 748

PostPosted: Sat Jan 15, 2005 11:03 am    Post subject: Reply with quote

bone wrote:
/etc/hostname and /etc/domainname are deprecieated. Use /etc/conf.d/hostname and /etc/conf.d/domainname.

Do you have any references for that? I haven't found any information on it, neither in my files (they don't exist) nor in the documentation.
_________________
Dictionary of the Flemish Sign Language - Woordenboek Vlaamse Gebarentaal
Back to top
View user's profile Send private message
duderonomy
Guru
Guru


Joined: 20 Mar 2004
Posts: 349
Location: SF Bay Area

PostPosted: Wed Feb 02, 2005 6:36 am    Post subject: Reply with quote

me too. (i.e. I would be interested in the reference too)
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Wed Feb 02, 2005 7:59 am    Post subject: Reply with quote

Quote:
After updating baselayout to 1.11.8 i get messages on boot of the form:

Stop using /etc/dnsdomainname and use /etc/conf.d/domainname
same with domain, clock and keymaps.

Took a while to find this but thats where it came from.. surprised you haven't seen the messages.
mvh
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
cjt007
n00b
n00b


Joined: 11 May 2011
Posts: 1

PostPosted: Wed May 11, 2011 3:46 am    Post subject: Reply with quote

dnsdomainname is sym linked to hostname on Fedora Core 14.
The use od dnsmasq with the -s option means that the /etc/hosts file
and the /etc/resolv.conf file are both brought into play.

192.168.7.2 mrepo cobbler.localdomain
will fail - WHY? because the usual semantics of DNS are used
IP address followed by FQDN followed by alias(s).
Which means that 192.168.7.2 is the IP address it might find inside /etc/hosts
mrepo is supposed to be the FQDN - but how can it be - really.
The dnsmasq application will not complain about this entry.
The hostname command comes back with the right name iff
the /etc/sysconfig/network entry has the correct name and they
agree that /etc/hosts has the same info - at least for that hostname.

So the dnsdomainname is trying to pull apart mrepo into its
short hostname and dnsdomainname parts. This is not possible
because there is no DOT FQDN available.

What should happen is the entry should be re-ordered to
192.168.7.2 cobbler.localdomain mrepo

Now Cobbler is happy because it has a dnsmasq entry for mrepo
and dnsdomainname is happy because it splits the cobbler.localdomain
(FQDN) up with the DOT syntax as
short hostname: cobbler
dnsdomainname: localdomain
_________________
Helpful
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum