로컬 호스트에 연결할 수 없습니다(High Sierra)

로컬 호스트에 연결할 수 없습니다(High Sierra)

오늘 초 강제 재부팅(충돌) 후 MBP가 높은 시에라를 실행하는 데 어려움을 겪기 시작했습니다. 내 문제는 기본적으로 다음과 같이 요약됩니다.

  • 재부팅 후 lo0 인터페이스(localhost, 127.0.0.1, ::1)에 대한 연결을 설정할 수 없습니다. 을 제외한 모든 요청은 ping무기한 중단되거나 시간 초과됩니다. 이는 http, tcp, Traceroute 등에서 발생합니다.

  • 안전 모드로 부팅하면 문제가 발생하지 않으며 간단한 http 서버를 시작하고 localhost 및 127.0.0.1에서 컬/wget을 실행할 수 있습니다. 일반 모드로 다시 부팅하고 사용자의 모든 로그인 항목을 비활성화했지만 문제는 여전히 남아 있습니다. 방화벽이 비활성화되었습니다.

무슨 일인지 아세요? 나는이 시점에서 헤매고 있습니다.

127.0.0.1 라우팅 가능

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

핑은 잘 나오네요

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 시간 초과

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)

관련 정보