Description of problem: I have created probe "Apache: Uptime" and it attempts to access "http://10.16.98.211%20%20%20%20:80/server-status" instead of expected "http://10.16.98.211:80/server-status". Version-Release number of selected component (if applicable): both 520 and 521 How reproducible: always Steps to Reproduce: 1. create probe "Apache: Uptime" 2. push RHN monitoring Scout config 3. Observe the error message in the probe "Status:" field Actual results: UNKNOWN, HTTP error found at http://10.16.98.211%20%20%20%20:80/server-status: 500 Can't connect to 10.16.98.211 :80 (connect: timeout) Expected results: UNKNOWN, HTTP error found at http://10.16.98.211:80/server-status: 500 Can't connect to 10.16.98.211 :80 (connect: timeout) (but I also think probe really tries to access that URL, as on my satellite where various other probes works correctly, this is the only one in UNKNOWN status) Additional info: https://rlx-1-04.rhndev.redhat.com/rhn/systems/details/probes/ProbeDetails.do?sid=1000010023&probe_id=2
If this problem exists on Satellite 5.3.0 as well, this bugzilla should be aligned to sat531-triage. If it does not exist in 5.3.0, this bugzilla should probably be closed as WONTFIX.
The issue is caused by spaces in the rhnservernetwork table: SQL> select replace(ipaddr, ' ', '+') from rhnservernetwork where server_id = 1000010023 ; REPLACE(IPADDR,' ---------------- 10.16.98.211++++ SQL> I wonder why other probes are not affected. We should either strip the spaces in monitoring code, or (preferred) strip them in rhnservernetwork and ensure we never have spaces there, via trigger and check or something.
I have tested on 530 (sputnik-stage.brq.redhat.com) and I see there: Status: UNKNOWN, HTTP error found at http://192.168.122.141%20:80/server-status: 500 Can't connect to 192.168.122.141 :80 (connect: timeout) (tested on a dead system, so that "connect: timeout" is not important IMO) https://sputnik-stage.brq.redhat.com/rhn/systems/details/probes/ProbeDetails.do?probe_id=167&sid=1000011378 Adding "sat531-triage", removing "sat52maint".
It is only in probes which use ./NP/Probe/DataSource/HTTP.pm becouse of this usage of URI::URL use URI::URL; my $uri = new URI::URL('/foooo'); $uri->scheme('http'); $a='127.0.0.1 '; $uri->host($a); $uri->port('80'); print $uri; which will print: http://127.0.0.1%20%20%20:80/foooo
I fixed HTTP.pm so it strips spaces before passing to URI::URL - commit 8026a276261a9f1f91ae131850fef134ce6b9625 And I also change schema to make column ipaddr varchar(16) as char(16) does not have much sense. commit e539f359155bebeae80e8f41edac2f9e0d4bd0e6
I added probes with Apache: Processes/Requests/Uptime; All was using server-status and probes works as expected. log: Probe(s) assigned to system have an OK status Apache: Processes Max transferred per child 0.090 MB; Max transferred per slot 0.090 MB System Probe(s) assigned to system have an OK status Apache: Requests Traffic 0.217 Kbytes/sec; Request rate 0.050/sec; Current requests 1 System Probe(s) assigned to system have an OK status Apache: Uptime Apache Server uptime: 11 minutes 41 seconds System -- Verified with Satellite-5.4.0-RHEL5-re20100910.2
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford