connect() to 192.168.30.71:8082 failed (99: Cannot assign requested address) while connecting to upstream, client: 114.80.182.136, server: localhost, request: "GET /home/senior HTTP/1.1", upstream: "

 connect() to 192.168.30.71:8082 failed (99: Cannot assign requested address) while connecting to upstream, client: 114.80.182.136, server: localhost, request: "GET /home/senior HTTP/1.1", upstream: "http://192.168.30.71:8082/home/senior", host: "60.174.2

解决方案:

root@controller:~# nano /etc/sysctl.conf
root@controller:~# sysctl -p
vm.overcommit_memory = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_max_tw_buckets = 10000     #after done this: local ports decrease from 26000 to 6000(netstat -tuwanp | awk '{print $4}' | sort | uniq -c | wc -l)
root@controller:~# service nginx restart
 * Restarting nginx nginx                                                                                                                                           [ OK ]
root@controller:~#

原文地址:https://www.cnblogs.com/youran-he/p/9908109.html