Secondary machine in the cluster is not starting (Error creating bean with name 'jmxExporter')

  • KM00750929
  • 06-Feb-2014
  • 19-Feb-2014

Summary

After normal maintenance, nodes on the secondary machine cannot be started. There can be some open sockets, on the primary machine, that might cause this problem, with the secondary machine.

Error

ERROR :main:org.springframework.web.context.ContextLoader:2014/01/27-16:32:39.990 MEZ: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmxExporter' defined in ServletContext resource [/WEB-INF/applicationContext-core.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ppmServiceMessageSender' defined in ServletContext resource [/WEB-INF/applicationContext-backgroundServices.xml]: Cannot resolve reference to bean 'ppmLightServiceJmsTemplate' while setting bean property 'lightServiceJmsTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ppmLightServiceJmsTemplate' defined in ServletContext resource [/WEB-INF/applicationContext-backgroundServices.xml]: Cannot resolve reference to bean 'jmsConnectionFactoryProxy' while setting bean property 'connectionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsConnectionFactoryProxy' defined in ServletContext resource [/WEB-INF/applicationContext-backgroundServices.xml]: Cannot resolve reference to bean 'ppmQueueConnectionFactory' while setting bean property 'targetConnectionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ppmQueueConnectionFactory': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: ConnectionFactory

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)

Cause

Ports on Primary machine are locked/listening to secondary physical machine.

nestat -an 

proved the issue on the primary server by seeing the IP of the secondary and some ports used to listen.


Fix

This requires at minimum the stopping of all nodes.  In addition most likely the port in Windows is not release and requires a restart of the OS.