.. _resilience_administration: ************************* Resilience Administration ************************* .. contents:: :local: This page describes the administration part of the Resilience. .. warning:: On Failover, some manual steps are required. When moving to Standby/Main, remember to wait: * for the services to be ready on the target xivo: `xivo-service status all` * for the restarted xuc to be ready: `xivocc-dcomp logs -f xuc` Finally the users must refresh their browser windows before reconnecting to the UC Apps (UC/CCAgent/Switchboard/...). Administration ============== .. toctree:: :maxdepth: 2 administration_with_automatic_failover administration_without_automatic_failover General Information on Resilience ================================= Resilience Modes ---------------- .. _resilience_administration_node_type: Node type and statuses ^^^^^^^^^^^^^^^^^^^^^^ Node type and status can be seen in the admin web interface header. .. figure:: images/resilience_node_type.png .. _resilience_administration_mode_disable: Disable node ^^^^^^^^^^^^ Default status of Resilience is disabled: .. warning:: You should not disable an HA node in production as it will break the configuration and restart some services. .. figure:: images/ha_dashboard_disabled.png HA Dashboard Disabled (default state) .. important:: You have to restart services (xivo-service restart) once the main node is disabled. .. _resilience_administration_mode_main: Main node ^^^^^^^^^ In choosing the method ``Main`` you must enter the IP address **of the VoIP interface** of the standby node. .. figure:: images/ha_dashboard_master.png HA Dashboard Main .. important:: You have to restart all services (xivo-service restart) once the main node is configured. .. _resilience_administration_mode_standby: Standby node ^^^^^^^^^^^^ In choosing the method ``Standby`` you must enter the IP address **of the VoIP interface** of the main node. .. figure:: images/ha_dashboard_standby.png HA Dashboard Standby Visuals ^^^^^^^ Once resilience is activated either as ``Main`` or ``Standby``, an extra table becomes available in the monitoring page. .. figure:: images/main_resilience_status.png The ``Resilience Management Page`` provides more informations. It can be accessed by link on the monitoring page or under :menuselection:`Services -> IPBX -> Control -> Resilience management` .. figure:: images/resilience_management_page.png Scripts ------- 4 scripts are used to manage services and data replication. * ``xivo-master-slave-db-replication `` is used on the main to replicate the main's data on the standby server. It runs on the main. * ``xivo-manage-slave-services {start,stop}`` is used on the standby to start, stop monit and asterisk. The services won't be restarted after an upgrade or restart. * ``xivo-check-master-status `` is used to check the status of the main and enable or disable services accordingly. * ``xivo-sync`` is used to sync directories from main to standby. * On **CC** ``xivocc-ha-monitoring`` is used to monitor Resilience state on its linked XiVO to start or stop nginx service. Replication can be started manually by running the replication scripts on the main:: xivo-master-slave-db-replication xivo-sync Running ``xivo-sync -i`` will create a passwordless SSH key on the main, stored under the :file:`/root/.ssh` directory, and will add it to the :file:`/root/.ssh/authorized_keys` file on the standby. .. note:: If you want to try the ssh logging as advised by the ssh-copy-id script, you must select the new key to be used by ssh: ``ssh -i /root/.ssh/xivo_id_rsa root@`` Automatic Configuration Change ------------------------------ .. warning:: When the HA is configured, some changes will be automatically made to the configuration of XiVO. **Do not change** these values when the HA is configured, as this may cause problems. These values will be reset to blank when the HA is disabled. SIP Expiry ^^^^^^^^^^ SIP expiry value on main and standby will be automatically updated: * min: 1 minutes (default: 1 minute) * **max: 5 minutes** (default: 1 hour) * default: 2 minutes (default: 2 minutes) .. figure:: images/general_settings_sip_expiry.png :menuselection:`Services --> IPBX --> General Settings --> SIP Protocol` Provisioning: Template Line ^^^^^^^^^^^^^^^^^^^^^^^^^^^ The provisioning server configuration will be automatically updated in order to allow phones to switch from XiVO power failure. .. figure:: images/provd_config_registrar.png :menuselection:`Configuration --> Provisioning --> Template Line --> Edit default` .. important:: For the telephony devices to take the new proxy/registrar settings into account, you must :ref:`resynchronize the devices ` or restart them manually. Logging ^^^^^^^ Reslience operation can be monitored in the following logs: * On XiVO PBX (Main or Standby): ``/var/log/xivo-sysconfd.log``:: grep 'Updating resilience state' /var/log/xivo-sysconfd.log 2026-04-23 17:47:22,395 [9857] (INFO) (xivo_sysconf.modules.ha): Updating resilience state, from: False to: True 2026-04-23 18:04:56,490 [9857] (INFO) (xivo_sysconf.modules.ha): Updating resilience state, from: True to: False * On XIVO CC (Main or Standby): ``/var/log/syslog``:: grep xivocc-ha /var/log/syslog 2026-04-23T17:12:01.088629+02:00 haXivocc xivocc-ha: [RESILIENCE] Querying HA status at https://10.181.20.12/configmgt/api/2.0/sysconfd/get_ha_config 2026-04-23T17:12:01.228730+02:00 haXivocc xivocc-ha: [RESILIENCE] HA config shows active=false 2026-04-23T17:12:01.285168+02:00 haXivocc xivocc-ha: [RESILIENCE] Nginx already stopped * On Edge: in nginx and kamailio logs:: edge-dcomp logs -t kamailio |grep "WAR.*Destination" kamailio-1 | 2026-04-23T15:55:14.222395375Z 13(20) WARNING: