![즉각적인 쓰기 실패: SSH를 통해 임베디드 시스템에 연결되는 파이프가 끊어졌습니다.](https://linux55.com/image/6492/%EC%A6%89%EA%B0%81%EC%A0%81%EC%9D%B8%20%EC%93%B0%EA%B8%B0%20%EC%8B%A4%ED%8C%A8%3A%20SSH%EB%A5%BC%20%ED%86%B5%ED%95%B4%20%EC%9E%84%EB%B2%A0%EB%94%94%EB%93%9C%20%EC%8B%9C%EC%8A%A4%ED%85%9C%EC%97%90%20%EC%97%B0%EA%B2%B0%EB%90%98%EB%8A%94%20%ED%8C%8C%EC%9D%B4%ED%94%84%EA%B0%80%20%EB%81%8A%EC%96%B4%EC%A1%8C%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
위에서 언급한 것처럼 SSH를 통해 임베디드 시스템(Angström 및 Kernel 4.1을 실행하는 De0-Nano-SoC FPGA 보드)에 연결하려고 하면 "Write failed: Broken Pipe" 오류가 발생하고 연결이 끊어집니다. 이는 일반적으로 네트워크 문제 및 시간 초과와 관련이 있다고 읽었지만 제 경우에는 즉시 발생했기 때문에 시간 초과 문제가 될 수 없습니다(그렇습니까?).
이 문제에 대한 다른 해결 방법이나 이 오류 메시지의 원인이 될 수 있는 다른 문제를 찾고 있습니다.
업데이트: 다른 방향(임베디드에서 호스트 PC로의 SSH)은 완벽하게 작동합니다!
출력은 다음과 같습니다 tcpdump | grep cyclone5
. juggernaut는 호스트 PC이고 cyclone5는 내장 장치이며 fritz.box는 내 라우터입니다.
16:56:01.080879 IP6 juggernaut.fritz.box.48641 > fritz.box.domain: 3129+ A? cyclone5. (26)
16:56:01.080885 IP6 juggernaut.fritz.box.48641 > fritz.box.domain: 28063+ AAAA? cyclone5. (26)
16:56:01.082341 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [S], seq 1263535780, win 28640, options [mss 1432,sackOK,TS val 932516 ecr 0,nop,wscale 7], length 0
16:56:01.083400 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [S.], seq 983702311, ack 1263535781, win 28400, options [mss 1432,sackOK,TS val 55053 ecr 932516,nop,wscale 7], length 0
16:56:01.083410 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [.], ack 1, win 224, options [nop,nop,TS val 932516 ecr 55053], length 0
16:56:01.083528 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 1:40, ack 1, win 224, options [nop,nop,TS val 932516 ecr 55053], length 39
16:56:01.084584 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 40, win 222, options [nop,nop,TS val 55053 ecr 932516], length 0
16:56:01.117746 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 1:22, ack 40, win 222, options [nop,nop,TS val 55056 ecr 932516], length 21
16:56:01.117773 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [.], ack 22, win 224, options [nop,nop,TS val 932525 ecr 55056], length 0
16:56:01.118222 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [.], seq 40:1460, ack 22, win 224, options [nop,nop,TS val 932525 ecr 55056], length 1420
16:56:01.118415 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 1460:2008, ack 22, win 224, options [nop,nop,TS val 932525 ecr 55056], length 548
16:56:01.118667 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2008, win 253, options [nop,nop,TS val 55056 ecr 932525], length 0
16:56:01.121526 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 22:934, ack 2008, win 253, options [nop,nop,TS val 55057 ecr 932525], length 912
16:56:01.123158 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2008:2056, ack 934, win 246, options [nop,nop,TS val 932526 ecr 55057], length 48
16:56:01.159565 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2056, win 253, options [nop,nop,TS val 55061 ecr 932526], length 0
16:56:01.164976 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 934:1214, ack 2056, win 253, options [nop,nop,TS val 55061 ecr 932526], length 280
16:56:01.167861 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2056:2072, ack 1214, win 261, options [nop,nop,TS val 932538 ecr 55061], length 16
16:56:01.168671 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2072, win 253, options [nop,nop,TS val 55061 ecr 932538], length 0
16:56:01.168678 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2072:2116, ack 1214, win 261, options [nop,nop,TS val 932538 ecr 55061], length 44
16:56:01.169453 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2116, win 253, options [nop,nop,TS val 55061 ecr 932538], length 0
16:56:01.169760 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 1214:1258, ack 2116, win 253, options [nop,nop,TS val 55062 ecr 932538], length 44
16:56:01.169857 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2116:2176, ack 1258, win 261, options [nop,nop,TS val 932538 ecr 55062], length 60
16:56:01.209580 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2176, win 253, options [nop,nop,TS val 55066 ecr 932538], length 0
16:56:01.491968 IP6 fritz.box.domain > juggernaut.fritz.box.49687: 37977* 1/1/3 PTR cyclone5.fritz.box. (208)
16:56:03.119066 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 1258:1334, ack 2176, win 253, options [nop,nop,TS val 55256 ecr 932538], length 76
16:56:03.119134 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2176:2252, ack 1334, win 261, options [nop,nop,TS val 933025 ecr 55256], length 76
16:56:03.119954 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2252, win 253, options [nop,nop,TS val 55257 ecr 933025], length 0
16:56:03.122701 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 1334:1394, ack 2252, win 253, options [nop,nop,TS val 55257 ecr 933025], length 60
16:56:03.159841 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [.], ack 1394, win 261, options [nop,nop,TS val 933036 ecr 55257], length 0
16:56:11.034026 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2252:2328, ack 1394, win 261, options [nop,nop,TS val 935004 ecr 55257], length 76
16:56:11.069809 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2328, win 253, options [nop,nop,TS val 56052 ecr 935004], length 0
16:56:11.165970 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 1394:1438, ack 2328, win 253, options [nop,nop,TS val 56061 ecr 935004], length 44
16:56:11.165983 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [.], ack 1438, win 261, options [nop,nop,TS val 935037 ecr 56061], length 0
16:56:11.166024 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2328:2404, ack 1438, win 261, options [nop,nop,TS val 935037 ecr 56061], length 76
16:56:11.166816 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [.], ack 2404, win 253, options [nop,nop,TS val 56061 ecr 935037], length 0
16:56:11.167921 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [P.], seq 1438:1466, ack 2404, win 253, options [nop,nop,TS val 56061 ecr 935037], length 28
16:56:11.167985 IP6 juggernaut.fritz.box.59915 > cyclone5.fritz.box.ssh: Flags [P.], seq 2404:2508, ack 1466, win 261, options [nop,nop,TS val 935038 ecr 56061], length 104
16:56:11.173648 IP6 cyclone5.fritz.box.ssh > juggernaut.fritz.box.59915: Flags [R.], seq 1466, ack 2508, win 253, options [nop,nop,TS val 0 ecr 935038], length 0
답변1
네트워크 문제는 아닌 것 같습니다. tcpdump에 트래픽 흐름이 있습니다. SSH 서버 연결이 끊어진 것 같습니다. 때로는 시간/공간 등을 절약하기 위해 일부 단순화된 SSH 서버가 임베디드 시스템에서 실행됩니다.
1) SSH 서버 측(예: 내장 장치)에서 로그를 봅니다. 뭔가가 있어야합니다.
2) SSH 클라이언트에서 자세한 정보 표시(일반적으로 ssh -vvv)를 활성화합니다.
답변2
귀하의 문제는 99% 네트워크와 관련되어 있다고 생각합니다. 하지만 1%만 고려하면... 귀하의 OS가 플래시 메모리에서 실행되고 있습니까?
USB 및 SD 카드 기반 설치를 수행할 때 비슷한 문제가 발생했습니다. 때때로 시스템이 불안정해지고 RO를 다시 설치한 후 첫 번째 증상은 동일한 오류 출력과 함께 SSH 연결에 실패하는 것입니다. 운이 좋게도 기존 SSH 세션을 유지할 수 있으면 다른 서버에 대한 SSH 연결을 포함하여 내 컴퓨터에서 거의 잘 작동할 수 있습니다.