bridge related: not working between source server and target server from a Vitual machine
ohmygod Dec 23, 2013 1:38 AMThe bridge is working well between two servers on same machine, but not working when I use a target server which is a Vitual machine running in source server.
The error message from target server:
2013-12-22 22:06:12,687;[MSC service thread 1-1];ERROR;org.hornetq.core.server;HQ224002: Failure in initialisation: org.jboss.netty.channel.ChannelException: Failed to bind to: /192.168.1.2:5447 at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) at org.hornetq.core.remoting.impl.netty.NettyAcceptor.startServerChannels(NettyAcceptor.java:505) at org.hornetq.core.remoting.impl.netty.NettyAcceptor.start(NettyAcceptor.java:458) at org.hornetq.core.remoting.server.impl.RemotingServiceImpl.start(RemotingServiceImpl.java:256) at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1542) at org.hornetq.core.server.impl.HornetQServerImpl.access$1300(HornetQServerImpl.java:164) at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingLiveActivation.run(HornetQServerImpl.java:2498) at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:416) at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:464) at org.jboss.as.messaging.jms.JMSService.start(JMSService.java:74) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.net.BindException: Cannot assign requested address: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383) at java.net.ServerSocket.bind(ServerSocket.java:328) at org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink.bind(OioServerSocketPipelineSink.java:128) at org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink.handleServerSocket(OioServerSocketPipelineSink.java:79) at org.jboss.netty.channel.socket.oio.OioServerSocketPipelineSink.eventSunk(OioServerSocketPipelineSink.java:53) at org.jboss.netty.channel.Channels.bind(Channels.java:561) at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:189) at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:382) at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:170) at org.jboss.netty.channel.socket.oio.OioServerSocketChannel.<init>(OioServerSocketChannel.java:78) at org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory.newChannel(OioServerSocketChannelFactory.java:127) at org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory.newChannel(OioServerSocketChannelFactory.java:87) at org.jboss.netty.bootstrap.ServerBootstrap.bindAsync(ServerBootstrap.java:329) at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:266) ... 14 more
Another error message in source server:
2013-12-23 14:07:16,941;[Old I/O client worker ([id: 0xa1f1a0d2, /192.168.1.2:59223 => /192.168.1.4:5447])];ERROR;org.hornetq.core.client;HQ214036: Failed to decode packet: java.lang.IllegalArgumentException: HQ119074: Invalid type: 0 at org.hornetq.core.protocol.core.impl.PacketDecoder.decode(PacketDecoder.java:427) at org.hornetq.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:64) at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:485) at org.hornetq.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1658) at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:72) at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:281) 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:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.oio.OioWorker.process(OioWorker.java:71) at org.jboss.netty.channel.socket.oio.AbstractOioWorker.run(AbstractOioWorker.java:73) at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:51) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:175) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)
Settings on source server:
<connectors> <netty-connector name="netty" socket-binding="messaging"/> <netty-connector name="netty-throughput" socket-binding="messaging-throughput"> <param key="batch-delay" value="50"/> </netty-connector> <in-vm-connector name="in-vm" server-id="0"/> <connector name="remote-connector"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class> <param key="host" value="192.168.1.4"/> <param key="port" value="5447"/> </connector> </connectors>
192.168.1.4 is the ip address of the VM server.
settings on target server from the VM:
<acceptors> <netty-acceptor name="netty" socket-binding="messaging"/> <n etty-acceptor name="netty-throughput" socket-binding="messaging-throughput"> <param key="batch-delay" value="50"/> <param key="direct-deliver" value="false"/> </netty-acceptor> <in-vm-acceptor name="in-vm" server-id="0"/> <acceptor name="remote-connector"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> <param key="host" value="192.168.1.2"/> <param key="port" value="5447"/> </acceptor> </acceptors>
192.168.1.2 is the ip address of the source server.
The bridge works fine on the same machine (two servers) if the "<param key="host" value="192.168.1.x"/>" is not configured.