ローカルホストにアクセスできません (High Sierra)

ローカルホストにアクセスできません (High Sierra)

今日、強制再起動 (クラッシュ) の後、High Sierra を実行している MBP で問題が発生し始めました。私の問題は基本的に次のようになります:

  • 再起動後、lo0 インターフェイス (localhost、127.0.0.1、::1) 上のどのデバイスにも接続を確立できません。 を除くすべてのリクエストは、ping無期限にハングしたり、タイムアウトになったりします。これは、http、tcp、traceroute などで発生します。

  • セーフ モードで起動すると、問題は発生せず、localhost および 127.0.0.1 でシンプルな http サーバーと curl / wget を起動できます。通常モードで起動し直し、ユーザーのすべてのログイン項目を無効にしましたが、問題は解決しません。ファイアウォールは無効です。

何が起こっているのか分かりますか? 現時点では途方に暮れています。

127.0.0.1 ルーティング可能

sw14111@OF060VL39VHTD6D:~$ scutil -r 127.0.0.1
Reachable,Local Address,Directly Reachable Address

Pingは正常に動作します

sw14111@OF060VL39VHTD6D:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.063 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.047 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.117 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.073 ms

カール失敗例

sw14111@OF060VL39VHTD6D:~$ curl -v -x "" localhost:8000
* Rebuilt URL to: localhost:8000/
*   Trying ::1...
* TCP_NODELAY set
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connection failed
* connect to ::1 port 8000 failed: Operation timed out
*   Trying fe80::1...
* TCP_NODELAY set
* Connection failed
* connect to 127.0.0.1 port 8000 failed: Operation timed out
* Connection failed
* connect to fe80::1 port 8000 failed: Operation timed out
* Failed to connect to localhost port 8000: Operation timed out
* Closing connection 0
curl: (7) Failed to connect to localhost port 8000: Operation timed out

トレースルートがタイムアウトしました

traceroute to 127.0.0.1 (127.0.0.1), 64 hops max, 52 byte packets
 1  * * *
 2  * * *
 3  * * *

SYN_SENTリクエストが進行中の場合、常に状態がスタックします。

sw14111@OF060VL39VHTD6D:~$ netstat -an | grep 127.0.0.1
tcp4       0      0  127.0.0.1.49679        127.0.0.1.8000         SYN_SENT

/etc/ホスト

##
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1    localhost
255.255.255.255    broadcasthost
::1 localhost
fe80::1%lo0    localhost

lo0インターフェース

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
    inet 127.0.0.1 netmask 0xff000000
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    nd6 options=201<PERFORMNUD,DAD>

lsofシンプルサーバーの出力

sw14111@OF060VL39VHTD6D:~$ python -m SimpleHTTPServer 18080
Serving HTTP on 0.0.0.0 port 18080 ...

# another terminal
sw14111@OF060VL39VHTD6D:~$ sudo lsof -a  -i -sTCP:LISTEN
Python    2245        sw14111    3u  IPv4 0x8d80c2958887276d      0t0    TCP *:18080 (LISTEN)

関連情報