gpt4 book ai didi

在 istio 网格中运行时出现 Redis 断管错误

转载 作者:可可西里 更新时间:2023-11-01 11:24:17 26 4
gpt4 key购买 nike

当我在 Kubernetes 集群中运行客户端时,与 redis 的连接正常,但在 istio 网格中运行时出现“管道损坏”错误

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe
at redis.clients.jedis.Connection.flush(Connection.java:334)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:263)
at redis.clients.jedis.Jedis.exists(Jedis.java:179)
at com.swift.ems.microservices.CreateSessionServer$AuthServiceImpl.createSessionAuth(CreateSessionServer.java:59)
at com.swift.ems.microservices.AuthServiceGrpc$MethodHandlers.invoke(AuthServiceGrpc.java:204)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:216)
at redis.clients.jedis.Connection.flush(Connection.java:331)
... 12 more
ERROR ConnectingSep 12, 2018 9:04:19 PM io.grpc.internal.SerializingExecutor run
SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed@525a867b
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe
at redis.clients.jedis.Connection.flush(Connection.java:334)
at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:257)
at redis.clients.jedis.Connection.getBulkReply(Connection.java:248)
at redis.clients.jedis.Jedis.get(Jedis.java:153)
at com.swift.ems.redis.SessionHandler.getStatus(SessionHandler.java:61)
at com.swift.ems.microservices.CreateSessionServer$AuthServiceImpl.createSessionAuth(CreateSessionServer.java:74)
at com.swift.ems.microservices.AuthServiceGrpc$MethodHandlers.invoke(AuthServiceGrpc.java:204)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:216)
at redis.clients.jedis.Connection.flush(Connection.java:331)
... 14 more

我相信它需要给更多的连接时间但不确定,在此先感谢。

最佳答案

好吧,Istio 阻止了与 redis 的连接,因此创建了一个服务条目并且它起作用了! https://istio.io/blog/2018/egress-tcp/#mesh-external-service-entry-for-an-external-mysql-instance

关于在 istio 网格中运行时出现 Redis 断管错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52305324/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com