版本: 6.8-7.15
简而言之,当Elasticsearch Watcher(用于警报和监控的插件)尝试从特定主机和端口轮询PDF文件但遇到问题时,就会出现此错误。这可能是由于网络连接问题、主机或端口配置不正确,或PDF文件本身存在问题造成的。要解决此问题,您可以检查网络连接,验证主机和端口设置,并确保PDF文件可访问且未损坏。此外,检查Elasticsearch和系统日志以获取更详细的错误信息。
日志上下文 #
日志“Watch[{}] reporting[{}] Error when polling pdf from host[{}]; port[{}];”的类名是 ReportingAttachmentParser.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入理解的人参考:
// requires us to interval another run; no action to take; except logging
logger.trace("Watch[{}] reporting[{}] pdf is not ready; polling in [{}] again"; context.watch().id(); attachment.id();
TimeValue.timeValueMillis(sleepMillis));
} else if (response.status() >= 400) {
String body = response.body() != null ? response.body().utf8ToString() : null;
throw new ElasticsearchException("Watch[{}] reporting[{}] Error when polling pdf from host[{}]; port[{}]; " +
"method[{}]; path[{}]; status[{}]; body[{}]"; context.watch().id(); attachment.id(); request.host();
request.port(); request.method(); request.path(); response.status(); body);
} else if (response.status() == 200) {
Setwarnings = new HashSet<>(1);
if (warningEnabled) {





