Results 1 to 9 of 9
Hey all,
Yesterday I was toying around with lvm to try and move some directories to new partitions. After tooling around all day I finally got it working, but along ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-04-2012 #1Just Joined!
- Join Date
- Apr 2012
- Posts
- 4
root@(none) problems with host name
Hey all,
Yesterday I was toying around with lvm to try and move some directories to new partitions. After tooling around all day I finally got it working, but along the way I seem to have messed up my hostname.
So now for all users hostname is coming up as
username at (none)
I have been researching this all morning so here is the information I think will be useful.
#cat /etc/hosts
127.0.0.1 das017 localhost.localdomain localhost
::1 localhost6. localdomain6 localhost
10.48.140.XXX puppet
#cat /etc/hostname
Empty File
When I type
[root at (none) /]# hostname
[root at (none) /]#
returns nothing
I noticed this problem when I tried to start our httpd
[root at (none) /]#/sbin/service http start
Starting httpd: httpd: apr_sockaddr_info_get() failed for (none)
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [FAILED]
[root at (none) /]#
So I think what my main issue is having to do with the hostname?
*EDIT - Adding Info
[root at (none) /]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKIGN_IPV6=yes
GATEWAY=10.48.140.1
HOSTNAME=localhost
Any suggestions?
Thanks!!Last edited by djc391; 04-04-2012 at 05:26 PM. Reason: Adding Info
- 04-05-2012 #2
Use the Google luke.
- 04-05-2012 #3Just Joined!
- Join Date
- Apr 2012
- Posts
- 4
I searched for about 6 hours today with no luck. Stuff I did find I tried. That's why I am asking here.
- 04-05-2012 #4
Really? It is not that hard just google what you want to do like THIS
- 04-05-2012 #5Just Joined!
- Join Date
- Apr 2012
- Posts
- 4
Tried the first 10 links of that search all ready. None of that works. You might be thinking I'm just being lazy here, but I have really googled the crap out of this already. That's why I am asking humans, hopefully someone might be able to have some more knowledge then the first 3 google results about this?
Thanks for at least trying Lazydog, but no matter what way I try and set the hostname nothing works.
[root at (none) /]# hostname localhost
[root at (none) /]# hostname
[root at (none) /]#
- 04-05-2012 #6Place your hostname after HOSTNAMECode:
vi /etc/sysconfig/network
Then run;
Replacing <hostname> with the name you want to use.Code:hostname <hostname>
- 04-05-2012 #7Just Joined!
- Join Date
- Apr 2012
- Posts
- 4
Copy from original post
[root at (none) /]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKIGN_IPV6=yes
GATEWAY=10.48.140.1
HOSTNAME=localhost
I have reset that value to localhost numerous times
and have also tried to reset it again using
[root at (none) /]# hostname localhost
[root at (none) /]# hostname
[root at (none) /]#
I think I am just going to reformat the server tomorrow, this is not a simple issue that one can simple just google in 20 mins(spent another 4 hours today working on it) and has stumped all of my coworkers. Was hoping someone would have some good trick, but just doing what the first reply on google says isn't going to fix it.
Thanks for trying Lazydog.
- 04-05-2012 #8
Does the system hold the hostname when you enter it with hostname <hostname>?
- 04-07-2012 #9
Hi djc391,
Just use the echo command to replace the contents of /proc/sys/kernel/hostname with your new host name.
Then restart the network interfaces:Code:# echo hostname.com > /proc/sys/kernel/hostname
Now you can use the 'hostname' command to verify that it has changed.Code:# service network restart


Reply With Quote
