【问题标题】:Wildfly loadbalancer logWildfly 负载均衡器日志
【发布时间】:2020-03-09 00:01:00
【问题描述】:

我有一个设置,前面有一个负载均衡器(负载均衡器配置文件中的 wildly-11),后面有两个服务器节点(wildly-11)。现在我需要负载均衡器日志,它可以提供有关传输到的请求的详细信息哪个节点。谁能解释我们如何让这些日志出现?

【问题讨论】:

    标签: java wildfly load-balancing undertow wildfly-11


    【解决方案1】:

    您可以在 WildFly 配置中为 io.undertow.server.handlers.proxy 包指定 DEBUG 日志级别。 standalone/configuration/standalone-load-balancer.xml 中的示例:

    <logger category="io.undertow.server.handlers.proxy">
       <level name="DEBUG"/>
    </logger>
    

    之后,您将在日志中看到有关请求代理的信息。 示例:

    13:05:06,274 DEBUG [io.undertow.server.handlers.proxy] (default I/O-13) Sending request ClientRequest{path='/xxx-app', method=GET, protocol=HTTP/1.1} to target /127.0.0.1:8009 for exchange HttpServerExchange{ GET /xxx-app request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Accept-Language=[en-US,en;q=0.5], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[...], Connection=[keep-alive], Cookie=[JSESSIONID=B9mIIaGz2QYcPBbODJxvY04wjjRnfSz0r2iYh7VQ.node6], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {}}
    13:05:06,274 DEBUG [io.undertow.server.handlers.proxy] (default I/O-13) Sent request ClientRequest{path='/xxx-app', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /xxx-app request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Accept-Language=[en-US,en;q=0.5], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[...], Connection=[keep-alive], Cookie=[JSESSIONID=B9mIIaGz2QYcPBbODJxvY04wjjRnfSz0r2iYh7VQ.node6], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {}}
    13:05:06,452 DEBUG [io.undertow.server.handlers.proxy] (default I/O-13) Received response ClientResponse{responseHeaders={X-Powered-By=[JSF/1.2], Content-Type=[text/html;charset=UTF-8], Date=[Wed, 13 Nov 2019 10:05:06 GMT]}, responseCode=200, status='OK', protocol=HTTP/1.1} for request ClientRequest{path='/xxx-app', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /xxx-app request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Accept-Language=[en-US,en;q=0.5], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[...], Connection=[keep-alive], Cookie=[JSESSIONID=B9mIIaGz2QYcPBbODJxvY04wjjRnfSz0r2iYh7VQ.node6], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {}}
    

    【讨论】:

      猜你喜欢
      • 2018-06-11
      • 1970-01-01
      • 1970-01-01
      • 2022-06-29
      • 1970-01-01
      • 2021-12-07
      • 2019-05-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多