xiaokai-wang / nginx-stream-upsync-module

For stream protocol. syncing upstreams from etcd or consul and so on, dynamically updating backend servers attribute, not need to reload nginx for tcp protocol, stream configure.
175 stars 48 forks source link

nginx-stream-upsync-module-1.0.0/src/ngx_stream_upsync_module.c:8:24: 致命错误:ngx_stream.h:没有那个文件或目录 #14

Closed freexp closed 6 years ago

freexp commented 7 years ago

请教一下这是什么问题?

xiaokai-wang commented 7 years ago

麻烦把你的./configure 配置命令贴出来

freexp commented 7 years ago

[root@jsjd-ci nginx-1.11.5]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man nginx-stream-upsync-module-1.0.0 objs README src [root@jsjd-ci nginx-1.11.5]# ./configure --add-module=./nginx-stream-upsync-module-1.0.0

xiaokai-wang commented 7 years ago

try:./configure --with-stream --add-module=./nginx-stream-upsync-module-1.0.0

需要配置stream 模块,本模块是其子模块.

freexp commented 7 years ago

谢谢!另外请问这个模块可以和https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng 一起使用做session粘连吗?

xiaokai-wang commented 7 years ago

应该是没有冲突的,没有试过;你可以试试,有什么问题随时交流.

Thanks!

freexp commented 7 years ago

报了nginx: [emerg] "sticky" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:16,好像不支持? 配置:

stream { upstream sticky_test1 { server 127.0.0.1:11111; upsync 10.0.193.37:8500/v1/kv/upstreams/sticky_test upsync_timeout=6m upsync_interval=500ms upsync_type=consul strong_dependency=off; upsync_dump_path /usr/local/nginx/conf/servers/sticky_test1.conf; sticky; }

server {
    listen 9998;
    proxy_pass sticky_test1;
    }
}

}

xiaokai-wang commented 7 years ago

这个模块只支持http 协议吧,stream 貌似没支持