同一台机器上Haproxy和KeyCloak的问题
我有一个KeyCloak(15.0.2)的实例和同一台计算机上的Haproxy(IP = 10.0.0。)和另一台机器上的其他keyCloak实例(10.0.0.2)。 两个KeyCloak实例均由独立ha.xml配置。 我的haproxy.cfg如下所示:
global
log 127.0.0.1 local0
log stdout format raw local0
maxconn 4000
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend http_web
bind 10.0.0.1:80
mode http
default_backend Keycloak
option httplog
option logasap
backend Keycloak
balance roundrobin
mode http
server keycloak1 10.0.0.1:8080 check
server keycloak2 10.0.0.2:8080 check
server keycloak3 10.0.0.2:8180 check
当我运行haproxy时,在10.0.0.1上的keycloak实例(同一台机器带有haproxy)悬挂下来的警告:
警告&nbsp; [org.xnio 。 套接字 接受 失败, 备份 <> < Strong> 250 毫秒: java.net.socketException: 无效 参数
&nbsp; 警告&nbsp; [org.jboss.modcluster] (ServerService thread Pool -76) modcluster000033: 失败 to 中断 插座 接收。: java.io.ioexception: 不能 分配 请求 地址,
以便服务器以10.0.0.1:80(Haproxy)运行,无法正常工作。下行显示了Haproxy日志:
10.0.0.1:21703 [12:59:24.338] /0/0 0/0“”
10.0.0.1:21703 [12:59:24.338] http_web http_web/-1/-1/-1/-1/-1/ +10002 408 +0-- cr- 2/2/2/0/0/0 0/0 0/0“”
,当我停止10.0.0.0.1 keycloak实例时其他2个实例正常工作。
有人对我如何解决这个问题有任何建议吗?
I have an instance of Keycloak(15.0.2) and a HAproxy on the same machine (IP=10.0.0.) and 2 other instances of Keycloak on another machine (10.0.0.2).
Both of the Keycloak instances are configured by standalone-ha.xml.
My haproxy.cfg in like below:
global
log 127.0.0.1 local0
log stdout format raw local0
maxconn 4000
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend http_web
bind 10.0.0.1:80
mode http
default_backend Keycloak
option httplog
option logasap
backend Keycloak
balance roundrobin
mode http
server keycloak1 10.0.0.1:8080 check
server keycloak2 10.0.0.2:8080 check
server keycloak3 10.0.0.2:8180 check
When I run my HAproxy, the Keycloak instance on 10.0.0.1 (same machine with HAproxy) suspend with the below warnings:
WARN [org.xnio.nio] (default Accept) XNIO008001: Socket accept failed, backing off for 250 milliseconds: java.net.SocketException: Invalid argument
WARN [org.jboss.modcluster] (ServerService Thread Pool -- 76) MODCLUSTER000033: Failed to interrupt socket reception.: java.io.IOException: Can't assign requested address
So that the server runs on 10.0.0.1:80 (HAproxy) will not work properly. The below line shows the HAproxy logs:
10.0.0.1:21703 [12:59:24.338] http_web http_web/ -1/-1/-1/-1/+10002 408 +0 - - cR-- 2/2/0/0/0 0/0 ""
10.0.0.1:21703 [12:59:24.338] http_web http_web/ -1/-1/-1/-1/+10002 408 +0 - - cR-- 2/2/0/0/0 0/0 ""
And when I stop the 10.0.0.1 Keycloak instance the other 2 instances work properly.
Does anyone have any suggestions on how I can solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看您的前端配置。行“ default_backend”似乎是指未定义的后端。尝试使用有效的后端名称来修复它
look at your front-end configuration. The line "default_backend" seems to refer to an undefined backend. Try to fix it with a valid back-end name