During restore, nethcti-server.service is started too early by nethcti-middleware.service. The CTI server reaches start-limit-hit before FreePBX has completed its reconfiguration.
The intended flow seems to enable nethcti-server.service without starting it, wait for FreePBX readiness, and start/restart CTI later. However, nethcti-middleware.service has Wants=nethcti-server.service, so starting the middleware pulls the CTI server into the same systemd transaction.
The same issue can also happen during first configuration, but it is usually hidden because the CTI server is started again at the end of the wizard.
Steps to reproduce
- Restore a system with NethCTI enabled.
- Let the restore process start
nethcti-middleware.service.
- Check the status or logs of
nethcti-server.service before FreePBX finishes reconfiguration.
Expected behavior
nethcti-server.service should start only after FreePBX is ready and the wizard/restore gate allows it.
Actual behavior
nethcti-middleware.service starts nethcti-server.service too early through Wants=nethcti-server.service, causing the CTI server to fail with:
nethcti-server.service: Start request repeated too quickly.
nethcti-server.service: Failed with result 'start-limit-hit'.
Failed to start NethCTI server daemon.
See also
https://mattermost.nethesis.it/nethesis/pl/5s6384ox83yj3eow31u839y1jo
During restore,
nethcti-server.serviceis started too early bynethcti-middleware.service. The CTI server reachesstart-limit-hitbefore FreePBX has completed its reconfiguration.The intended flow seems to enable
nethcti-server.servicewithout starting it, wait for FreePBX readiness, and start/restart CTI later. However,nethcti-middleware.servicehasWants=nethcti-server.service, so starting the middleware pulls the CTI server into the same systemd transaction.The same issue can also happen during first configuration, but it is usually hidden because the CTI server is started again at the end of the wizard.
Steps to reproduce
nethcti-middleware.service.nethcti-server.servicebefore FreePBX finishes reconfiguration.Expected behavior
nethcti-server.serviceshould start only after FreePBX is ready and the wizard/restore gate allows it.Actual behavior
nethcti-middleware.servicestartsnethcti-server.servicetoo early throughWants=nethcti-server.service, causing the CTI server to fail with:See also
https://mattermost.nethesis.it/nethesis/pl/5s6384ox83yj3eow31u839y1jo