high-availabilityhierarchical-clusteringinternal-server-erroropensipskeepalived

How to configure in build keepalived of opensips?


I am trying to configure opensips keepalived for nodes handling in cluster. I followed the instrustions mentioned in this guide. https://controlpanel.opensips.org/htmldoc_9_X_X/keepalived.html. After saving the configuration the boxes for nodes are not displayed. Firstly I considered it that there might be php version issue. Also when I click on keepalived in control panel the console shows a "500 internal server error".

I tried it for various versions of PHP but the issue remains.


Solution

  • I solved this issue regarding Opensips. As openSIPS is more suitable with PHP 7.4, so install php7.4-ssh2 instead of just php-ssh2. Use the command "sudo apt install php7.4-ssh2". This will solve the issue of loading the nodes in the control panel. If you face issue with the authentication while making the ssh2 connection, then you need to use the other way of authentication. Opensips use sh2_auth_pubkey_file() function for the authentication of remote machines. We can by pass this by using sh2_auth_password() in /var/www/html/opensips-cp/web/tools/system/keepalived/lib/functions.inc.php.