大湖之子 发表于 2018-11-26 09:34:15

apache [error] (OS 10061)解决方案

  使用apache+mongrel_cluster发布redmine大,是apache的error.log文件过一段时间就汇报一个10061错误:
Apache log代码


[*] ap_proxy_connect_backend disabling worker for (localhost)
[*] (OS 10061)由于目标机器积极拒绝,无法连接。: proxy: HTTP: attempt to connect to 127.0.0.1:3003 (localhost) failed
[*] ap_proxy_connect_backend disabling worker for (localhost)
[*] (OS 10061)由于目标机器积极拒绝,无法连接。: proxy: HTTP: attempt to connect to 127.0.0.1:3003 (localhost) failed
[*] ap_proxy_connect_backend disabling worker for (localhost)
[*] (OS 10061)由于目标机器积极拒绝,无法连接。: proxy: HTTP: attempt to connect to 127.0.0.1:3003 (localhost) failed
[*] ap_proxy_connect_backend disabling worker for (localhost)
[*] (OS 10061)由于目标机器积极拒绝,无法连接。: proxy: HTTP: attempt to connect to 127.0.0.1:3003 (localhost) failed
[*] ap_proxy_connect_backend disabling worker for (localhost)
[*] (OS 10061)由于目标机器积极拒绝,无法连接。: proxy: HTTP: attempt to connect to 127.0.0.1:3003 (localhost) failed
[*] ap_proxy_connect_backend disabling worker for (localhost)
[*] (OS 10061)由于目标机器积极拒绝,无法连接。: proxy: HTTP: attempt to connect to 127.0.0.1:3003 (localhost) failed

  比较郁闷了,查了一下资料,需要修改apache的配置文件,不采用loopback方式,具体修改如下:
  第一步、修改mongrel_cluster.yml文件,将address修改为IP地址,如下图:
  ---
address: 192.168.3.239 //原先未127.0.0.1或localhost
log_file: D:/redmine-1.1.3/log/mongrel.log
port: "3000"
cwd: D:/redmine-1.1.3
environment: production
pid_file: D:/redmine-1.1.3/tmp/pids/mongrel.pid
servers: 4
  第二步、修改apache的conf文件,将其中的balance
  ProxyRequests Off   
   
    BalancerMember http://192.168.3.239:3000//原先未http://localhost:3000
    BalancerMember http://192.168.3.239:3001//原先未http://localhost:3001
    BalancerMember http://192.168.3.239:3002//原先未http://localhost:3002
    BalancerMember http://192.168.3.239:3003//原先未http://localhost:3003

SetEnvIfNoCase Request_URI "BitTorrent" BT
   
    ServerName localhost
    DocumentRoot "d:/redmine-1.1.3/public/"
    ProxyPass /images !
    ProxyPass /javascripts !
    ProxyPass /stylesheets !
    ProxyPass /server-status !
    ProxyPass / balancer://myCluster/
    ProxyPreserveHost on   

  第三步、重启mongrel_cluster
  第四步、重启apache,上午10点修改,观察到下午2:50吗,问题一直没有出现,应该解决了




页: [1]
查看完整版本: apache [error] (OS 10061)解决方案