Keith Wall created QPID-6685:
--------------------------------

             Summary: ServerScopedRuntimeExceptions occurring during the 
Broker's initial open phase are ignored, 
                 Key: QPID-6685
                 URL: https://issues.apache.org/jira/browse/QPID-6685
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
            Reporter: Keith Wall
             Fix For: qpid-java-6.0


ServerScopedRuntimeExceptions are thrown in situations where the Broker must 
cause itself to shutdown immediately as no reasonable recovery exists.  
Currently ServerScopedRuntimeExceptions occurring during the Broker's initial 
open phase are swallowed without causing the 'open' to fail.

For example, HttpManagement throws a SSRE if its port is occupied.  If you 
create this situation using netcat and start the Broker, one can see that 
Broker continues despite the SSRE.

{code}
 nc -46l 8080 &
./bin/qpid-server &
{code}

Notice the absence of HTTP is bound in the startup messages:

{noformat}
[Broker] BRK-1006 : Using configuration : 
/Users/keith/src/qpid-java/systests/target/qpid-broker/6.0.0-SNAPSHOT/work/config.json
[Broker] BRK-1001 : Startup : Version: 6.0.0-SNAPSHOT Build: Unversioned 
directory
[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 1.7.0_60-b19 
OS : Mac OS X version: 10.10.4 arch: x86_64
[Broker] BRK-1011 : Maximum Memory : 1,908,932,608 bytes
[Broker] BRK-1017 : Process : PID : 15477
[Broker] MNG-1001 : Web Management Startup
[Broker] MNG-1001 : JMX Management Startup
[Broker] MNG-1002 : Starting : RMI Registry : Listening on TCP port 8999
[Broker] MNG-1002 : Starting : JMX RMIConnectorServer : Listening on TCP port 
9099
[Broker] MNG-1004 : JMX Management Ready
{noformat}

The logs show the SSRE exception, but the Broker effectively ignores it and 
comes up anyhow:

{noformat}
2015-08-09 08:46:45,110 ERROR [Broker-Config] 
(o.a.q.s.u.ServerScopedRuntimeException) - Failed to start HTTP management on 
ports : [HttpPortImpl [id=026eb5eb-1810-4a14-b019-5cec430d75af, name=HTTP, 
port=8080]]
java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_60]
        at sun.nio.ch.Net.bind(Net.java:444) ~[na:1.7.0_60]
        at sun.nio.ch.Net.bind(Net.java:436) ~[na:1.7.0_60]
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) 
~[na:1.7.0_60]
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) 
~[na:1.7.0_60]
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to