Bug 118414
Summary: | up2date/rhn_register doesn't correctly resolve remote host name,IP | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Brian Carp <admin> |
Component: | up2date | Assignee: | Adrian Likins <alikins> |
Status: | CLOSED ERRATA | QA Contact: | Fanny Augustin <fmoquete> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-08-25 21:07:05 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 119505 |
Description
Brian Carp
2004-03-16 15:27:23 UTC
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 |