Tag Archives: Debian

Debian在update时候中断了网络

刚刚给VPS升级了debian,root登录,期间断开了.再次运行apt-get update时候提示

E: Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

这个时候需要找出apt-get这个进城并杀死它.

ps -A | grep apt-get

然后

kill -9 xxxx

再次update时候会提示:

E: dpkg was interrupted, you must manually run ‘sudo dpkg –configure -a’ to correct the problem.

那么只要根据提示

dpkg –configure -a

即可

用SSH恢复备份时候出现的Corrupted MAC on input

因为把一台机器重装了Debian之后要恢复,在备份机上运行

tar czf – mysql| ssh root@重装机IP tar xzf – -C /data

结果出现

Received disconnect from 重装机IP: 2: Corrupted MAC on input.

从字面意思就能开出来是网卡中断,Google了一下,找到了解决方案(未必是最佳的).

apt-get install ethtool

ethtool -k eth0
可以看到过载保护的内容

Offload parameters for eth0:
Cannot get device flags: Operation not supported
Cannot get device GRO settings: Operation not supported
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: off
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: off
large-receive-offload: off
ntuple-filters: off
receive-hashing: off

关闭RX的过载保护

ethtool -K eth0 rx off

然后就没事了.弄完了记得改回来就可以.