FreePBX 17 UCP Daemon does not start anymore

The UCP daemon no longer starts properly. Unfortunately, I don’t know if this happened immediately after restoring the backup from version 16 to version 17, or over time. I noticed it because my /var partition suddenly became so full. The file ucp_err.log was 8.8 GB in size.

As far as I can see, Node is running, but the ports 8001 and 8001 are not listening. The UCP daemon appears to be unable to connect to the database server:

Information from ucp_err.log:
2025-06-13 10:58 +02:00: Error: connect ECONNREFUSED ::1:3306
2025-06-13 10:58 +02:00: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1549:16)
2025-06-13 10:58 +02:00: From event:
2025-06-13 10:58 +02:00: at /var/www/freepbx/admin/modules/ucp/node/node_modules/mariadb/lib/connection.js:146:13
2025-06-13 10:58 +02:00: at new Promise ()
2025-06-13 10:58 +02:00: at Connection.connect (/var/www/freepbx/admin/modules/ucp/node/node_modules/mariadb/lib/connection.js:132:12)
2025-06-13 10:58 +02:00: at Object.createConnection (/var/www/freepbx/admin/modules/ucp/node/node_modules/mariadb/promise.js:37:17)
2025-06-13 10:58 +02:00: at connect2database (/var/www/freepbx/admin/modules/ucp/node/lib/freepbx.js:74:25)
2025-06-13 10:58 +02:00: at /var/www/freepbx/admin/modules/ucp/node/lib/freepbx.js:35:4
2025-06-13 10:58 +02:00: at ChildProcess.exithandler (node:child_process:414:7)
2025-06-13 10:58 +02:00: at ChildProcess.emit (node:events:517:28)
2025-06-13 10:58 +02:00: at maybeClose (node:internal/child_process:1098:16)
2025-06-13 10:58 +02:00: at ChildProcess._handle.onexit (node:internal/child_process:303:5) {
2025-06-13 10:58 +02:00: errno: -111,
2025-06-13 10:58 +02:00: code: ‘ECONNREFUSED’,
2025-06-13 10:58 +02:00: syscall: ‘connect’,
2025-06-13 10:58 +02:00: address: ‘::1’,
2025-06-13 10:58 +02:00: port: 3306,
2025-06-13 10:58 +02:00: fatal: true,
2025-06-13 10:58 +02:00: sqlState: ‘HY000’
2025-06-13 10:58 +02:00: }
2025-06-13 10:58 +02:00: There was an error with MySQL Connection

Information from ucp_out.log
2025-06-13 10:58 +02:00: Starting FreePBX..

fwconsole pm2 --list says that ucp has restartet 658305 times.

I reinstalled the ucp module, but unfortunately that doesn’t help.
The normally loaded UCP modules are present:
/var/www/html/admin/modules/ucp/node/modules/conferencespro.js
/var/www/html/admin/modules/ucp/node/modules/ucphelloworld.js
/var/www/html/admin/modules/ucp/node/modules/xmpp.js

Was this a shell install on stock Debian ? Or ISO ?

:face_with_crossed_out_eyes:

It was a shell install on stock Debian.

HI @dbet
This issue was identified and has already been fixed in UCP v17.0.4.7. However, I’m not sure which version is currently running on your system.

Could you upgrade the UCP and ConferencesPro modules to the latest versions and give it a try?

  • Latest UCP version: 17.0.4.25
  • Latest conferencespro version: 17.0.1.8

Thank you, I am using version 17.0.4.25.

The problem is solved. UCP needs to prefer IPv4 over IPv6, which is done in /etc/gai.conf with the following line decommented:
precedence ::ffff:0:0/96 100

For some inexplicable reason, this line was commented, meaning it was marked with a #.
Speaking of which: this configuration wasn’t necessary under FreePBX 16 with the UCP module 16.0.38.3.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.