带有ProxyPass的Apache httpd错误“代理:ap_get_scoreboard_lb”


12

我设置了apache来代理tomcat,但是当我定位页面时却遇到了以下错误。有时会出现空白页或503:

[错误]

[Mon Dec 03 04:58:16 2012] [error] proxy: ap_get_scoreboard_lb(2) failed in child 29611 for worker proxy:reverse
[Mon Dec 03 04:58:16 2012] [error] proxy: ap_get_scoreboard_lb(1) failed in child 29611 for worker https://localhost:8443/
[Mon Dec 03 04:58:16 2012] [error] proxy: ap_get_scoreboard_lb(0) failed in child 29611 for worker http://localhost:8080/

我在虚拟机上配置了两个虚拟主机,如下所示:

[http主机]

<VirtualHost *:80>
  ServerName www.mysite.net
  ServerAlias mysite.net

  ProxyRequests Off
  ProxyPreserveHost On

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyPass / http://localhost:8080/ retry=0
  ProxyPassReverse / http://localhost:8080/ retry=0
</VirtualHost>

[ssl虚拟主机]

<VirtualHost *:443>
        ServerName www.mysite.net
        ServerAlias mysite.net

        ErrorLog /var/log/apache2/error.log

        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

        SSLEngine on
        SSLProxyEngine on
        SSLCertificateFile /etc/apache2/ssl/server.crt
        SSLCertificateKeyFile /etc/apache2/ssl/server.key

        ProxyRequests Off
        ProxyPreserveHost On
        ProxyPass / https://localhost:8443/ retry=0
        ProxyPassReverse / https://localhost:8443/ retry=0

</VirtualHost>

我的系统详细信息是:Apache / 2.2.22(Ubuntu)mod_jk / 1.2.32 mod_ssl / 2.2.22 OpenSSL / 1.0.1 mod proxy_http也已启用。

Answers:


10

似乎在停止然后启动apache和apachectl graceful重新启动(即实际上停止并启动而不是apachectl restart)之间存在区别,如在该站点上发现的:

This is a bit of a guess, and probably wrong, but does stopping and 
starting the server rather than restarting (they're different, 
restarting (including gracefully) doesn't kill the master process) 
help? As I understand it, there are issues in mod_proxy regarding the 
scoreboard size when changes to the config are made between restarts.

1
FWIW apachectl restart还是不够的。我必须做一个apachectl stop; apachectl start以防止发生此错误(也适用于Apache httpd 2.2.2)。
Nicholas Riley 2014年

是的@NicholasRiley这就是我重新启动的意思。在这一点上,我也许应该更加清楚。
黑暗之星2014年

谢谢你 更改正向代理配置,然后重新使用时,我遇到了相同的错误graceful
Anthony Geoghegan
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.