Karaf
  1. Karaf
  2. KARAF-1574

When two karaf containers are started locally, an exception is displayed at startup. A nicer message would be better.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.7
    • Fix Version/s: 2.2.9, 2.3.0, 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      
      gnodet:~/work/apps/apache-karaf-2.2.8$ bin/karaf 
      Exception in thread "JMX Connector Thread [service:jmx:rmi://0.0.0.0:44444/jndi/rmi://0.0.0.0:1099/karaf-root]" java.lang.RuntimeException: Could not start JMX connector server
      	at org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:233)
      Caused by: java.rmi.server.ExportException: Port already in use: 44444; nested exception is: 
      	java.net.BindException: Address already in use
      	at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
      	at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
      	at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
      	at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
      	at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:188)
      	at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
      	at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:256)
      	at javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:82)
      	at javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:75)
      	at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:388)
      	at org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:231)
      Caused by: java.net.BindException: Address already in use
      	at java.net.PlainSocketImpl.socketBind(Native Method)
      	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
      	at java.net.ServerSocket.bind(ServerSocket.java:328)
      	at java.net.ServerSocket.<init>(ServerSocket.java:194)
      	at java.net.ServerSocket.<init>(ServerSocket.java:106)
      	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:27)
      	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:333)
      	at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)
      	at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)
      	... 10 more
              __ __                  ____      
             / //_/____ __________ _/ __/      
            / ,<  / __ `/ ___/ __ `/ /_        
           / /| |/ /_/ / /  / /_/ / __/        
          /_/ |_|\__,_/_/   \__,_/_/         
      
        Apache Karaf (2.2.8)
      
      Hit '<tab>' for a list of available commands
      and '[cmd] --help' for help on a specific command.
      Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf.
      
      karaf@root> 
      

      Catching this exception and displaying a nicer and more informative message would be a good idea.

      1. karaf-2.3_1574.diff
        2 kB
        Heath Kesler
      2. karaf-3.0_1574.diff
        2 kB
        Heath Kesler

        Activity

        Guillaume Nodet created issue -
        Guillaume Nodet made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Heath Kesler made changes -
        Attachment karaf-3.0_1574.diff [ 12539417 ]
        Freeman Fang made changes -
        Assignee Freeman Fang [ ffang ]
        Heath Kesler made changes -
        Attachment karaf-3.0_1574.diff [ 12539417 ]
        Heath Kesler made changes -
        Attachment karaf-3.0_1574.diff [ 12539669 ]
        Heath Kesler made changes -
        Attachment karaf-2.3_1574.diff [ 12539737 ]
        Freeman Fang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.9 [ 12321741 ]
        Fix Version/s 2.3.0 [ 12320554 ]
        Fix Version/s 3.0.0 [ 12316040 ]
        Resolution Fixed [ 1 ]
        Jamie goodyear made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Freeman Fang
            Reporter:
            Guillaume Nodet
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development