[opensuse] hostname on command prompt is different than hostname in hostname/DNS tab under network settings in YAST
Hi members, The subject says it all. When i enter hostname on the shell prompt, it gives me "sunny1" as the hostname while the hostname in hostname/DNS tab under network settings in YAST says "sunny2". I have 2 boxes and its the same case in both. On the other box, the names are vice versa. Both boxes are on opensuse 11.1 1) I recently removed the localhost entry in /etc/hosts file Does it have any impact on this issue. 2) And btw, where does hostname on shell prompt retrieve its value from? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
To add one more detail on this issue, the uname -a shows the same
value as the command "hostname" on the shell prompt.
On Sat, May 23, 2009 at 3:12 PM, sundar mahadevan
Hi members,
The subject says it all. When i enter hostname on the shell prompt, it gives me "sunny1" as the hostname while the hostname in hostname/DNS tab under network settings in YAST says "sunny2". I have 2 boxes and its the same case in both. On the other box, the names are vice versa. Both boxes are on opensuse 11.1
1) I recently removed the localhost entry in /etc/hosts file Does it have any impact on this issue. 2) And btw, where does hostname on shell prompt retrieve its value from?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I figured out what the issue was. I had 2 nics, one with static ip and
other DHCP.
The /etc/hosts file has the following entries:
10.1.1.1 sunny1.ezhome.com sunny1
10.1.1.2 sunny2.ezhome.com sunny2
192.168.2.4 sunny1.ezhome.com sunny1
192.168.2.3 sunny2.ezhome.com sunny2
The DHCP is supposed to assign 192.168.2.4 to sunny1 but instead, it
allocated 192.168.2.3 and setup the hostname to be sunny2. It happened
on both my nodes and hence this issue. But now i have made the ips to
be static instead of DHCP.
Many Thanks to all members who tried to help me on this issue.
On Sat, May 23, 2009 at 3:18 PM, sundar mahadevan
To add one more detail on this issue, the uname -a shows the same value as the command "hostname" on the shell prompt.
On Sat, May 23, 2009 at 3:12 PM, sundar mahadevan
wrote: Hi members,
The subject says it all. When i enter hostname on the shell prompt, it gives me "sunny1" as the hostname while the hostname in hostname/DNS tab under network settings in YAST says "sunny2". I have 2 boxes and its the same case in both. On the other box, the names are vice versa. Both boxes are on opensuse 11.1
1) I recently removed the localhost entry in /etc/hosts file Does it have any impact on this issue. 2) And btw, where does hostname on shell prompt retrieve its value from?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi Anders,
As of now, my system does not have the localhost entry in /etc/hosts
and still works fine. And btw, the localhost ip looks like 127.0.0.1
and so do i set to 127.0.0.1 for sunny1 and 127.0.0.2 for sunny2
On Sat, May 23, 2009 at 4:04 PM, sundar mahadevan
I figured out what the issue was. I had 2 nics, one with static ip and other DHCP.
The /etc/hosts file has the following entries:
10.1.1.1 sunny1.ezhome.com sunny1 10.1.1.2 sunny2.ezhome.com sunny2 192.168.2.4 sunny1.ezhome.com sunny1 192.168.2.3 sunny2.ezhome.com sunny2
The DHCP is supposed to assign 192.168.2.4 to sunny1 but instead, it allocated 192.168.2.3 and setup the hostname to be sunny2. It happened on both my nodes and hence this issue. But now i have made the ips to be static instead of DHCP.
Many Thanks to all members who tried to help me on this issue.
On Sat, May 23, 2009 at 3:18 PM, sundar mahadevan
wrote: To add one more detail on this issue, the uname -a shows the same value as the command "hostname" on the shell prompt.
On Sat, May 23, 2009 at 3:12 PM, sundar mahadevan
wrote: Hi members,
The subject says it all. When i enter hostname on the shell prompt, it gives me "sunny1" as the hostname while the hostname in hostname/DNS tab under network settings in YAST says "sunny2". I have 2 boxes and its the same case in both. On the other box, the names are vice versa. Both boxes are on opensuse 11.1
1) I recently removed the localhost entry in /etc/hosts file Does it have any impact on this issue. 2) And btw, where does hostname on shell prompt retrieve its value from?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
sundar mahadevan wrote:
Hi Anders, As of now, my system does not have the localhost entry in /etc/hosts and still works fine. And btw, the localhost ip looks like 127.0.0.1 and so do i set to 127.0.0.1 for sunny1 and 127.0.0.2 for sunny2
No. The 127.x.x.x addresses are local to the individual computer. They have absolutely nothing to do with the network connecting the computers. -- Use OpenOffice.org http://www.openoffice.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 23 May 2009 22:16:55 sundar mahadevan wrote:
Hi Anders, As of now, my system does not have the localhost entry in /etc/hosts and still works fine.
There are many programs that use networking to communicate even on the local machine. These rely on localhost being resolvable. It is an essential entry that *must* be there
And btw, the localhost ip looks like 127.0.0.1 and so do i set to 127.0.0.1 for sunny1 and 127.0.0.2 for sunny2
No, 127.0.0.1 on both Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Many Thanks to all of you for helping me out. I set 127.0.0.1
localhost on /etc/hosts on both the boxes and it looks like uname - a
as well as hostname retrieve its value from /etc/hosts because as soon
as i made the changes in /etc/hosts and rcnetwork restart, both uname
- a and hostname display correct names.
On Sat, May 23, 2009 at 4:33 PM, Anders Johansson
On Saturday 23 May 2009 22:16:55 sundar mahadevan wrote:
Hi Anders, As of now, my system does not have the localhost entry in /etc/hosts and still works fine.
There are many programs that use networking to communicate even on the local machine. These rely on localhost being resolvable. It is an essential entry that *must* be there
And btw, the localhost ip looks like 127.0.0.1 and so do i set to 127.0.0.1 for sunny1 and 127.0.0.2 for sunny2
No, 127.0.0.1 on both
Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 23 May 2009 21:12:15 sundar mahadevan wrote:
1) I recently removed the localhost entry in /etc/hosts file Does it have any impact on this issue.
No, but it will have an impact on just about everything else. Put it back! Why on earth would you ever even think about removing that? You now have a broken system
2) And btw, where does hostname on shell prompt retrieve its value from?
The kernel. As returned by the gethostname() system call. Your problem means that you have changed your configuration but not yet told the system about it. Update the info by hostname <host name you want to use> For your example, you would use hostname sunny2 Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Anders Johansson
-
James Knott
-
sundar mahadevan