Keepalived v1.2.13

Hi!

I'm trying to build an IP failover service for our servers, but I cannot set up keepalived. I'm using version 1.2.13 (on ubuntu 14.04) from ppa:keepalived/stable. My current config is structured like this (it is generated for every host automatically with ansible):

vrrp_instance VI_1 {
  state {{ keepalived_state }}
  interface {{ keepalived_interface }}
  virtual_router_id {{ keepalived_router }}
  priority {{ keepalived_priority }}
  nopreemt
  advert_int {{ keepalived_advert_interval }}
  authentication {
    auth_type PASS
    auth_pass {{ keepalived_pass }}
  }
  unicast_src_ip {{ ip }}
  unicast_peer {
    {% for host in groups.proxies %}
    {% if hostvars[host].ip != ip %}{{ hostvars[host].ip }}{% endif %}
    {% endfor %}
  }
  virtual_ipaddress {
    {{ keepalived_ip }}
  }
}

If i try to start the keepalived service, it enters into an infinite loop, repeating this:

Oct 15 14:29:25 sophie-dee Keepalived_healthcheckers[14786]: Initializing ipvs 2.6
Oct 15 14:29:25 sophie-dee Keepalived_healthcheckers[14786]: IPVS: Can't initialize ipvs: Protocol not available
Oct 15 14:29:25 sophie-dee Keepalived[28774]: Healthcheck child process(14786) died: Respawning
Oct 15 14:29:25 sophie-dee Keepalived[28774]: Starting Healthcheck child process, pid=14790
Oct 14 14:40:57 sophie-dee modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.1.5-x86_64-linode61/modules.dep.bin'
Oct 15 14:29:25 sophie-dee Keepalived_healthcheckers[14790]: Initializing ipvs 2.6
Oct 15 14:29:25 sophie-dee Keepalived_healthcheckers[14790]: IPVS: Can't initialize ipvs: Protocol not available
Oct 15 14:29:25 sophie-dee Keepalived[28774]: Healthcheck child process(14790) died: Respawning
Oct 15 14:29:25 sophie-dee Keepalived[28774]: Starting Healthcheck child process, pid=14794
Oct 14 14:40:57 sophie-dee modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.1.5-x86_64-linode61/modules.dep.bin'
Oct 15 14:29:25 sophie-dee Keepalived_healthcheckers[14794]: Initializing ipvs 2.6
Oct 15 14:29:25 sophie-dee Keepalived_healthcheckers[14794]: IPVS: Can't initialize ipvs: Protocol not available
Oct 15 14:29:25 sophie-dee Keepalived[28774]: Healthcheck child process(14794) died: Respawning
Oct 15 14:29:25 sophie-dee Keepalived[28774]: Starting Healthcheck child process, pid=14798
Oct 14 14:40:57 sophie-dee modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.1.5-x86_64-linode61/modules.dep.bin'
Oct 15 14:29:25 sophie-dee Keepalived_healthcheckers[14798]: Initializing ipvs 2.6

It seems that the ipvs module is not loaded (the loop is caused by this bug): lsmod | grep ipvs shows nothing, modprobe ip_vs errors with this:

modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.1.5-x86_64-linode61/modules.dep.bin'

I've tried this:

$ sudo -s
# cd /lib/modules/`uname -r`
# depmod

but it does not resolves the issue… Any ideas?

2 Replies

Looks like this is not built into the standard Linode kernel:

# zgrep IP_VS /proc/config.gz
# CONFIG_IP_VS is not set

I would suggest running a distribution-supplied kernel and loading the necessary module.

Sorry for replying to an old thread. If you're just using keepalived to manage IP addresses (i.e. you're not using the virtualserver or lvssyncdaemon features), it's possible to run it under a Linode kernel by disabling LVS/IPVS features. Simply pass in the –vrrp (or -P) option on the command-line (add it to DAEMONARGS in /etc/default/keepalived in Debian/Ubuntu) and you'll be good to go!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct