Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openresty1.17.8.2安装模块后访问status显示server数量为0 #53

Open
Hello-Linux opened this issue Dec 17, 2021 · 0 comments
Open

Comments

@Hello-Linux
Copy link

Hello-Linux commented Dec 17, 2021

openresty版本1.17.8.2,源码编译安装都正常,另外健康检测也运行正常,能正常摘除宕机的主机,但是配置文件启动后访问html页面上显示server一直是0 down 0 total
openresty reload看错误日志提示"2021/12/17 15:21:12 [notice] 14270#14270: [ngx_healthcheck:stream] when init main conf. upstreams num:3"
配置文件

upstream test{
    server 192.168.10.134:8905;
    server 192.168.10.135:8900;
    server 192.168.10.136:8905;
    check interval=20000 rise=1 fall=3 timeout=5000 default_down=false type=http;
    check_http_expect_alive http_2xx http_3xx;
    check_http_send "POST /getPolicyInfo HTTP/1.0\r\n\r\n";
}
server {
    listen 80;
    server_name 192.168.11.43;
    location /status {
        healthcheck_status;
    }
    location / {
        proxy_set_header X-Forwarded-Host $host:$server_port;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_cookie_path / "/; httponly; secure; SameSite=Lax";
        proxy_next_upstream error timeout http_502 http_503 http_504 http_500 non_idempotent;
        proxy_connect_timeout 5s;
        proxy_read_timeout 300s;
        proxy_send_timeout 300s;
        proxy_pass http://test;
    }
}

2021-12-17 15-14-49 的屏幕截图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant