A1 Event Handler Issues
Fix A1 Event Handler failures such as mail generation errors and startup problems.
Below are the troubleshooting of A1 Event Handler issues:
- Mails Failed to Generate
- Event Handler Not Starting
For reference:
The following section contains basic Linux commands: Basic Commands
Mails Failed to Generate#
Mails are not generating and the below error is displayed in plugin logs.
2023-05-04 17:24:42.162 [A1CacheUpdater STARTING] ERROR
c.a.a.p.n.config.RedisConfiguration:50 - Error while creating redis
cluster. Details: Hosts:[redis-node1.example:7001, redis-
node1.example:7002, redis-node1.example:7003, redis-
node1.example:7004, redis-node1.example:7005, redis-
node1.example:7006], useSSL:true, username:
io.lettuce.core.RedisConnectionException: Unable to establish a
connection to Redis Cluster
Also, we can see the below warning in A1EH logs.
2023-05-04 17:24:42.125 [lettuce-nioEventLoop-4-2] WARN
io.netty.channel.ChannelInitializer:151 - Failed to initialize a
channel. Closing: [id: 0x8b35a1e9]
java.lang.NoSuchMethodError:
io.netty.handler.ssl.SslContextBuilder.keyStoreType(Ljava/lang/String
;)Lio/netty/handler/ssl/SslContextBuilder;
at
io.lettuce.core.SslOptions.createSslContextBuilder(SslOptions.java:6
27)
at
io.lettuce.core.SslConnectionBuilder$SslChannelInitializer.initializ
eSSLEngine(SslConnectionBuilder.java:164)
at
io.lettuce.core.SslConnectionBuilder$SslChannelInitializer.initChann
el(SslConnectionBuilder.java:147)
at
io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.j
ava:113)
at
io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.
java:105)
at
io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultCha
nnelPipeline.java:606)
at
io.netty.channel.DefaultChannelPipeline.access$000(DefaultChannelPip
eline.java:46)
at
io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.exec
ute(DefaultChannelPipeline.java:1412)
at
io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandle
rs(DefaultChannelPipeline.java:1131)
at
io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(D
efaultChannelPipeline.java:656)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractCh
annel.java:510)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractC
hannel.java:423)
at
io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChanne
l.java:482)
at
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractE
ventExecutor.java:163)
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(Singl
eThreadEventExecutor.java:403)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThrea
dEventExecutor.java:858)
at
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorat
or.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:748)
If the jars in the plugins folder have major version differences, the above error is displayed.
In the plugins folder, they kept the forensic and notification plugins jar of V1.2.1.
While the UTP jar was 1.4.0. version. This has led to a conflict of dependencies due to which the above error and warning is displayed.
Solution :
Remove utp jar and restart the service post which above error and warning will be resolved.
Event Handler Not Starting#
After deploying appsone-event-handler:2.0.0-SNAPSHOT , the Event Handler was not starting.
RCA: Parameters supported in Java 11 were not supported in Java 8.
Solution : Update service/a1eventhandler/jvmparameters to:
-XX:+UseContainerSupport -Dio.netty.tryReflectionSetAccessible=true