nginx-stream-upsync-module
nginx-stream-upsync-module copied to clipboard
无法获取etcd的数据信息
版本:1.12.2(也尝试过1.14.2) 编译方式: configure --add-module=./nginx-stream-upsync-module --with-stream 配置: stream { upstream test { server 127.0.0.1:8080 down; upsync 10.120.174.5:2379/v2/keys/test/nginx/upstream2 upsync_timeout=6m upsync_interval=500ms upsync_type=etcd strong_dependency=off; upsync_dump_path /opt/nginx_upstream/flow.test.yidian-inc.com_stream2.conf;
include /opt/nginx_upstream/flow.test.yidian-inc.com_stream2.conf;
}
server {
listen 12345;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass test;
}
}
etcd数据测试: #curl 10.120.174.5:2379/v2/keys/test/nginx/upstream2 {"action":"get","node":{"key":"/test/nginx/upstream2","dir":true,"nodes":[{"key":"/test/nginx/upstream2/10.126.172.17:8080","value":"{"weight":1, "max_fails":2, "fail_timeout":10, "down":0}","modifiedIndex":1110957,"createdIndex":1110957}],"modifiedIndex":1110862,"createdIndex":1110862}}
麻烦帮忙看下哪里有问题?
没看出什么问题了,你可以debug 模式看看日志. server 127.0.0.1:8080 down; 应该放到flow.test.yidian-inc.com_stream2.conf 文件里