Linux – Server is rebooting unexpectedly, strange kernel messages in log file

kernellinuxtroubleshooting

I have a server running Ubuntu 10.04 that is rebooting several times a day it seems, and I can't figure out why. It doesn't appear to be a graceful reboot either, because some of the services complain about a crash when I look at their logs. I am looking through /var/log/messages and I see a lot of strange kernel statements as follows:

Jul 27 13:28:41 it-admin kernel: [ 5198.213173] r8169: eth0: link up
Jul 27 13:20:38 it-admin kernel: [ 4716.055043] r8169: eth0: link up
Jul 27 13:29:37 it-admin kernel: [ 5253.309017] r8169: eth0: link up
Jul 27 13:30:29 it-admin kernel: [ 5305.593953] r8169: eth0: link up

These are printing out every few seconds as you can see. I've never seen the kernel say this before, so I am wondering if it has something to do with it.

Best Answer

Those error messages correspond to a problem the r8169 driver in some kernels has with some hardware, causing it to repeatedly lose the link (described as "paralysis") only to regain it later, usually resulting in connection issues. Ubuntu has a bug report for it for an older version closed unresolved at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/378907.

A kernel upgrade may make it go away, and has successfully solved the problem for some, and there is some discussion of a fix that has supposedly worked at http://adam.rosi-kessel.org/weblog/2008/06/21/a-much-simpler-fix-for-the-r8169-link-down-problem, but on my (Debian Unstable) system with a quite recent 2.6.3x kernel the only reliable way to fix the problem was to install Realtek's own third-party driver for their hardware, loading under the name 8168, which does not have this problem. I would try those things in that order.

I'm not sure how this problem could relate to unexpected reboots. The messages might be unrelated to your original problem of restarts, it could be taking a particularly serious turn on your machine, or you might have similar symptoms but an entirely different problem to this one.