-
-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kamailio/opensips with keepalived,less than a minute in normal use,VIP is "useless" #2522
Comments
I suspect the problem is:
It doesn't make sense to configure the broadcast address to be the same as the address configured on the interface. |
@pqarmitage But before I used 192.168.15.104/24 brd 192.168.15.255 dev ens192 label ens192:0, and I just tried it, still the same problem |
Your log shows:
Stopping keepalived causes the 192.168.15.104/24 VIP to be removed, which would stop you SIP sessions working. Why is keepalived being stopped? Is it because the kamailio_check.sh script is executing |
As I said before, start the master and backup. At first, the VIP on the master server can be used, but it will become invalid after a few tens of seconds. Then I actively disconnect the keepalived of the master, and the VIP is on the backup, which can be used for a few tens of seconds. |
keepalived and kamailio will not close automatically, and kamailio_check.sh will run normally. If I add a print in the script, it will be printed in the log all the time.
log
|
All that keepalived does in respect of VIPs is it adds and deletes the addresses, and for performance reasons sends gratuitous ARP messages. keepalived does not handle any IP traffic in relation to the VIP. Given the above, there is very little that keepalived is doing in respect of your scenario. So long as the VIP is configured on ens192 on the master system, and the backup system has not added the VIP, then whatever is happening is outside the control of keepalived. I think you need to diagnose yourself why the SIP session stops working on your systems. For example you could manually add You probably need to try tracing what is happening with packets, using wireshark or tcpdump. When the SIP session stops working, where are the packets being dropped, or where are they being forwarded to. Perhaps there is an issue with some firewall configuration. Unfortunately, with the information you have provided, there is nothing more that we can do to help identify the cause of your problem. |
Ok,thank you for answering my question |
@chongmin1 It would be helpful for future reference if you could update this issue with the cause of and solution to the problem, once you have found it. |
Hello,i have sloved this problem.In my intranet environment, 192.168.15.104 is an existing host IP, so this situation occurs. When the local machine cannot ping an IP, this IP can be used as a VIP |
@chongmin1 It's good that you have resolved the problem, and thanks for the update. |
Describe the issue
register two SIP accounts with VIP,they can call and hang up normally.but after 30~40 seconds,they can not call,and register failed,too.
To Reproduce
master and backup configured the same kamailio/opensips & keepalived,startup both the kamailio and keepalived,register two softpthones with VIP.(MicroSIP and eyeBeam)
The two accounts can call and hang up normally,after 30-40 seconds,they can not call,and register failed,too.But if i shutdown master's keepalived,VIP go to the backup,they can register and call ,but after 30~40 seconds,register and call fail again,startup master's keepalived,still the same as before.That is, if the registration fails, change the VIP in the master and backup modes once, and i can register and make calls normally,unless kill all the keepalived.
Expected behavior
call and register should be normal
Keepalived version
Keepalived v2.3.1 (05/24,2024) (and v1.3.5 i have tried)
Copyright(C) 2001-2024 Alexandre Cassen, acassen@gmail.com
Built with kernel headers for Linux 3.10.0
Running on Linux 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020
Distro: CentOS Linux 7 (Core)
configure options: --prefix=/usr/local/keepalived --sysconfdir=/etc/ PKG_CONFIG_PATH=:/usr/local/lib/pkgconfig
Config options: NFTABLES LVS VRRP VRRP_AUTH VRRP_VMAC OLD_CHKSUM_COMPAT INIT=systemd SYSTEMD_NOTIFY
System options: VSYSLOG LIBNL3 RTA_ENCAP RTA_EXPIRES RTA_PREF FRA_SUPPRESS_PREFIXLEN FRA_TUN_ID RTAX_CC_ALGO RTAX_QUICKACK RTA_VIA IFA_FLAGS IPTABLES NET_LINUX_IF_H_COLLISION LIBIPVS_NETLINK IFLA_LINK_NETNSID GLOB_BRACE GLOB_ALTDIRFUNC INET6_ADDR_GEN_MODE SO_MARK
Distro (please complete the following information):
Details of any containerisation or hosted service (e.g. AWS)
null
Configuration file:
keepalived.conf
kamailio_check.sh
kamailio.conf/opensips.conf
ip addr
inet 192.168.xxx.xxx/24 brd 192.168.xxx.xxx scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet 192.168.15.104/24 brd 192.168.15.104 scope global secondary ens192:0
valid_lft forever preferred_lft forever
Notify and track scripts
null
System Log entries
Did keepalived coredump?
no at all
Additional context
no
The text was updated successfully, but these errors were encountered: