We help IT Professionals succeed at work.

IPVSADM FATAL inserting ip_vs error in CENTOS 6/RED HAT

Dear experts,

I have centos 6 installed with ipvsadm for load balancing service on my VMware, but when I type following commands I got several errors.

command used:
- # ipvsadm
      error => error inserting ip_vs (/lib/modules/2.6.32-71.29.1.el6.x86_64/kernel/net/netfilter/ipvs/ip_vs.ko): unknown symbol in module, or unknown parameter.

- # modprobe ip_vs
       error=> same as above
- # cat /proc/net/ip-vs
        error: directory of files not found

Kernel version: 2.6.32-71
ipvsadm version: 1.25

I read that ipvsadm must be compiled in the kernel, but how? Do I have to upgrade to a newer kernel, v3.1.4 maybe? Does this 3.1.4 kernel has ipvsadm built/compiled in?
Is there any danger for centos 6 if we upgrade to 3.1.4(this version is not listed on centos site) or older version?

Thanks in advance,

Comment
Watch Question

Top Expert 2011

Commented:
I am running the same kernel as you and the module is included in the kernel package.  I installed the ipvsadm package and was able to use it immediately as expected.

Actually I notice a discrepancy now in your question.

ipvsadm is complaining about kernel version 2.6.32-71.29.1, but you list the version as 2.6.32-71 -- which one is it?  What does uname -a report?  Have you recently yum updated your kernel?  Did you reboot afterwards?

Author

Commented:
Hi papertrip,

sorry, I have kernel version: 2.6.32-71.29.1.el6.x86_64. And I have tried already to upgrade the kernel, but the output is saying that I have the latest version? Strange thing is that the latest version on centos site is:kernel-2.6.32-131.0.15.el6.src.rpm!

Is there a way to upgrade manually the kernel please?

Rgs,

Top Expert 2011

Commented:
Yes you do have the latest version from the CentOS 6 repositories, same as I.

I can't say that compiling 2.6.32-131 from source won't fix your problem, but I can say that it is not the proper solution to your problem.  Stick with the kernel in the repositories unless you have a very good reason not to, and your problem does not fall into that category.

How did you install ipvsadm?  Have you upgraded your kernel since you created that VM and if so did you reboot after?  Do you have any other CentOS 6 VM's and does ipvsadm work normally on them?  Are you certain you are booting into the 2.6.32-71.29.1 kernel?

What is the output of the following commands
yum provides /lib/modules/2.6.32-71.29.1.el6.x86_64/kernel/net/netfilter/ipvs/ip_vs.ko
rpm -qa|grep kernel
ls -l /lib/modules/2.6.32-71.29.1.el6.x86_64/kernel/net/netfilter/ipvs/

Open in new window


I have a "standard" CentOS 6 system with the same kernel as yours and ipvsadm works just fine, we need to try and figure out why yours does not (upgrading the kernel should not be the primary solution).

Top Expert 2011

Commented:
You mentioned VMware in your original question -- are you certain it's not OpenVZ?

Author

Commented:
Hi Papertrip,

to install ipvsadm i ran the following command: "# yum install ipvsadm".

The centos 6 is a fresh installation, there was no upgrade from a previous version. This is first centos server.
When the centos machine was installed I ran the upgrade command for "kernel-devel", after that I rebooted several times.

Yes I'm sure that I'm booting from the right kernel (see screenshot) and it is a VMware not OpenVZ.
 
Please other screenshots for the asked commands.

rgs.
result-booting-kernel.jpg
result-ls-ipvs.jpg
result-rpm-qa-kernel.jpg
result-yum-provides.jpg
Commented:
i saw that ip_vs_dh.ko is missing and this is same for other ipvsadm files. How can I reinstall or copy these files back?

Author

Commented:
Found the solution :).
Top Expert 2011

Commented:
What was the solution?
Commented:
Sorry for late answer :(. The solution was the IPV6 settings. If you disable this IPVSADM will not work.
 

Author

Commented:
Found solution by my self