Bug 870533 - Server silent/autoinstall sets http and https ports to sslsocket port value
Server silent/autoinstall sets http and https ports to sslsocket port value
Product: RHQ Project
Classification: Other
Component: Installer (Show other bugs)
All All
unspecified Severity medium (vote)
: ---
: RHQ 4.6
Assigned To: Jirka Kremser
Mike Foley
Depends On:
Blocks: 870449
  Show dependency treegraph
Reported: 2012-10-26 14:35 EDT by Larry O'Leary
Modified: 2013-09-03 10:46 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 870449
Last Closed: 2013-09-03 10:46:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Larry O'Leary 2012-10-26 14:35:15 EDT
+++ This bug was initially created as a clone of JBoss ON Bug #870449 +++

Description of problem:
When performing a silent or auto-install of the server and enabling SSL encryption using sslsocket for agent-to-server communication, the installation is successful and everything seems fine. However, the server will not start back up after it is shutdown due to:

    INFO  [org.apache.coyote.http11.Http11Protocol] Initializing Coyote HTTP/1.1 on http-
    ERROR [org.apache.coyote.http11.Http11Protocol] Error initializing endpoint
java.net.BindException: Address already in use:16363

The address it is complaining about is the port used for the sslsocket. Which is strange seeing rhq.server.startup.web.http.port was set to 7080 and rhq.server.startup.web.https.port was set to 7443.

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

How reproducible:

Steps to Reproduce:
1.  Extract JBoss ON server installation
2.  Modify <RHQ_SERVER_HOME>/bin/rhq-server.properties to enabled sslsocket on port 16363 and enable rhq.autoinstall.enabled:

        diff --git a/jon-server/bin/rhq-server.properties b/jon-server/bin/rhq-server.properties
        index 531fba4..215f056 100644
        --- a/jon-server/bin/rhq-server.properties
        +++ b/jon-server/bin/rhq-server.properties
        @@ -26,7 +26,7 @@ jboss.bind.address=
         # High Availability (HA)
         # General Properties
        @@ -48,10 +48,10 @@ rhq.server.plugin-deployer-threads=1
         # RHQ Server's remote endpoint for agents to talk to
         # bind-address and bind-port are derived from the HA server definition,
         # if you set the address/port here, they will override the HA server definition found in the database
         # Multicast detector configuration for auto-discovery
        @@ -62,7 +62,7 @@ rhq.communications.multicast-detector.port=16162
         # Server-side SSL Security Configuration for HTTPS thru Tomcat
         # These are used for browser https: access and for incoming messages from agents over sslservlet transport
         # [you cannot use ${x} variables - see https://jira.jboss.org/jira/browse/JBWEB-74]
        @@ -171,7 +171,7 @@ rhq.sync.endpoint-address=false
         #                                          will use to talk to this server.
         #                                          If not set, a value to use is
         #                                          determined at auto-install time.
3.  Start ON server
4.  Wait for installation to complete
5.  Verify server started:
    #.  Access it via the UI
    #.  No startup errors in <RHQ_SERVER_HOME>/logs/rhq-server-log4j.log
    #.  ON server is listening on 7080, 7443, and the sslsocket port of 16363

            netstat -anp | grep -E '(7080|7443|16363)'

6.  Shutdown ON server
7.  Start ON server
Actual results:
Server fails to start properly after it has been shutdown with the following error:
    ERROR [org.apache.coyote.http11.Http11Protocol] Error initializing endpoint
    java.net.BindException: Address already in use:16363

Expected results:
Server should start normally and HTTP listener should be using port 7080 and HHTPS listener should be using port 7443 and sslsocket should be 16363.

Additional info:
This is happening because at some point during the installation, the HTTP and HTTPS port values get replaced with the sslsocket port value in rhq-server.properties:

     # General Properties

This should not be happening.

--- Additional comment from loleary@redhat.com on 2012-10-26 14:06:27 EDT ---

This only happens during silent/auto install. When performing a manual advanced install, the http and https ports are NOT replaced.
Comment 1 John Mazzitelli 2012-10-29 12:02:38 EDT
FYI: it appears that code was added here in commit 93ba1930186a1bea809d90fb3b08b62ca3650e3e - see diff:


apparently for bug #RHQ-2297
Comment 2 Jirka Kremser 2012-10-30 09:17:46 EDT

time:    Tue Oct 30 14:02:31 2012 +0100
commit:  231093c9978a9028c151894f799a87c2c6d6b17c
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 870533 - Server silent/autoinstall sets http and https ports to sslsocket port value] The code responsible for overriding the "rhq.server.startup.web.http{s}.port" properties with the port # taken from "rhq.communications.connector.bind-port" has been commented out
Comment 3 Heiko W. Rupp 2013-09-03 10:46:25 EDT
Bulk closing of issues in old RHQ releases that are in production for a while now.

Please open a new issue when running into an issue.

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