Monday, February 29, 2016

HornetQ IP/Hostname Conflict

Environment - ESB (as JMS client), HornetQ (as JMS broker)

Situation - Configure ESB with HornetQ (Refer doc: )
                  HornetQ in a separate machine/cloud instance
                  Refer HornetQ via its' IP.

Error -

TID: [-1234] [] [2016-02-24 15:30:13,451]  WARN {org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer} -  Inbound JMS endpoint unable to get a connection. {org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer}
TID: [-1234] [] [2016-02-24 15:30:14,451] ERROR {org.wso2.carbon.inbound.endpoint.protocol.jms.factory.JMSConnectionFactory} -  Connection cannot bb establish to the broke. Plese check the broker libs provided. {org.wso2.carbon.inbound.endpoint.protocol.jms.factory.JMSConnectionFactory}

Analysis: Even though this error talking about missing libraries, this is not an issue about libraries. This is about conflicting to handle IP/host name of HornetQ. For HornetQ, there is a special config to give its hostname/IP.

Solution: Must edit "run.sh" in <HornetQ_Home>/bin
             
                There is a commented line as follows:
                
# Use the following line to run with different ports
#export CLUSTER_PROPS="-Djnp.port=1099 -Djnp.rmiPort=1098 -Djnp.host=localhost -Dhornetq.remoting.netty.host=localhost -Dhornetq.remoting.netty.port=5445"
Uncomment it and give IP/hostname to "-Djnp.local" parameter
export CLUSTER_PROPS="-Djnp.port=1099 -Djnp.rmiPort=1098 -Djnp.host=192.*.*.*                  -Dhornetq.remoting.netty.host=localhost -Dhornetq.remoting.netty.port=5445"

Welcome to Bug corner

Hi Technical People,

This is my blog which will summarize bugs which are always create troubles for me. Hope this will be useful to everyone. :) 

Lets find out these lovely bugs :)