立即写入失败:通过 SSH 连接到嵌入式系统的管道损坏

立即写入失败:通过 SSH 连接到嵌入式系统的管道损坏

如上所述,当我尝试通过 SSH 连接到我的嵌入式系统(运行 Angström 和 Kernel 4.1 的 De0-Nano-SoC FPGA 开发板)时,我收到“写入失败:管道损坏”错误并断开连接。我读到这通常与网络问题和超时有关,但就我而言,它是立即发生的,因此它不可能是超时问题(可以吗?)。

我正在寻找此问题或可能导致此错误消息的其他问题的其他解决方案。

更新:另一个方向(从嵌入式到主机 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%...您的操作系统是否在闪存上运行?

在进行基于 USB 和 SD 卡的安装时,我遇到了类似的问题。有时系统变得不稳定,重新安装 RO,第一个症状是 ssh 连接不成功,并具有相同的错误输出。当我有幸保持现有的 ssh 会话时,我几乎可以正常地在我的机器上工作,包括 ssh 其他服务器。

相关内容