Aerospike EOF异常反复出现

时间:2017-08-20 13:50:35

标签: java asynchronous aerospike

使用aerospike Java客户端4.0.6

aerospike服务器3.14.1.2

反复获得以下异常:

com.aerospike.client.AerospikeException: java.io.EOFException
    at com.aerospike.client.async.NioEventLoop.processKey(NioEventLoop.java:276)
    at com.aerospike.client.async.NioEventLoop.runCommands(NioEventLoop.java:206)
    at com.aerospike.client.async.NioEventLoop.run(NioEventLoop.java:165)
Caused by: java.io.EOFException
    at com.aerospike.client.async.NioConnection.read(NioConnection.java:112)
    at com.aerospike.client.async.NioCommand.read(NioCommand.java:240)
    at com.aerospike.client.async.NioEventLoop.processKey(NioEventLoop.java:254)
    ... 2 more

即使我按照aerospike网站中提到的异步客户端的步骤进行操作     http://www.aerospike.com/docs/client/java/usage/async

在深度调试时,我发现它来自类:com.aerospike.client.async.NioConnection

方法:

    public boolean read(ByteBuffer byteBuffer) throws IOException {
        while (byteBuffer.hasRemaining()) {
            int len = socketChannel.read(byteBuffer);

            if (len == 0) {         
                // Got would-block.
                return false;
            }

            if (len < 0) {
                // Server has shutdown socket.
                throw new EOFException();
            }
        }`
        return true;
    }

但没有得到任何配置来解决它。

0 个答案:

没有答案