我正在使用rabbitmq群集。我的消费者通过haproxy连接了这个集群。
消费者提出了通过haproxy连接的以下异常。如果直接连接到节点的消费者不会引发任何异常。
2013-01-08 16:25:09,745 WARN | SimpleAsyncTaskExecutor-1 | o.s.amqp.rabbit.listener.SimpleMessageListenerContainer | Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.io.EOFException
请参阅我的ha-proxy配置。
global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 #chroot /usr/share/haproxy user haproxy group haproxy daemon #debug #quiet defaults log global option dontlognull retries 3 option redispatch maxconn 5000 contimeout 10000 clitimeout 60000 srvtimeout 60000 listen rabbitmq_producer_cluster 0.0.0.0:5672 mode tcp balance roundrobin server rabbit_1 rabbit1:5672 check inter 5000 rise 2 fall 3 server rabbit_2 rabbit2:5672 check inter 5000 rise 2 fall 3 #server rabbit_3 rabbit3:5672 check inter 5000 rise 2 fall 3 listen rabbitmq_consumer_cluster 0.0.0.0:5673 mode tcp balance roundrobin option tcpka server rabbit_1 rabbit1:5672 check inter 5000 rise 2 fall 3 server rabbit_2 rabbit2:5672 backup check inter 5000 rise 2 fall 3 #server rabbit_3 rabbit3:5672 check inter 5000 rise 2 fall 3 listen private_monitoring :8100 mode http option httplog stats enable stats uri /stats stats refresh 5s
答案 0 :(得分:0)
本机连接工厂的超时是多少?尽量确保它不到60秒。