Bug 51359

Summary: bad IP detection
Product: [Retired] Red Hat Linux Reporter: Sean Dilda <agrajag>
Component: rhn_registerAssignee: Adrian Likins <alikins>
Status: CLOSED CURRENTRELEASE QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-02 21:34:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Sean Dilda 2001-08-09 19:33:21 UTC
I just ran rhn_register and it detected my IP as 127.0.0.1

I ran rhn_register again and got the same error.  Here's what ifconfig
looks like:

[agrajag@loiosh agrajag]$ /sbin/ifconfig
eth1      Link encap:Ethernet  HWaddr 00:02:2D:0D:ED:A0  
          inet addr:192.168.105.22  Bcast:192.168.105.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1
          RX packets:7118 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6735 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:2981693 (2.8 Mb)  TX bytes:891374 (870.4 Kb)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:420 (420.0 b)  TX bytes:420 (420.0 b)

[agrajag@loiosh agrajag]$

Comment 1 Adrian Likins 2001-08-09 19:58:25 UTC
This is a result of the python code:
	gethostbyname(gethostname())

so, if /etc/hosts has the hostname resolving to 127.0.0.1, thats what
you will get.

ah, the magic of irc...