Description of problem: When trying to register (or re-register) my system with Red Hat Network, I am forced to decline submitting information about my system (the hostname, kernel info, etc.) because the application cannot correctly determine the host IP or name and does not allow me to modify these fields (only the Profile name). If I run up2date during a remote session through ssh, then the application uses my remote host and name resolution in the registration; however, if I run the application locally from the console, it announces my IP address as 127.0.0.1. And because I am unable to modify these fields, the information is not correct and I must choose not to send any of the system info through. Version-Release number of selected component (if applicable): up2date-4.2.5-1 How reproducible: Always Steps to Reproduce: 1. up2date --register 2. in Step 3 (Register a System Profile - Hardware), check the hostname and IP address Actual Results: Version: 3ES Hostname: [reverse DNS lookup - resolves to ISP's registered name] IP Address: XXX.XXX.XXX.XXX [CORRECT] *OR* Version: 3ES Hostname: [the machine's hostname - CORRECT] IP Address: 127.0.0.1 Expected Results: Version: 3ES Hostname: [the machine's hostname - i.e. the value returned by "hostname"] IP Address: XXX.XXX.XXX.XXX [CORRECT]
Some of this behaviour should of changed in the first update set for rhel3. (up2date-4.2.5) Are you still seeing these problems with 4.2.5?
Yes, this behavior was observed in version 4.2.5, as indicated in the Version-Release information above ('rpm -q' returns "up2date-4.2.5-1").
I'm not sure how the current code would be failing to detect the ip correctly. Heres a run down of what it does to detect this: 1. Looks up hostname (socket.gethostname) 2. resolves that name to an up (socket.gethostbyname()) If the above is not 127.0.0.1 and/or "localhost" it tries: opens a socket to serverURL (xmlrpc.rhn.redhat.com by default) or to proxyUrl (if a proxy is configured) figures out what interface that socket is on, and gets its ip address. Then it resolves the hostname via a gethostbyaddr on that address. The first step can "fail" if the machine belives its hostname is "localhost" and/or the hostname resolves to 127.0.0.1. Check the /etc/hosts file to see if this is whats happening. That said, the second step should always get a useable IP address, so I'm not sure whats going on. Anything unusual about this machines hostname, dns, ip, etc?
It's possible that the behavior is a result of the /etc/hosts file. The default (i.e., the one generated by the RHEL 3 ES install) seemed a little strange to me, and I've since fixed it (but I'm haven't re-registered the machine since). The original /etc/hosts file looked something like this: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost my.example.com my I subsequently changed it to the following: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost XXX.XXX.XXX.XXX my.example.com my The interface was listening on the correct IP address, but it was not in the /etc/hosts file.
FYI: I since performed an update on the hardware profile associated with the machine (by running up2date --hardware), and it now lists the correct hostname and IP address on my Systems profile page on RHN. I imagine that the alterations to the / etc/hosts file may be responsible for this, although I can't say for sure. Perhaps the RedHat team may want to look into how the default /etc/hosts file is generated during the install of RHEL 3 ES. Thanks!
I've just done my very first RHEL 3 WS U1 install (so I am using up2date-4.2.5-1) and have had a similar problem. At the stage where up2date was detecting my configuration it just sat there for a few minutes and then listed ERROR in all the fields. I tried running up2date at least 10 times with the same results. After reading the above comments I checked my /etc/hosts file, originally it read: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 mymachine localhost.localdomain localhost so I removed mymachine so the machine would rely on DNS to resolve the its IP address, i.e. my /etc/hosts file now reads: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost and this instantly fixed my up2date problem. Other information: This was a totally fresh full install, I configured up2date to work via a proxy, I was using an already existing RHN account with 3 new and unused entitlements. Like Brian, the default /etc/hosts file appears strange to me also and I don't expect a "ping mymachine" command to return an IP address of 127.0.0.1