我在同一台服务器上有一个dockerized ignite示例和一个dockerized java程序。ignite有一个由ConfigXML定义的缓存,java通过瘦客户机连接到它,缓存由另一个服务填充。java只会通过get-to-ignite来获取键值。
一切都像预期的那样工作,有时会出现这种错误,重新创建javadocker解决了这个问题。今天java每次都会出现这个错误,在一些负载下运行了几秒钟之后就出现了,我无法解决它。已尝试清空缓存或停止填充缓存的服务。
例外情况如下:
org.apache.ignite.internal.client.thin.ClientProtocolError: Unexpected response ID [4595132326738094176]
at org.apache.ignite.internal.client.thin.TcpClientChannel.processNextResponse(TcpClientChannel.java:284)
at org.apache.ignite.internal.client.thin.TcpClientChannel.receive(TcpClientChannel.java:234)
at org.apache.ignite.internal.client.thin.TcpClientChannel.service(TcpClientChannel.java:171)
at org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:180)
at org.apache.ignite.internal.client.thin.ReliableChannel.affinityService(ReliableChannel.java:242)
at org.apache.ignite.internal.client.thin.TcpClientCache.cacheSingleKeyOperation(TcpClientCache.java:509)
at org.apache.ignite.internal.client.thin.TcpClientCache.get(TcpClientCache.java:111)
at com.abc.rtpm.RtpmClient.getPrice(RtpmClient.java:63)
org.apache.ignite.internal.client.thin.ClientProtocolError: Invalid response size: -1476395008
at org.apache.ignite.internal.client.thin.TcpClientChannel.processNextResponse(TcpClientChannel.java:275)
at org.apache.ignite.internal.client.thin.TcpClientChannel.receive(TcpClientChannel.java:234)
at org.apache.ignite.internal.client.thin.TcpClientChannel.service(TcpClientChannel.java:171)
at org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:180)
at org.apache.ignite.internal.client.thin.ReliableChannel.affinityService(ReliableChannel.java:242)
at org.apache.ignite.internal.client.thin.TcpClientCache.cacheSingleKeyOperation(TcpClientCache.java:509)
at org.apache.ignite.internal.client.thin.TcpClientCache.get(TcpClientCache.java:111)
at com.abc.rtpm.RtpmClient.getPrice(RtpmClient.java:63)
客户端由以下代码创建:
this.cfg = new ClientConfiguration().setAddresses(clientHost + ":" + clientPort);
try {
this.igniteClient = Ignition.startClient(this.cfg);
this.cache = this.igniteClient.getOrCreateCache("rtpm");
}
catch (ClientException e) {
System.err.println(e.getMessage());
}
catch (Exception e){
System.err.format("Unexpected failure: %s\n", e);
}
有几个线程同时调用get。
非常感谢您的帮助。
2条答案
按热度按时间rkkpypqq1#
尽管在瘦客户机文档中它说它支持多线程,但它似乎无法承受负载。
我用一个普通客户解决了这个问题。
6psbrbz92#
我想你用错端口了。你应该使用
10800
或者ClientConnectorConfiguration
.