shm_add_upstream error
cyent opened this issue · 1 comments
cyent commented
When I use dyups
modules to delete domain online, then someone request the deleted domain, error.log:
2024/01/18 13:48:50 [alert] 18631#18631: *645282157 socket() failed (97: Address family not supported by protocol) while connecting to upstream, client: 106.55.101.23, server: default, request: "GET /test.js HTTP/1.1", upstream: "http://[240e:d6:6656:19::666:a19]:80/test.js", host: "test.example.com"
2024/01/18 13:48:50 [error] 18631#18631: *645282157 shm_add_upstream::peer failed while logging request, client: 106.55.101.23, server: default, request: "GET /test.js HTTP/1.1", upstream: "http://[240e:d6:6656:19::666:a19]:80/test.js", host: "test.example.com"
2024/01/18 13:48:50 [error] 18631#18631: *645282157 handler::shm_add_upstream() failed while logging request, client: 106.55.101.23, server: default, request: "GET /test.js HTTP/1.1", upstream: "http://[240e:d6:6656:19::666:a19]:80/test.js", host: "test.example.com"
Environment:
- nginx: Tengine/2.4.1 (nginx/1.22.1)
- vts module: nginx-module-vts-0.2.2
nginx.conf
user nginx;
worker_rlimit_nofile 51200;
worker_processes 4;
pid /opt/logs/nginx/nginx.pid;
events {
worker_connections 10240;
use epoll;
}
http {
server_tokens off;
include /opt/test/nginx/conf/mime.types;
log_subrequest off;
default_type text/plain;
log_format main
'$remote_addr - $remote_user [$time_local] $host "$request" '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" ';
access_log /opt/logs/nginx/access.log main;
error_log /opt/logs/nginx/error.log;
lua_code_cache on;
include /opt/test/nginx/conf/upstream.conf;
dyups_shm_zone_size 64m;
dyups_trylock on;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
send_timeout 1m;
client_body_timeout 30;
client_header_timeout 30;
....
vhost_traffic_status_zone shared:vhost_traffic_status:32m;
server {
listen 192.168.1.1:8888;
access_log off;
location /nginx_status {
stub_status on;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
allow 127.0.0.1/32;
deny all;
}
location /vts/metrics {
vhost_traffic_status_display;
vhost_traffic_status_display_format prometheus;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
allow 127.0.0.1/32;
deny all;
}
include /opt/test/nginx/conf/mod/eye/eye-status;
}
server {
listen 192.168.1.1:8080;
location / {
allow 127.0.0.1/32;
deny all;
dyups_interface;
access_log /opt/logs/nginx/dyups_interface-access.log hadoop;
error_log /opt/logs/nginx/dyups_interface-error.log;
}
}
}