Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
server.unkown_domain???why
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
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Wed Jun 30, 2004 10:04 pm    Post subject: server.unkown_domain???why Reply with quote

I typed

echo server > /etc/hostname

echo wtf-dude.com > /etc/dnsdomainname

yet i get this

server.unkown_domain?? why??
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
ank
Apprentice
Apprentice


Joined: 06 Aug 2003
Posts: 185
Location: Maribor, Slovenia

PostPosted: Wed Jun 30, 2004 10:11 pm    Post subject: Reply with quote

Try to add in /etc/hosts

192.168.2.101 server.wtf-dude.com server

You must type your IP address of course.
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Wed Jun 30, 2004 10:13 pm    Post subject: Reply with quote

Check the file /etc/dnsdomainname to verify the change was made. If it wasn't, add your domain directly to the file.

ank wrote:
Try to add in /etc/hosts

192.168.2.101 server.wtf-dude.com server

You must type your IP address of course.


This is for name resolution, not setting your local hostname/domain. Your host file is what is checked first before hitting the name servers you have specified, if the domain is not found in hosts.
Back to top
View user's profile Send private message
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Wed Jun 30, 2004 10:19 pm    Post subject: Reply with quote

hmm its like i said

server / domainname

wtf-dude.com / dnsdomainname
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Wed Jun 30, 2004 10:21 pm    Post subject: Reply with quote

I am not sure I understand your last post, but nonetheless, what happens if you do this:
Code:
echo server > /etc/hostname
echo wtf-dude.com > /etc/dnsdomainname
echo server.wtf-dude.com > /etc/nisdomainname
Back to top
View user's profile Send private message
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Wed Jun 30, 2004 10:25 pm    Post subject: Reply with quote

still get server.unkown_domain ( blah blah blah )

when its starting up it looks fine it says setting to >>>

