6 Replies Latest reply: Apr 16, 2011 11:44 PM by nareshpa RSS

org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445

nareshpa Newbie

I got below spcified exception while satrting server

 

***********************************************************************************

java  -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Dhornetq.config.dir=../config/stand-alone/non-clustered -Djava.util.logging.config.file=../config/stand-alone/non-clustered/logging.properties -Djava.library.path=. -classpath ../lib/twitter4j-core.jar:../lib/netty.jar:../lib/jnpserver.jar:../lib/jnp-client.jar:../lib/jboss-mc.jar:../lib/jboss-jms-api.jar:../lib/hornetq-twitter-integration.jar:../lib/hornetq-spring-integration.jar:../lib/hornetq-logging.jar:../lib/hornetq-jms.jar:../lib/hornetq-jms-client-java5.jar:../lib/hornetq-jms-client.jar:../lib/hornetq-jboss-as-integration.jar:../lib/hornetq-core.jar:../lib/hornetq-core-client-java5.jar:../lib/hornetq-core-client.jar:../lib/hornetq-bootstrap.jar:../config/stand-alone/non-clustered:../schemas/ org.hornetq.integration.bootstrap.HornetQBootstrapServer hornetq-beans.xml

***********************************************************************************

[main] 00:18:43,098 INFO [org.hornetq.integration.bootstrap.HornetQBootstrapServer]  Starting HornetQ Server

[main] 00:18:43,851 WARNING [org.hornetq.core.deployers.impl.FileConfigurationParser]  AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal

[main] 00:18:43,901 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=../data/journal,bindingsDirectory=../data/bindings,largeMessagesDirectory=../data/large-messages,pagingDirectory=../data/paging)

[main] 00:18:43,901 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  Waiting to obtain live lock

[main] 00:18:43,951 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Using NIO Journal

[main] 00:18:43,951 WARNING [org.hornetq.core.server.impl.HornetQServerImpl]  Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.

[main] 00:18:44,101 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  Waiting to obtain live lock

[main] 00:18:44,101 INFO [org.hornetq.core.server.impl.FileLockNodeManager]  Live Server Obtained live lock

[main] 00:18:45,054 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  trying to deploy queue jms.queue.DLQ

[main] 00:18:45,104 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  trying to deploy queue jms.queue.ExpiryQueue

[main] 00:18:45,104 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  trying to deploy queue jms.queue.queue.internals.accounts

[main] 00:18:45,204 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor]  Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5445 for CORE protocol

[main] 00:18:45,204 SEVERE [org.hornetq.core.server.impl.HornetQServerImpl]  Failure in initialisation

org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445

        at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303)

        at org.hornetq.core.remoting.impl.netty.NettyAcceptor.startServerChannels(NettyAcceptor.java:482)

        at org.hornetq.core.remoting.impl.netty.NettyAcceptor.start(NettyAcceptor.java:425)

        at org.hornetq.core.remoting.server.impl.RemotingServiceImpl.start(RemotingServiceImpl.java:227)

        at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1512)

        at org.hornetq.core.server.impl.HornetQServerImpl.access$100(HornetQServerImpl.java:132)

        at org.hornetq.core.server.impl.HornetQServerImpl$SharedStoreLiveActivation.run(HornetQServerImpl.java:356)

        at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:570)

        at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:261)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)

        at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)

        at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)

        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)

        at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)

        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)

        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)

        at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)

        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)

        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:319)

        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:297)

        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)

        at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)

        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.deploy(HornetQBootstrapServer.java:236)

        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.deploy(HornetQBootstrapServer.java:206)

        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:155)

        at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)

        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:116)

        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.main(HornetQBootstrapServer.java:73)

Caused by: java.net.BindException: Address already in use

        at java.net.PlainSocketImpl.socketBind(Native Method)

        at java.net.PlainSocketImpl.bind(Unknown Source)

        at java.net.ServerSocket.bind(Unknown Source)

        at org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink.bind(OioServerSocketPipelineSink.java:137)

        at org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink.handleServerSocket(OioServerSocketPipelineSink.java:88)

        at org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink.eventSunk(OioServerSocketPipelineSink.java:62)

        at org.jboss.netty.channel.Channels.bind(Channels.java:468)

        at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:200)

        at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:348)

        at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:176)

        at org.jboss.netty.channel.socket.oio.OioServerSocketChannel.<init>(OioServerSocketChannel.java:84)

        at org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory.newChannel(OioServerSocketChannelFactory.java:119)

        at org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory.newChannel(OioServerSocketChannelFactory.java:91)

        at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:282)

        ... 42 more

