Bug 1311094 - EAP7 - Native management API port incorrectly detected
Summary: EAP7 - Native management API port incorrectly detected
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 7
Version: JON 3.3.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER01
: One-off release
Assignee: Thomas Segismont
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On:
Blocks: 1314853
TreeView+ depends on / blocked
 
Reported: 2016-02-23 11:34 UTC by Filip Brychta
Modified: 2016-06-06 18:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-06 18:58:14 UTC
Type: Bug
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1246083 0 medium CLOSED CLI operations don't work when Native Local Authentication is enabled and Native management API host is set to 0.0.0.0 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1318613 0 unspecified CLOSED It's not possible to execute CLI operations on EAP7 when the http-upgrade is disabled 2021-02-22 00:41:40 UTC

Internal Links: 1246083 1318613

Description Filip Brychta 2016-02-23 11:34:47 UTC
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 13:38:28 UTC
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 14:35:32 UTC
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 17:37:39 UTC
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 09:21:25 UTC
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 09:22:13 UTC
Sorry, not closed yet

Comment 6 Thomas Segismont 2016-03-17 09:11:13 UTC
(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 09:38:00 UTC
Pull request sent https://github.com/rhq-project/rhq/pull/225

Comment 9 Michael Burman 2016-03-18 06:53:32 UTC
Merged to master:

commit 089407ea29ce9cbc6189a409c92ea48b918e4125
Merge: e305e75 1231659
Author: Michael Burman <yak>
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>
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 14:14:03 UTC
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 15:02:19 UTC
Pull request sent https://github.com/rhq-project/rhq/pull/227

Comment 12 Mike McCune 2016-03-28 23:42:22 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 15 Sunil Kondkar 2016-04-01 12:30:06 UTC
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 12:31:15 UTC
Created attachment 1142548 [details]
Screenshot

Comment 20 Sunil Kondkar 2016-04-04 12:48:40 UTC
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 13:59:39 UTC
Fixed the cherry-picks:

commit 6ace66f1699604b0454b064eb71b63d6745a349c
Author: Thomas Segismont <tsegismo>
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>
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>
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 09:38:16 UTC
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.