LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-21-2006, 04:20 PM   #1
aobrien
LQ Newbie
 
Registered: Feb 2006
Posts: 5

Rep: Reputation: 0
Hostname Problems


I'm setting up a Red Hat AS3 and having issues with hostname. The hostname is set and when I run $hostname I get the correct reply (server.domain.com), however if I run any of the flagged hostname commands like $hostname -a or -f or -d I get Unkown host. The domainname is not set currently but I had it set previously (domain.com) and the hostname just as the server name (server) but the flagged hostname commands still did not work. Any ideas what the issue is? Also should hostname be set as the fully qualified name of just the server name with the domain name to create the fully qualified name?
 
Old 02-21-2006, 04:33 PM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
What does /proc/sys/kernel/hostname and /etc/hosts say ?

Quote:
#example /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.2 system.domain.tld system

Last edited by markus1982; 02-21-2006 at 04:36 PM.
 
Old 02-21-2006, 04:47 PM   #3
aobrien
LQ Newbie
 
Registered: Feb 2006
Posts: 5

Original Poster
Rep: Reputation: 0
/proc/sys/kernel/hostname and /etc/hosts

[aobrien]$ more /proc/sys/kernel/hostname
ino4w308.ad.bank.net
[aobrien]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

Last edited by aobrien; 02-21-2006 at 04:49 PM.
 
Old 02-21-2006, 04:52 PM   #4
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Your /etc/hosts looks messed up and should be fixed. Also the hostname in /proc/sys/kernel/hostname should NOT be FQDN. You need to check your configuration files; for RedHat this is probably /etc/sysconfig/network or something alike.
 
Old 02-21-2006, 09:20 PM   #5
aobrien
LQ Newbie
 
Registered: Feb 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks Markus, that was it. /etc/hosts was missing a line for my server...

[aobrien]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
153.110.151.60 ino4w308.ad.bank.net ino4w308
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hostname resolution problems. FLOODS Fedora 4 10-27-2005 07:58 PM
msql and hostname problems krayz1e Linux - Newbie 4 09-04-2004 01:48 AM
changed hostname now problems degraffenried13 Linux - General 2 02-21-2004 06:15 PM
Problems with KDE after setting hostname. sanfran49 Linux - Software 5 02-17-2004 12:58 PM
hostname problems charlie123 Linux - Newbie 4 01-13-2003 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration