Skip to content

not compiled. version nginx 1.12.2 #1

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

Open
danilvoe opened this issue Jan 23, 2018 · 6 comments
Open

not compiled. version nginx 1.12.2 #1

danilvoe opened this issue Jan 23, 2018 · 6 comments
Labels

Comments

@danilvoe
Copy link

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I src/core -I src/event -I src/event/modules -I src/os/unix -I /home/kotin/ngx_stream_upstream_check_module-master -I objs -I src/stream \
	-o objs/src/stream/ngx_stream_upstream_round_robin.o \
	src/stream/ngx_stream_upstream_round_robin.c
src/stream/ngx_stream_upstream_round_robin.c: In function ‘ngx_stream_upstream_init_round_robin’:
src/stream/ngx_stream_upstream_round_robin.c:114:25: error: too few arguments to function ‘ngx_stream_upstream_check_add_peer’
                         ngx_stream_upstream_check_add_peer(cf, us, &server[i].addrs[j]);
                         ^
In file included from src/stream/ngx_stream_upstream_round_robin.c:13:0:
/home/kotin/ngx_stream_upstream_check_module-master/ngx_stream_upstream_check_module.h:10:12: note: declared here
 ngx_uint_t ngx_stream_upstream_check_add_peer(ngx_conf_t *cf,
            ^
src/stream/ngx_stream_upstream_round_robin.c:188:25: error: too few arguments to function ‘ngx_stream_upstream_check_add_peer’
                         ngx_stream_upstream_check_add_peer(cf, us, &server[i].addrs[j]);
                         ^
In file included from src/stream/ngx_stream_upstream_round_robin.c:13:0:
/home/kotin/ngx_stream_upstream_check_module-master/ngx_stream_upstream_check_module.h:10:12: note: declared here
 ngx_uint_t ngx_stream_upstream_check_add_peer(ngx_conf_t *cf,
            ^
make[1]: *** [objs/src/stream/ngx_stream_upstream_round_robin.o] Error 1
make[1]: Leaving directory `/home/kotin/nginx-1.12.2'
make: *** [build] Error 2


not compiled. version nginx 1.12.2
@zhouchangxun
Copy link
Owner

sorry,之前修改之后未做测试,现已修复这个问题。
点击查看细节:8e8c2de

@cucker0
Copy link

cucker0 commented Apr 3, 2018

指向nginx代理进行DNS解析的日志,能解析成功,但看日志是没有剔除掉异常的源站:
2018/04/03 15:08:16 [error] 27013#0: *63 recv() failed (111: Connection refused) while proxying connection, udp client: 172.16.12.19, server: 0.0.0.0:53, upstream: "172.16.7.15:53", bytes from/to client:33/0, bytes from/to upstream:0/33
2018/04/03 15:08:17 [error] 27010#0: *68 recv() failed (111: Connection refused) while proxying connection, udp client: 172.16.12.19, server: 0.0.0.0:53, upstream: "172.16.7.15:53", bytes from/to client:33/0, bytes from/to upstream:0/33
2018/04/03 15:08:17 [error] 27011#0: *71 recv() failed (111: Connection refused) while proxying connection, udp client: 172.16.12.19, server: 0.0.0.0:53, upstream: "172.16.7.15:53", bytes from/to client:33/0, bytes from/to upstream:0/33

@cucker0
Copy link

cucker0 commented Apr 3, 2018

nginx版本:1.12.2,使用ngx_stream_upstream_check_module模块,没有效果,感觉没有自动去检测源站,check_status 也看到不到数据,报500

编译参数:
nginx -V
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.0.2o 27 Mar 2018
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx_1.12.2 --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.42 --with-http_realip_module --with-http_image_filter_module --with-http_gzip_static_module --with-openssl=/usr/local/src/openssl-1.0.2o --with-openssl-opt=enable-tlsext --with-stream --add-module=/usr/local/src/ngx_stream_upstream_check_module/

配置:
stream {
upstream dns_bind {
zone dns_bind_du 64k;
server 172.16.7.14:53;
server 172.16.7.15:53;
check interval=3000 rise=2 fall=5 timeout=5000 default_down=true type=udp;
}

server {
listen 53 udp;

proxy_pass dns_bind;
proxy_timeout 5s;
proxy_responses 1;
error_log logs/dns.log;
}
}

check_status配置
server {
listen 17818;

location /status {
l4check_status html;
}
}

测试情况:
172.16.7.15:53 dns服务关闭

访问 check_status接口
日志:
2018/04/03 15:05:38 [error] 26731#0: *6 stream upstream check module can not find any check server, make sure you've added the check servers, client: 192.168.1.144, server: , request: "GET /status HTTP/1.1", host: "172.16.12.18:17818"
2018/04/03 15:05:39 [error] 26731#0: *7 stream upstream check module can not find any check server, make sure you've added the check servers, client: 192.168.1.144, server: , request: "GET /status HTTP/1.1", host: "172.16.12.18:17818"
2018/04/03 15:05:41 [error] 26729#0: *8 stream upstream check module can not find any check server, make sure you've added the check servers, client: 192.168.1.144, server: , request: "GET /status HTTP/1.1", host: "172.16.12.18:17818"

@cucker0
Copy link

cucker0 commented Apr 3, 2018

访问日志:
2018/04/03 16:40:28 [error] 61697#0: *4 recv() failed (111: Connection refused) while proxying connection, udp client: 172.16.12.19, server: 0.0.0.0:53, upstream: "172.16.7.15:53", bytes from/to client:33/0, bytes from/to upstream:0/33
2018/04/03 16:41:00 [error] 61696#0: *33 recv() failed (111: Connection refused) while proxying connection, udp client: 172.16.12.19, server: 0.0.0.0:53, upstream: "172.16.7.14:53", bytes from/to client:33/0, bytes from/to upstream:0/33
2018/04/03 16:41:00 [error] 61696#0: *33 recv() failed (111: Connection refused) while proxying connection, udp client: 172.16.12.19, server: 0.0.0.0:53, upstream: "172.16.7.15:53"

@cucker0
Copy link

cucker0 commented Apr 3, 2018

http://172.16.12.18:17818/status
报500

@zhouchangxun
Copy link
Owner

@cucker0 你对nginx源码打这个模块的patch了吗

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

No branches or pull requests

3 participants