Bug 1311094 - EAP7 - Native management API port incorrectly detected
EAP7 - Native management API port incorrectly detected
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 7 (Show other bugs)
JON 3.3.5
Unspecified Unspecified
medium Severity medium
: ER01
: One-off release
Assigned To: Thomas Segismont
Sunil Kondkar
: Reopened, Triaged
Depends On:
Blocks: 1314853
  Show dependency treegraph
 
Reported: 2016-02-23 06:34 EST by Filip Brychta
Modified: 2016-06-06 14:58 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-06 14:58:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot (53.31 KB, image/png)
2016-04-01 08:31 EDT, Sunil Kondkar
no flags Details

  None (edit)
Description Filip Brychta 2016-02-23 06:34:47 EST
Description of problem:
Native management API port visible on EAP resource->Inventory->Connection settings page is not detected correctly.

Version-Release number of selected component (if applicable):
JON3.3.5 with eap plugin pack update03.DR01

How reproducible:
Always

Steps to Reproduce:
1. start EAP7
2. import it to inventory
3. install RHQ user
4. go to EAP resource->Inventory->Connection settings

Actual results:
Native management API port is 0

Expected results:
From doc:
Port Reduction

    By utilizing HTTP upgrade, JBoss EAP 7 moved nearly all protocols to be multiplexed over two ports, specifically:

        A management port (HTTP/JSON Management, HTTP Upgraded Remoting - Native Management & JMX, Web Administration Console), and; 
An application port (HTTP Servlet, JAX-RS, JAX-WS, WebSocket, HTTP Upgraded Remoting-EJB Invocation-Remote JNDI) 

So it should be 9990 by default.

Additional info:
It's possible to change it, so that should be correctly detected as well.
It will be probably incorrectly detected for secured config as well for both standalone and domain modes.
Comment 1 Filip Brychta 2016-02-24 08:38:28 EST
It's detected correctly in domain mode - probably because jboss.management.native.port is still used in default host.xml. It's not used in standalone.xml.
Comment 2 Michael Burman 2016-02-29 09:35:32 EST
standalone configuration does not use jboss.management.native.port at all anymore.

However, I'm not sure if this can be fixed without separating plugins.
Comment 3 Thomas Segismont 2016-03-15 13:37:39 EDT
Will take this one if you don't mind Micke, as it is related to my work on Bug 1246083
Comment 4 Thomas Segismont 2016-03-16 05:21:25 EDT
The fix for Bug 1246083 removes nativeHost/nativePort attributes from plugin config on EAP7. These attributes were added in EAP6 plugin to support localAuth. But EAP7 CLI allows to use the HTTP management port with upgrade to remoting protocol. That is why they are no longer needed.

