Request cannot be executed; I/O reactor status: STOPPED] with root cause

时间:2025-02-28 07:08:18

ElasticSearch:Request cannot be executed; I/O reactor status: STOPPED 错误记录

报错中status是STOPPED,也就是被关闭了,大概率是业务程序中多个线程共享restclient,某个线程调用完restclient后关闭了,导致其他线程再去发送请求时报错。
在我的代码中:

SearchResponse searchResponse = restHighLevelClient.search(jd_goods, RequestOptions.DEFAULT);
//        ();

执行完后就关闭了,导致出错。