我有点怀疑你在刷屏

在flink的sink的invoke方法里面使用RestHighLevelClient的indexAPI写入数据的时候,总是报错

Elasticsearch | 作者 totorobabyfans | 发布于2021年06月09日 | 阅读数:113

java.lang.RuntimeException: Request cannot be executed; I/O reactor status: STOPPED
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:831) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:248) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:251) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:251) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:235) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1514) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1484) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1454) ~[data-audit-photo-history-modify-2.1.jar:?]
at org.elasticsearch.client.RestHighLevelClient.get(RestHighLevelClient.java:742) ~[data-audit-photo-history-modify-2.1.jar:?]
at com.chinaunicom.audit.photo.history.handle.customsink.HbaseConstientModifySink.searchPhotoInfoByTradeIdFromElastcsearch(HbaseConstientModifySink.java:653) ~


653行的错误报的错的自己写的代码是 GetResponse getResponse = highLevelClient.get(getRequest, RequestOptions.DEFAULT);,这行我也看不出来有什么错误。
已邀请:

Charele

赞同来自:

检查一下这个RestHighLevelClient对像是不是close()了。
 
如果你无从查起,那就另外新建一个RestHighLevelClient对像执行一下看看。
匿名用户

匿名用户

赞同来自:

找到原因了,但是在处理数据的过程中创建了无数的连接,这个时候数据还没有处理完成,连接没有被关闭,所以这些连接导致机器的句柄数到达了极限出错了,

要回复问题请先登录注册