The pull request for Bug 1246083 is not merged yet, but when it is, I will close this BZ as it will no longer be relevant.
Comment 5 Thomas Segismont 2016-03-16 05:22:13 EDT
Sorry, not closed yet
Comment 6 Thomas Segismont 2016-03-17 05:11:13 EDT
(In reply to Thomas Segismont from comment #4)
> The fix for Bug 1246083 removes nativeHost/nativePort attributes from plugin
> config on EAP7. These attributes were added in EAP6 plugin to support
> localAuth. But EAP7 CLI allows to use the HTTP management port with upgrade
> to remoting protocol. That is why they are no longer needed.
> 
> The pull request for Bug 1246083 is not merged yet, but when it is, I will
> close this BZ as it will no longer be relevant.

The original pull request for Bug 1246083 has been closed without merging. Bug 1246083 now tracks changes for EAP6 plugin only.

I will send a pull request for this plugin with changes for EAP7 plugin. It has been agreed to remove the nativeHost/nativePort attributes from plugin config in EAP7 plugin. These attributes were needed in EAP6 plugin because the JBossCLI add to connect to the native management interface. Now it is able to connect over the http management interface with upgrade to the remoting protocol.

It has been acknowledged that the user must not disable http upgrade so that we can still start a connected CLI from the JON agent. There will be a separate BZ created to track this limitation.
Comment 8 Thomas Segismont 2016-03-17 05:38:00 EDT
Pull request sent https://github.com/rhq-project/rhq/pull/225
Comment 9 Michael Burman 2016-03-18 02:53:32 EDT
Merged to master:

commit 089407ea29ce9cbc6189a409c92ea48b918e4125
Merge: e305e75 1231659
Author: Michael Burman <yak@iki.fi>
Date:   Fri Mar 18 08:51:32 2016 +0200

    Merge pull request #225 from tsegismont/bug/1311094
    
    Bug 1311094 - EAP7 - Native management API port incorrectly detected

commit 1231659baf2737c6a120625a9d46c3d3d6c8ba04
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Thu Mar 17 10:21:09 2016 +0100

    Bug 1311094 - EAP7 - Native management API port incorrectly detected
    
    Removed nativeHost and nativePort settings from EAP7 servers config, as the CLI now connects to the HTTP management port.
    
    Updated discovery class so that when '0.0.0.0' is discovered, '127.0.0.1' is used
    Updated component class to log a warning if management host is set to '0.0.0.0'
    Changed default from 'localhost' to '127.0.0.1' in HostConfiguration class to avoid troubles when localhost is configured to something else than loopback address
    
    Also, removed upgrade facet from wf10 plugin component classes
Comment 10 Thomas Segismont 2016-03-21 10:14:03 EDT
We will keep 0.0.0.0 in resource name. See https://bugzilla.redhat.com/show_bug.cgi?id=1246083#c13
Comment 11 Thomas Segismont 2016-03-21 11:02:19 EDT
Pull request sent https://github.com/rhq-project/rhq/pull/227
Comment 12 Mike McCune 2016-03-28 19:42:22 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 15 Sunil Kondkar 2016-04-01 08:30:06 EDT
Tested on update04 DR02.

EAP7 standalone resource->Inventory->Connection settings still displays the properties Native Host and Native Port. Native port displays value 0 by default.

Please refer the attached screenshot.
Steps followed:
-Installed Jboss ON 3.3.5
-Applied update 04 DR02 
-Navigated to Administration->Configuration->Agent Plugins
-Clicked on Scan for Updates and Update plugins on Agents
-Installed and started EAP7 standalone
-Imported EAP7
-Installed RHQ user and navigated to EAP resource->Inventory->Connection settings
-It displays properties - Native Host and Native Port.
Comment 16 Sunil Kondkar 2016-04-01 08:31 EDT
Created attachment 1142548 [details]
Screenshot
Comment 20 Sunil Kondkar 2016-04-04 08:48:40 EDT
Tested on the latest DR02 plug-in update archive with below MD5 sum

e8fe5341678510c1ea764980ce7a1e56  jon-plugin-pack-eap-3.3.0.GA-update-04-DR02.zip

EAP7 standalone resource->Inventory->Connection settings still displays the properties Native Host and Native Port.
Also tried with browser reload, however the connection settings still displays the properties Native Host and Native Port.
Comment 21 Michael Burman 2016-04-06 09:59:39 EDT
Fixed the cherry-picks:

commit 6ace66f1699604b0454b064eb71b63d6745a349c
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Mon Mar 21 15:59:25 2016 +0100

    Bug 1311094 - EAP7 - Native management API port incorrectly detected
    
    Update to previous fix: keep 0.0.0.0 in resource name
    
    (cherry picked from commit 39f4f9390be572e4a52f670ded7fc3e6915c3e9b)

commit 102048b6725466d9ca6cbab457701d4534a025da
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Thu Mar 17 10:21:09 2016 +0100

    Bug 1311094 - EAP7 - Native management API port incorrectly detected
    
    Removed nativeHost and nativePort settings from EAP7 servers config, as the CLI now connects to the HTTP management port.
    
    Updated discovery class so that when '0.0.0.0' is discovered, '127.0.0.1' is used
    Updated component class to log a warning if management host is set to '0.0.0.0'
    Changed default from 'localhost' to '127.0.0.1' in HostConfiguration class to avoid troubles when localhost is configured to something else than loopback address
    
    Also, removed upgrade facet from wf10 plugin component classes
    
    (cherry picked from commit 1231659baf2737c6a120625a9d46c3d3d6c8ba04)

commit 740f8de61780b99f8d744ad749f86ee5999cb7f8
Author: Michael Burman <miburman@redhat.com>
Date:   Wed Apr 6 16:55:28 2016 +0300

    Revert "Bug 1311094 - EAP7 - Native management API port incorrectly detected"
    
    This reverts commit 95fba2fc8aca6362e8a0516c42f4c2702ea491c7.
Comment 23 Sunil Kondkar 2016-04-13 05:38:16 EDT
Verified on EAP Plug-in Pack Update-04 ER01.

EAP7 standalone resource->Inventory->Connection settings does not display the properties Native Host and Native Port.

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