Cannot send message event loop is shutting down – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.8

Briefly, this error occurs when an attempt is made to send a message or perform an operation while the event loop, which handles asynchronous tasks in Elasticsearch, is in the process of shutting down. This could be due to an abrupt termination or a system error. To resolve this issue, you can try restarting Elasticsearch, ensuring that all tasks are completed before shutting down the event loop, or debugging to identify and fix any system errors that may be causing the event loop to shut down prematurely.

This guide will help you check for common problems that cause the log ” Cannot send message; event loop is shutting down. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .

Log Context

Log “Cannot send message; event loop is shutting down.” class name is Netty4TcpChannel.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
@Override
public void sendMessage(BytesReference reference; ActionListener<void> listener) {
channel.writeAndFlush(Netty4Utils.toByteBuf(reference); addPromise(listener; channel)); if (channel.eventLoop().isShutdown()) {
listener.onFailure(new TransportException("Cannot send message; event loop is shutting down."));
}
} public Channel getNettyChannel() {
return channel;</void>
@Override public void sendMessage(BytesReference reference; ActionListener<void> listener) { channel.writeAndFlush(Netty4Utils.toByteBuf(reference); addPromise(listener; channel)); if (channel.eventLoop().isShutdown()) { listener.onFailure(new TransportException("Cannot send message; event loop is shutting down.")); } } public Channel getNettyChannel() { return channel;</void>
 @Override
 public void sendMessage(BytesReference reference; ActionListener listener) {
 channel.writeAndFlush(Netty4Utils.toByteBuf(reference); addPromise(listener; channel));  if (channel.eventLoop().isShutdown()) {
 listener.onFailure(new TransportException("Cannot send message; event loop is shutting down."));
 }
 }  public Channel getNettyChannel() {
 return channel;

 

 [ratemypost]

Opster
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.