[main] 00:18:45,204 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  HornetQ Server version 2.2.2.Final (super-hornetq-fighter, 122) [43de87a8-659e-11e0-9336-0025900ba945] started

  • 1. org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445
    Andy Taylor Master

    Like the  exception says, something else is already running on that port

  • 2. Re: org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445
    nareshpa Newbie

    I have  a question   in connectors tag we had two connectors (<connectorname="netty">,<connector name="netty-throughput">)both are have same port or different, if both are having same port I got earlier posted exception, now I changed both are different pots working fine, after sending few messages got bellow specified exception.

     

    [Old I/O server worker (parentId: 1678102080, [id: 0x6405ce40, /localhost:5445])] 06:47:53,218 SEVERE [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl]  Failed to decode

    java.lang.IndexOutOfBoundsException

            at org.jboss.netty.buffer.AbstractChannelBuffer.readByte(AbstractChannelBuffer.java:236)

            at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readByte(ChannelBufferWrapper.java:337)

            at org.hornetq.core.protocol.core.impl.PacketDecoder.decode(PacketDecoder.java:169)

            at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:424)

            at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:459)

            at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73)

            at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)

            at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362)

            at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:514)

            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287)

            at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169)

            at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134)

            at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)

            at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362)

            at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:357)

            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)

            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)

            at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:90)

            at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)

            at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)

            at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181)

            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

            at java.lang.Thread.run(Unknown Source)

    [Old I/O server worker (parentId: 1678102080, [id: 0x6405ce40, /localhost:5445])] 06:49:13,448 WARNING [org.hornetq.core.protocol.core.ServerSessionPacketHandler]  Sending unexpected exception to the client

    java.lang.OutOfMemoryError: GC overhead limit exceeded

    Exception in thread "HornetQ Server Shutdown Timer" java.lang.OutOfMemoryError: GC overhead limit exceeded

    Exception in thread "Thread-11 (group:HornetQ-remoting-threads283788351-69635270)" java.lang.OutOfMemoryError: GC overhead limit exceeded

    Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: GC overhead limit exceeded

    [Old I/O server boss ([id: 0x6405ce40, /localhost:5445])] 06:50:57,002 WARNING [org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink]  Failed to accept a connection.

    java.lang.OutOfMemoryError: GC overhead limit exceeded

    [Old I/O server boss ([id: 0x0e56c3cf, /localhost:5455])] 06:51:14,059 WARNING [org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink]  Failed to accept a connection.

    java.lang.OutOfMemoryError: GC overhead limit exceeded

    [Old I/O server worker (parentId: 1678102080, [id: 0x6405ce40, /localhost:5445])] 06:52:56,021 WARNING [org.hornetq.core.protocol.core.ServerSessionPacketHandler]  Sending unexpected exception to the client

    java.lang.OutOfMemoryError: GC overhead limit exceeded

    Exception in thread "Thread-3 (group:HornetQ-scheduled-threads-1384796854)" java.lang.OutOfMemoryError: GC overhead limit exceeded

  • 3. Re: org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445
    Clebert Suconic Master

    It seems like you sent messages without a consumer until you OME. You should configure Paging / blocking  / drop or make sure you have consumers.

  • 4. org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445
    nareshpa Newbie

    here I posted hornetq2.2.2.final/config/stand-alone/non-clustered/hornetq-configuration.xml file,  I was getting earlier posted exception whenever data/journal folder got the total size 1.1 GB

     

     

     

     

    <configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

      <paging-directory>${data.dir:../data}/paging</paging-directory>

      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>

      <journal-directory>${data.dir:../data}/journal</journal-directory>

    <!--  <journal-min-files>100</journal-min-files>  -->

     

      <large-messages-directory>${data.dir:../data}/large-messages</large-messages-directory>

      <journal-sync-transactional>true</journal-sync-transactional>

      

      <journal-sync-non-transactional>true</journal-sync-non-transactional>

      <scheduled-thread-pool-max-size>1024</scheduled-thread-pool-max-size>

      <thread-pool-max-size>2048</thread-pool-max-size>

      <journal-type>NIO</journal-type>

      <journal-max-io>1000</journal-max-io>

    <!--  <journal-buffer-timeout>333333333</journal-buffer-timeout>  -->

     

    <connectors>

    <connector name="netty">

      <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

      <param key="host" value="localhost" />

      <param key="port" value="5445" />

      </connector>

    <connector name="netty-throughput">

      <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

      <param key="host" value="localhost" />

      <param key="port" value="5445" />

      <param key="batch-delay" value="50" />

      </connector>

      </connectors>

    <acceptors>

    <acceptor name="netty">

      <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

      <param key="host" value="localhost" />

      <param key="port" value="5446" />

      </acceptor>

    <acceptor name="netty-throughput">

      <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

      <param key="host" value="192.168.32.61" />

      <param key="port" value="5445" />

      <param key="batch-delay" value="50" />

      <param key="direct-deliver" value="false" />

      </acceptor>

      </acceptors>

    <security-settings>

    <security-setting match="#">

      <permission type="createNonDurableQueue" roles="guest" />

      <permission type="deleteNonDurableQueue" roles="guest" />

      <permission type="consume" roles="guest" />

      <permission type="send" roles="guest" />

      </security-setting>

      </security-settings>

    <address-settings>

    <!-- default for catch all -->

      

    <address-setting match="#">

      <dead-letter-address>jms.queue.DLQ</dead-letter-address>

      <expiry-address>jms.queue.ExpiryQueue</expiry-address>

    <!--   <redelivery-delay>0</redelivery-delay>  -->

     

       <max-size-bytes>-1</max-size-bytes>

      <page-size-bytes>-1</page-size-bytes>

      <message-counter-history-day-limit>10</message-counter-history-day-limit>

    <!--  <address-full-policy>BLOCK</address-full-policy>  -->

     

      <address-full-policy>PAGE</address-full-policy>

      </address-setting>

      </address-settings>

      </configuration>

  • 5. org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445
    Clebert Suconic Master

    You just must consume your messages. A message system is not a Database (although you could configure paging)

     

    You just need to consume messages in your test. Otherwise data will build up on paging and memory.

  • 6. Re: org.jboss.netty.channel.ChannelException: Failed to bind to: /localhost:5445
    nareshpa Newbie

    here I was running parallel both producer and consumer, consumer consuming messages that is working fine. I was not able to understand why data/journal folder size is getting 1.1G B,

     

      in windows for knowing message count using jconsole same like that have any command in Linux.