An error occurred while attempting to start the "OpenNMS:Name=Eventd" service

Hi,

opennms version: 26
OS: CentOS7

When I tried to restart opennms, it get stopped with below error.

/etc/init.d/opennms -v -f start

Starting OpenNMS: Could not connect to the OpenNMS JVM (OpenNMS might not be running or could be starting up or shutting down): Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)]
running ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 191893
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 20480
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 191893
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[0.018s][info][gc] Using G1
[0.618s][info][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 37M->19M(754M) 22.603ms
[0.910s][info][gc] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 51M->20M(754M) 8.727ms
[1.659s][info][gc] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 55M->23M(754M) 5.311ms
[2.347s][info][gc] GC(3) Pause Young (Concurrent Start) (Metadata GC Threshold) 90M->24M(754M) 10.647ms
[2.347s][info][gc] GC(4) Concurrent Cycle
[2.358s][info][gc] GC(4) Pause Remark 25M->25M(754M) 2.182ms
[2.362s][info][gc] GC(4) Pause Cleanup 25M->25M(754M) 0.253ms
[2.363s][info][gc] GC(4) Concurrent Cycle 16.302ms
[DEBUG] System property ‘opennms.library.jicmp’ set to '/usr/lib64/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
[DEBUG] System property ‘opennms.library.jicmp’ set to '/usr/lib64/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
[DEBUG] System property ‘opennms.library.jicmp6’ set to '/usr/lib64/libjicmp6.so. Attempting to load jicmp6 library from this location.
[INFO] Successfully loaded jicmp6 library.
[DEBUG] System property ‘opennms.library.jicmp’ set to '/usr/lib64/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
[DEBUG] System property ‘opennms.library.jicmp6’ set to '/usr/lib64/libjicmp6.so. Attempting to load jicmp6 library from this location.
[INFO] Successfully loaded jicmp6 library.
[3.315s][info][gc] GC(5) Pause Young (Normal) (G1 Evacuation Pause) 127M->26M(754M) 8.199ms
[4.816s][info][gc] GC(6) Pause Young (Concurrent Start) (Metadata GC Threshold) 179M->31M(754M) 19.698ms
[4.816s][info][gc] GC(7) Concurrent Cycle
[4.829s][info][gc] GC(7) Pause Remark 33M->33M(754M) 4.438ms
[4.833s][info][gc] GC(7) Pause Cleanup 33M->33M(754M) 0.259ms
[4.835s][info][gc] GC(7) Concurrent Cycle 18.600ms
[6.742s][info][gc] GC(8) Pause Young (Normal) (G1 Evacuation Pause) 231M->64M(754M) 32.092ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/opt/opennms/lib/org.apache.servicemix.bundles.spring-core-4.2.9.RELEASE_1.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[DEBUG] System property ‘opennms.library.jicmp’ set to '/usr/lib64/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
[DEBUG] System property ‘opennms.library.jicmp’ set to '/usr/lib64/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
[DEBUG] System property ‘opennms.library.jicmp6’ set to '/usr/lib64/libjicmp6.so. Attempting to load jicmp6 library from this location.
[INFO] Successfully loaded jicmp6 library.
[DEBUG] System property ‘opennms.library.jicmp’ set to '/usr/lib64/libjicmp.so. Attempting to load jicmp library from this location.
[INFO] Successfully loaded jicmp library.
[DEBUG] System property ‘opennms.library.jicmp6’ set to '/usr/lib64/libjicmp6.so. Attempting to load jicmp6 library from this location.
[INFO] Successfully loaded jicmp6 library.
[8.941s][info][gc] GC(9) Pause Young (Normal) (G1 Evacuation Pause) 488M->94M(754M) 19.810ms
[12.526s][info][gc] GC(10) Pause Young (Normal) (G1 Evacuation Pause) 467M->105M(754M) 32.437ms
Jul 31, 2020 5:23:57 AM org.hibernate.validator.internal.util.Version
INFO: HV000001: Hibernate Validator 4.3.2.Final
[13.843s][info][gc] GC(11) Pause Young (Concurrent Start) (Metadata GC Threshold) 260M->103M(754M) 26.645ms
[13.843s][info][gc] GC(12) Concurrent Cycle
[13.922s][info][gc] GC(12) Pause Remark 109M->109M(754M) 29.784ms
[13.946s][info][gc] GC(12) Pause Cleanup 115M->115M(754M) 0.301ms
[13.948s][info][gc] GC(12) Concurrent Cycle 104.776ms
[16.966s][info][gc] GC(13) Pause Young (Normal) (G1 Evacuation Pause) 541M->117M(754M) 9.620ms
An error occurred while attempting to start the “OpenNMS:Name=Eventd” service (class org.opennms.netmgt.eventd.jmx.Eventd). Shutting down and exiting.
javax.management.RuntimeMBeanException: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [eventDaemonContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘eventDaemonContext’ defined in URL [jar:file:/opt/opennms/lib/org.opennms.features.events.daemon-26.1.2.jar!/beanRefContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tcpListener’ defined in class path resource [META-INF/opennms/applicationContext-eventDaemon.xml]: Invocation of init method failed; nested exception is java.nio.channels.UnresolvedAddressException
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:829)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:842)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:811)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:277)
at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:206)
at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:154)
at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:94)
at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:173)
at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:150)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:527)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [eventDaemonContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘eventDaemonContext’ defined in URL [jar:file:/opt/opennms/lib/org.opennms.features.events.daemon-26.1.2.jar!/beanRefContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tcpListener’ defined in class path resource [META-INF/opennms/applicationContext-eventDaemon.xml]: Invocation of init method failed; nested exception is java.nio.channels.UnresolvedAddressException
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:404)
at org.opennms.core.spring.BeanUtils.getBeanFactory(BeanUtils.java:80)
at org.opennms.core.spring.BeanUtils.getFactory(BeanUtils.java:132)
at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon$1.run(AbstractSpringContextJmxServiceDaemon.java:103)
at org.opennms.core.logging.Logging.withPrefix(Logging.java:71)
at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon.init(AbstractSpringContextJmxServiceDaemon.java:96)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
… 13 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘eventDaemonContext’ defined in URL [jar:file:/opt/opennms/lib/org.opennms.features.events.daemon-26.1.2.jar!/beanRefContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tcpListener’ defined in class path resource [META-INF/opennms/applicationContext-eventDaemon.xml]: Invocation of init method failed; nested exception is java.nio.channels.UnresolvedAddressException
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:275)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1148)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1064)
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:396)
… 33 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tcpListener’ defined in class path resource [META-INF/opennms/applicationContext-eventDaemon.xml]: Invocation of init method failed; nested exception is java.nio.channels.UnresolvedAddressException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
… 43 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tcpListener’ defined in class path resource [META-INF/opennms/applicationContext-eventDaemon.xml]: Invocation of init method failed; nested exception is java.nio.channels.UnresolvedAddressException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:778)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:843)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:105)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
… 45 more
Caused by: java.nio.channels.UnresolvedAddressException
at java.base/sun.nio.ch.Net.checkAddress(Net.java:130)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:222)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248)
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
… 1 more
2020-07-31 05:24:02,660 ActiveMQ ShutdownHook WARN Unable to register Log4j shutdown hook because JVM is shutting down. Using SimpleLogger

how to resolve this issue?

Thanks,
Mohan

Check the value of the TCPAddress and UDPAddress in $OPENNMS_HOME/etc/etc/eventd-configuration.xml.

To bind to all interfaces, set these to 0.0.0.0 and not *.