TrueNAS Connect HTTP 500: {'error': 'internal error', 'data': {'service': 'dns'}}

I have been trying for a while to get TrueNAS connect to work but I can not get past the tn_connect.acme.create.cert

I have TailScale disabled to take that out of the equation. I do have two NICs on the server, one hosting all apps and one specifically just for the server. Thanks for any help!

Error Type: CallError
Trace: Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/plugins/truenas_connect/hostname.py”, line 42, in register_update_ips
return await register_update_ips(tnc_config, ips, create_wildcard)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/truenas_connect_utils/hostname.py”, line 58, in register_update_ips
raise CallError(f’Failed to update TNC hostname configuration: {resp[“error”]}')
truenas_connect_utils.exceptions.CallError: [EFAULT] Failed to update TNC hostname configuration: HTTP 500: {‘error’: ‘internal error’, ‘data’: {‘service’: ‘dns’}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 579, in run
await self.future
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 623, in __run_body
rv = await self.method(*args)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/truenas_connect/acme.py”, line 206, in create_cert
resp = await self.middleware.call(‘tn_connect.hostname.register_update_ips’, None, True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1245, in call
return await self._call(
^^^^^^^^^^^^^^^^^
…<2 lines>…
)
^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 924, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/truenas_connect/hostname.py”, line 44, in register_update_ips
raise CallError(str(e))
middlewared.service_exception.CallError: [EFAULT] [EFAULT] Failed to update TNC hostname configuration: HTTP 500: {‘error’: ‘internal error’, ‘data’: {‘service’: ‘dns’}}

@Will_Mattert Thanks for the detailed report. The failure is in the step that registers DNS names for your system, not in the certificate itself. TrueNAS Connect registers a name for every IP address the system advertises, and with the Web UI bound to 0.0.0.0 that means every IPv4 address on the box. With the aliases on your apps NIC that came to 12 addresses, and creating that many records took longer than the service allowed for the step. The records were actually being created, but the step timed out before it could hand the result back, which is the internal error in your traceback.

Two things:

Under System > General Settings > GUI, change Web Interface IPv4 Address from 0.0.0.0 to the addresses you mostly use to reach the UI (192.168.5.73 is the first one your system registered). Accept the prompt to restart the web service and reconnect on that address. This only changes where the TrueNAS web UI listens, so your apps aren’t affected. Then turn TrueNAS Connect off and back on and go through the connection again. With one address to register, that step finishes in a couple of seconds and the certificate should follow.

We’re also rolling out a change on our side in the next day or so that gives that step more time to work with a larger address list.

That error is the DNS lookup failing while TNC tries to register the hostname. With two NICs, check that only the interface used for the NAS has the default gateway. Put working DNS servers in Network > Global Settings, then test from Shell:

getent hosts tn_connect.acme.create.cert
ping -c 3 1.1.1.1
ping -c 3

If the IP ping works and the hostname lookup fails, fix DNS or the gateway on that interface. Remove the extra default gateway, apply, then restart the TrueNAS Connect service. The two NICs and the service: dns error are where I would start.