Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3347

Endpoints created through Endpoint.publish throws Address already in use: bind

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      Deploy the application one at a time once the server is started.

      Show
      Deploy the application one at a time once the server is started.

    Description

      At AS7 server startup, all deployments are deployed in a batch and multiple threads can call createHttpServerEngine. Although the method is synchronized, the behavior is not as expected. The Engine gets created multiple times for the same port (context paths are different) and results in

      Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
      at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerEngine.addHandler(HttpServerEngine.java:103)
      at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerDestination.activate(HttpServerDestination.java:128)
      at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
      at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(AbstractBaseBindingFactory.java:97)
      at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:836)
      at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:341)
      ... 15 more
      Caused by: java.net.BindException: Address already in use: bind
      at sun.nio.ch.Net.bind(Native Method) [:1.6.0_26]
      at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) [:1.6.0_26]
      at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) [:1.6.0_26]
      at org.jboss.sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:112)
      at org.jboss.sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:47)
      at org.jboss.sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:37)
      at org.jboss.com.sun.net.httpserver.HttpServer.create(HttpServer.java:126)
      at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerEngine.addHandler(HttpServerEngine.java:94)

      Attachments

        Activity

          People

            mageshbk_jira Magesh Bojan (Inactive)
            mageshbk_jira Magesh Bojan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: