+++ 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-0.0.0.0-16363 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): 4.4.0.JON311GA How reproducible: Always 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=0.0.0.0 #java.rmi.server.hostname=0.0.0.0 # High Availability (HA) -rhq.server.high-availability.name= +rhq.server.high-availability.name=localhost.localdomain rhq.server.maintenance-mode-at-startup=false # 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 -rhq.communications.connector.transport=servlet +rhq.communications.connector.transport=sslsocket rhq.communications.connector.bind-address= -rhq.communications.connector.bind-port= -rhq.communications.connector.transport-params=/jboss-remoting-servlet-invoker/ServerInvokerServlet +rhq.communications.connector.bind-port=16363 +rhq.communications.connector.transport-params= # Multicast detector configuration for auto-discovery rhq.communications.multicast-detector.enabled=false @@ -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] -rhq.server.tomcat.security.client-auth-mode=want +rhq.server.tomcat.security.client-auth-mode=false rhq.server.tomcat.security.secure-socket-protocol=TLS rhq.server.tomcat.security.algorithm=SunX509 rhq.server.tomcat.security.keystore.alias=RHQ @@ -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. -rhq.autoinstall.enabled=false +rhq.autoinstall.enabled=true rhq.autoinstall.database=auto rhq.autoinstall.public-endpoint-address= 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 -rhq.server.startup.web.http.port=7080 -rhq.server.startup.web.https.port=7443 +rhq.server.startup.web.http.port=16363 +rhq.server.startup.web.https.port=16363 rhq.server.startup.webservice.port=9093 rhq.server.startup.namingservice.port=2099 rhq.server.startup.namingservice.rmiport=2098 This should not be happening. --- Additional comment from loleary 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.
FYI: it appears that code was added here in commit 93ba1930186a1bea809d90fb3b08b62ca3650e3e - see diff: http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ConfigurationBean.java?id=93ba1930186a1bea809d90fb3b08b62ca3650e3e apparently for bug #RHQ-2297
http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=231093c99 master time: Tue Oct 30 14:02:31 2012 +0100 commit: 231093c9978a9028c151894f799a87c2c6d6b17c author: Jirka Kremser - jkremser 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
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.