I installed elasticsearch 9.0.3 with docker compose file, running on centos7, x86_64 platform, when I call inference api with:
POST _inference/.elser-2-elasticsearch
{
"input": "What is Elastic?"
}
the elasticsearch backend always return error:
{"@timestamp":"2025-07-03T14:57:14.725Z", "log.level":"ERROR", "message":"[.elser-2-elasticsearch] Error processing results", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[es01][ml_native_inference_comms][T#14]","log.logger":"org.elasticsearch.xpack.ml.inference.pytorch.process.PyTorchResultProcessor","elasticsearch.cluster.uuid":"TjvQKf_RR5CQIzbnxYbAZw","elasticsearch.node.id":"Ma0mBGshSECiqSFURRkd9A","elasticsearch.node.name":"es01","elasticsearch.cluster.name":"rag","error.type":"org.elasticsearch.xcontent.XContentEOFException","error.message":"[3:1] Unexpected end of file","error.stack_trace":"org.elasticsearch.xcontent.XContentEOFException: [3:1] Unexpected end of file\n\tat org.elasticsearch.xcontent.impl@8.17.8/org.elasticsearch.xcontent.provider.json.JsonXContentParser.nextToken(JsonXContentParser.java:62)\n\tat org.elasticsearch.ml@8.17.8/org.elasticsearch.xpack.ml.process.ProcessResultsParser$ResultIterator.hasNext(ProcessResultsParser.java:70)\n\tat org.elasticsearch.ml@8.17.8/org.elasticsearch.xpack.ml.inference.pytorch.process.PyTorchResultProcessor.process(PyTorchResultProcessor.java:105)\n\tat org.elasticsearch.ml@8.17.8/org.elasticsearch.xpack.ml.inference.deployment.DeploymentManager.lambda$startDeployment$2(DeploymentManager.java:180)\n\tat org.elasticsearch.server@8.17.8/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:956)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1575)\nCaused by: com.fasterxml.jackson.core.io.JsonEOFException: Unexpected end-of-input: expected close marker for Array (start marker at [Source: (FileInputStream); line: 2, column: 1])\n at [Source: (FileInputStream); line: 3, column: 1]\n\tat com.fasterxml.jackson.core@2.17.2/com.fasterxml.jackson.core.base.ParserMinimalBase._reportInvalidEOF(ParserMinimalBase.java:585)\n\tat com.fasterxml.jackson.core@2.17.2/com.fasterxml.jackson.core.base.ParserBase._handleEOF(ParserBase.java:535)\n\tat com.fasterxml.jackson.core@2.17.2/com.fasterxml.jackson.core.base.ParserBase._eofAsNextChar(ParserBase.java:552)\n\tat com.fasterxml.jackson.core@2.17.2/com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipWSOrEnd2(UTF8StreamJsonParser.java:3135)\n\tat com.fasterxml.jackson.core@2.17.2/com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipWSOrEnd(UTF8StreamJsonParser.java:3105)\n\tat com.fasterxml.jackson.core@2.17.2/com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:716)\n\tat org.elasticsearch.xcontent.impl@8.17.8/org.elasticsearch.xcontent.provider.json.JsonXContentParser.nextToken(JsonXContentParser.java:59)\n\t... 7 more\n"}
Could anyone help me?