Bug 980639 - JBoss Web connectors are not discovered if host name contains dash/hyphen (-)
Summary: JBoss Web connectors are not discovered if host name contains dash/hyphen (-)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 5
Version: JON 3.1.2
Hardware: All
OS: All
unspecified
high
Target Milestone: ER01
: JON 3.2.0
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-02 22:09 UTC by Larry O'Leary
Modified: 2018-12-02 17:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-02 20:37:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 413963 0 None None None Never

Description Larry O'Leary 2013-07-02 22:09:49 UTC
Description of problem:
If EAP 5 was started with a bind address that contains a hyphen such as my-server.com, the JBoss Web connectors are not discovered.

Version-Release number of selected component (if applicable):
4.4.0.JON312GA

How reproducible:
Always

Steps to Reproduce:
1.  Start EAP 5 using a bind address that contains a hyphen:

        ./run.sh -c all -b my-server.com &
        
    To simulate this, update the /etc/hosts file to point my-server.com at 127.0.0.1.
    
2.  Start JBoss ON system.

3.  Import EAP server into inventory.

4.  Wait for service discovery to complete.

Actual results:
No connectors appear under the EAP 5 server's JBoss Web / Connectors auto-group (EAP my-server.com:1099 all / Resources / JBoss Web / Connectors)

Expected results:
The http and ajp connectors should appear under the EAP 5 server's JBoss Web / Connectors auto-group (EAP my-server.com:1099 all / Resources / JBoss Web / Connectors / ( ajp://my-server.com%2F127.0.0.1:8009 | http://my-server.com%2F127.0.0.1:8080 )

Additional info:
This issue is due to a bad regular expression that assumes that the hyphen represents the delimiter between protocol, address, and port. It does not take into consideration that hyphen is a valid character in a host/domain name as per the RFC.

Comment 1 Thomas Segismont 2013-08-07 16:56:10 UTC
Fixed in master

commit 089d80191b85565760a5097e2cc5336fe4e9e6bd
Author: Thomas Segismont <tsegismo>
Date:   Wed Aug 7 18:53:44 2013 +0200

Simplified the regular expression matching connector components.
    
Side fix: servers started with -b [hostname] instead of -b [ip address] have connector with composed names: (myserver.com%2F127.0.0.1). It was not taken into account when trying to find the thread pool associated with it (in order to collect thread pool metrics).
    
Tested with EAP 5.1.2 and 5.2.0

Comment 2 Radim Hatlapatka 2013-10-16 12:01:28 UTC
Verified with JON 3.2.0.ER3 and EAP 5.2.0

- I see now the connectors (as ajp://127.0.0.1:8009 and http://127.0.0.1:8080)


Note You need to log in before you can comment on or make changes to this bug.