Linuxがローカルポートを割り当てられない

Linuxがローカルポートを割り当てられない

nginxエラーは次のとおりです。

2017/10/19 10:47:40 [crit] 41689#0: *23414459 connect() to 127.0.0.1:1234 failed (99: Cannot assign requested address) while connecting to upstream, client: 10.0.0.1, server: example.com, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:1234/", host: "www.example.com"

これは、nginxがアップストリーム接続を試みるときにローカルポートを要求できないことを意味します。しかし、この問題は、すべてのIPのローカルポートをすべて使用したときに発生することがわかりました。以下を確認してください:

Thu Oct 19 10:47:40 CST 2017
54997 <- system wide local ports used. 54997 is the max for my server, here nginx begin reporting errors
22.140.119.4 44543 <- local ports used for public ip
127.0.0.1 19978    <- local ports used for 127.0.0.1

それで、私の質問はループバックIPのローカルポートが19978個しかないので、割り当てが失敗するのはなぜですか?

システムメッセージ

nginx: openresty/1.11.2.1
kernel: Linux 4.9
distro: Ubuntu 14.04

ベストアンサー1

おすすめ記事