My server was running great for about a month without reboot. Yesterday, I just thought about what many people said that if a server is running fine, don't try to restart it. If you do, there is a chance that a server won't start back up normally. No one explain why but then, I thought about it and for some reason, I wanted to try to restart it that night. I didn't think I will run into any problem but I was wrong.
After restarted, my server didn't have network connection at all. I can only use my server in front of it. I really had no idea what cause it. I had to try command by command and I found that when I try to restart network with below command:
SSH
/etc/init.d/network restart
I got error message below :
arping : error while loading shared libraries: libresolv.so.2 : cannot open shared object file. No such file or directory Error some other host already use address xxx.xxx.xxx.xxx.
That caused my eth0 to fail to start. At first, I looked for the method to fix the error that some other host already used my IP address. That took me many hours to search and follow many instructions. That didn't help at all.
I then, found that I couldn't use ping, yum or many command with the error of "libresolv.so.2". Now, I've changed my mind and search for "libresolv.so.2". It's a file under /lib64 I found that it's one library in glic It's located under lib64 directory. I thought I can try to reinstall glibc but no, I couldn't. I mounted my DVD and try to yum install from it but it said it's installed.
Now, I just thought that if I can get that "libresolv.so.2", that would be it. So, I downloaded it. "libresolv.so.2" is not really a file, it's a link to another file which is "libresolv-2.5.so". So, I just extracted that file from "glibc.rpm" and replace that file with a new one. (Renamed old one and copied a new one into it.) Try to restart network. Now, I got an error below :
arping : error while loading shared libraries: libc.so.6 : cannot open shared object file. No such file or directory Error some other host already use address xxx.xxx.xxx.xxx.
"libc.so.6" is a link to a file "libc-2.5.so". So, I started by rename "libc-2.5.so" to something else. NOW... this was a big mess. Once I've renamed it, I couldn't use most command like cp, rm, mkdir, ls, yum or anything else. I realized that it's an important file. So, what else can I do? I immediately thought about installation DVD. It may have some recovering mode. So, I tried and found that there is a rescue mode by typing linux rescue.
Just get into that mode. Copy whatever files that you wan to replace the old one. Restart it and that's it. My server was came back to work as normal. Well, everything seems to be very easy for a long story I've wrote. But I think I've said before that I'm new to a linux world. Most of the time, I did many things on CentOS by reading others' instruction. So, I didn't even know if there is a rescue mode in the installation DVD.
cool
Steps
I had exactly the same
I had a simaler issue but only could not ping
If you selinux config changed