but Because of this error I can't install mysql_db
which makes apache2 not able to run :(
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Wed Jun 30, 2004 10:30 pm    Post subject: Reply with quote

ank wrote:
Try to add in /etc/hosts

192.168.2.101 server.wtf-dude.com server

You must type your IP address of course.



this did it.

But that means everytime i reboot i gotta edit that ip address :(

Funny... I didn't have to do this last time I installed gentoo. Why this time?
weird.

When I edit the hosts file in reboot, how do I apply changes without rebooting again for changes to take place?
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Wed Jun 30, 2004 10:32 pm    Post subject: Reply with quote

Strange. I only have one entry in my hosts file:
Code:
127.0.0.1 localhost
and I have no issues with my hostname.

Also, you will have to edit the IP if you are being assigned a dynamic IP. I suggest assigning a static IP to servers.

If you decide to use a dynamic IP, after changing the IP in hosts, restart domainname.
Code:
/etc/init.d/domainname restart


However, I would suggest not adding domainname to your startup scripts. Just start domainname manually after editing the file.... Of course, this is entirely up to you.
Back to top
View user's profile Send private message
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Wed Jun 30, 2004 10:39 pm    Post subject: Reply with quote

can i assign static local ips?

that is under a dynamic global ip.
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Wed Jun 30, 2004 10:46 pm    Post subject: Reply with quote

The /etc/hostname file is only used during system startup to set the system host name (see /etc/init.d/hostname and man hostname). Changing the file after boot will not have an effect unless you re-run the hostname command:
Code:
# /bin/hostname server
OR
# /bin/hostname $(< /etc/hostname)


A similar arrangement exists for /etc/dnsdomainname (/etc/init.d/domainname). The domain part of your server name comes from a reverse lookup of the host name either through DNS or the /etc/hosts file. Set your DNS domain in /etc/resolv.conf thus:
Code:
domain wtf-dude.com
and include any DNS servers you use. If you do not have DNS servers then also add the entry to /etc/hosts:
Code:

127.0.0.1 server.wtf-dude.com server
(or the like).

You should now get:
Code:
# hostname
server
# hostname --fqdn
server.wtf-dude.com

_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein


Last edited by Chris W on Wed Jun 30, 2004 11:00 pm; edited 2 times in total
Back to top
View user's profile Send private message
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Wed Jun 30, 2004 10:54 pm    Post subject: Reply with quote

thanks
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Wed Jun 30, 2004 11:25 pm    Post subject: Reply with quote

arachn1d wrote:
can i assign static local ips?

that is under a dynamic global ip.


Yes, you can assign static IPs using local network IPs. However, if this IP you assign to your server is in the dynamic range that your dhcp server hands out, you might run into IP conflicts.

I suggest assigning a static IP that is outside of your local dhcp range.
Back to top
View user's profile Send private message
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Thu Jul 01, 2004 12:11 am    Post subject: Reply with quote

how do i do this

*EDIT**EDIT*oh you mean so if my dhcp router sends ip from 0/24 to make my local ip 25.. for example?
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Thu Jul 01, 2004 12:29 am    Post subject: Reply with quote

When you configure a dchp server, whether it be a hardware router or dhcpcd for linux, you configure a range of IP addresses to hand out.

Example:

Your network is 192.168.1.0/24. You configure your dhcp server to reserve a range of IPs, let's say, 192.168.1.50 - 192.168.1.100. Since the dhcp server will only hand out those reserved IP addresses, you can use the following IPs however you wish:

192.168.1.1 - 192.168.1.49 && 192.168.1.101 - 192.168.1.254, Remember that x.x.x.0 && x.x.x.255 cannot be used as they are reserved for your network identification and broadcast.

To specifically answer your question, yes, you can use .25 if your dhcp server hands out 1-24.
Back to top
View user's profile Send private message
arachn1d
Guru
Guru


Joined: 15 Apr 2004
Posts: 369
Location: /var/www/wtf-dude.com lynx wtf-dude.com

PostPosted: Thu Jul 01, 2004 1:24 am    Post subject: Reply with quote

ah ok thx
_________________
WTF?? Dude... Visit wtf??
Back to top
View user's profile Send private message
Shadows
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 178

PostPosted: Thu Jul 01, 2004 12:22 pm    Post subject: Reply with quote

No folks, you don't have to edit /etc/hosts at all if you just want to configure your domain name.

Domain name configuration is done in /etc/resolv.conf (look at the man pages for that file and read the section that describes the keyword domain). /etc/init.d/domainname takes your domain name specified in /etc/dnsdomainname and creates an appropriate entry in /etc/resolv.conf. Now, /etc/init.d/domainname misses a dependency in his depend-function at the beginning of the script.

Add the line "after net.eth0" to /etc/init.d/domainname:

That's what it looks like before our change:
Code:
depend() {
        need checkroot hostname
        before bootmisc
}


Now add the entry mentioned above:
Code:
depend() {
        need checkroot hostname
        before bootmisc
        after net.eth0
}


Note:
If your NIC which uses dhcp isn't net.eth0, then change it to the appropriate one

Explanation:
Now, while having static IP-Addresses, there is no problem. /etc/init.d/domainname changes or creates /etc/resolv.conf and everything is fine -> domain name will be shown correctly like expected. But when you configure at least one NIC to have dhcp, then, because of the missing dependency, /etc/init.d/domainname will first setup /etc/resolv.conf. But if you have configured your dhcp-client to retrieve DNS-Servers from your ISP, it will simply overwrite your old resolv.conf, which leads to a resolv.conf missing the local domain entry.

And, on most old installations, the domainname-script isn't included in the runlevels at all. So you need to add it to the default runlevel (or whatever runlevel your NIC-startup-scripts with dhcp configured belong to):

Code:
rc-update add domainname default


Greetz

Shad
_________________
# 1:
PIII 450, Intel 440BX, 448 MB SD-RAM ATI Rage IIC AGP 8 MB, SB AWE 64 PnP

# 2:
Athlon XP M 2800+ Desktop edition (running on 1.666 and 100 FSB) [was: Duron 800 (Spitfire)], Via KT266, 512 MB SD-RAM, GeForce 3 64 MB, Sound onBoard
Back to top
View user's profile Send private message
donesteban
n00b
n00b


Joined: 25 Jun 2004
Posts: 17

PostPosted: Mon Aug 02, 2004 11:32 pm    Post subject: Reply with quote

Hi all,

no one of the mentioned solutions do work for me. I seem everybody finds a something strange solution (I do not understand what /etc/host has to do with the domainname settings of a linux system) but for me nothing works.

Could it be the DHCP-Server? The /etc/resolv.conf looks fine after the modifications from Shadows. Like this:
domain my.domain
nameserver router-ip-address
search my.domain

But the domainname comand still shows (none)

This thing drives me nuts. I double checked alle entries and followed the hints in alle threads in the forum. Nix.

I would be happy about any help.

Thanks
Stefan
Back to top
View user's profile Send private message
Shadows
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 178

PostPosted: Tue Aug 03, 2004 1:08 am    Post subject: Reply with quote

I don't know why, but my networking got fucked up again after doing a few changes to my system, too, and even this issue here occured again.

I'm not sure, if it was:
- the change from kernel 2.6.7-r8 -> 2.6.7-r11 (both gen-dev-sources), or
- the change from linux-headers-2.6.7-r? -> linux26-headers-2.6.7-r3 in combination with recompiling glibc, gcc and the kernel

But I think, it has something to do with one of these. I have ~x86 and nptl activated. After changing kernel / headers, recompiling glibc / gcc / kernel many times and finally doing a world-update, things got messed up. Not only the unknown_domain-thing, but another strange behaviour occured:

After logging in with my display manager, it takes a few seconds / minutes, till I can resolve names. Usually, when I quit my KDE-Session, I leave with a bunch of Konqueror windows open with at least 10 tabs each. And when logging in again, everything will be restored and all the pages reloaded into the Konqueror windows / tabs. Now, I can't resolve the dns-names, so every page-request on startup results in an error, i.e.:
Code:
The process for the http://forums.gentoo.org protocol died unexpectedly.


Then I have to wait a few seconds, and when I try to load the page again, it just works.

Well, maybe, this has nothing to do with the unknown_domain-thing, but I'm curious if you'll experience the same strange behaviour.

At the moment, the unkown_domain-thing has no priority to me, so I didn't try to lock down the error yet. Maybe, you should downgrade your kernel to something around r8 or lower, and if it's still broken try a downgrade of your linux-headers to a 2.6.6 version (and recompile at least your glibc).

Good luck

Greetz

Shad
_________________
# 1:
PIII 450, Intel 440BX, 448 MB SD-RAM ATI Rage IIC AGP 8 MB, SB AWE 64 PnP

# 2:
Athlon XP M 2800+ Desktop edition (running on 1.666 and 100 FSB) [was: Duron 800 (Spitfire)], Via KT266, 512 MB SD-RAM, GeForce 3 64 MB, Sound onBoard
Back to top
View user's profile Send private message
donesteban
n00b
n00b


Joined: 25 Jun 2004
Posts: 17

PostPosted: Tue Aug 03, 2004 5:43 pm    Post subject: Reply with quote

Hello again,

I did find my own realy stupid mistake. I guess it was that stupid, that not even double-checking helped. Somehow I managed creating a "host" file instead of using the "hosts" file. Than using the command history and...

Sorry and thanks for the help anyway.

Stefan
Back to top
View user's profile Send private message
madhat
n00b
n00b


Joined: 21 Feb 2005
Posts: 8

PostPosted: Tue Mar 07, 2006 5:43 pm    Post subject: Reply with quote

Go to http://gentoo-wiki.com/FAQ_Setting_up_your_FQDN it worked for both of my computers.

Hope this helps
Back to top
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Tue Mar 07, 2006 6:19 pm    Post subject: Reply with quote

wow madhat,

checking old threads that don't have [solved] in the subject, are you? :wink:
_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
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