Problem with DDClient and its new Widget.

Started by AhnHEL, August 06, 2024, 08:01:24 PM

Previous topic - Next topic
I get this with the new widget in the attached picture, a blank space with no IP for Current IP or a Date and Time for Updated.  I've obscured the hostname.  I'm pretty sure there's just an issue with how the ddclient.cache file is generated on my opnsense.  I've uninstalled and reinstalled the plugin but I still get this blank in the plugin.  Everything is working fine with ddclient otherwise and I'm getting successful updates in the logs using Porkbun API as a service.

My ddclient.cache file looks like this:

## ddclient-3.11.2
## last updated at Mon Aug  5 09:34:24 2024 (1722864864)
host=host.domain.com host.domain.com


In Services: Dynamic DNS: Settings, the Current IP and Dated are blank there as well.


2024-08-06T12:48:22-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T11:48:21-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T10:48:21-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T09:48:20-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T08:48:20-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T07:48:19-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T06:48:18-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T05:48:17-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T04:48:16-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T03:48:15-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T02:48:14-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T01:48:13-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-06T00:48:12-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-05T23:48:11-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-05T22:48:10-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-05T22:34:37-04:00 Notice ddclient SUCCESS: updating ipv4: skipped: host.domain.com address was already set to xxx.xxx.xxx.xxx.
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: {"status":"SUCCESS","cloudflare":"enabled","records":[{"id":"399246864","name":"host.domain.com","type":"A","content":"xxx.xxx.xxx.xxx","ttl":"600","prio":"0","notes":null}]}
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE:
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: content-language: en-US, en
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: referrer-policy: origin
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: x-xss-protection: 1; mode=block
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: x-content-type-options: nosniff
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: x-frame-options: sameorigin
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: strict-transport-security: max-age=63072000; includeSubDomains; preload
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: pragma: no-cache
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: cache-control: no-store, no-cache, must-revalidate
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: expires: Thu, 19 Nov 1981 08:52:00 GMT
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: set-cookie: BUNSESSION2=ck1; path=/; secure; HttpOnly; SameSite=Lax
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: server: openresty
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: set-cookie: AWSALBCORS=ck1; Expires=Tue, 13 Aug 2024 02:34:37 GMT; Path=/; SameSite=None; Secure
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: set-cookie: AWSALB=ck1; Expires=Tue, 13 Aug 2024 02:34:37 GMT; Path=/
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: content-type: application/json
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: date: Tue, 06 Aug 2024 02:34:37 GMT
2024-08-05T22:34:37-04:00 Notice ddclient RECEIVE: HTTP/2 200
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: data="{\"secretapikey\":\"sk1\",\"apikey\":\"pk1\"}"
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: header="Content-Type: application/json"
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: url="https://porkbun.com/api/json/v3/dns/retrieveByNameType/domain.com/A/host"
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: request=POST
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: max-time=120
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: connect-timeout=120
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: user-agent="ddclient/3.11.2"
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: include
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: silent
2024-08-05T22:34:37-04:00 Notice ddclient SENDING: Curl system cmd to https://porkbun.com
2024-08-05T22:34:37-04:00 Notice ddclient UPDATE: updating host.domain.com
2024-08-05T22:34:37-04:00 Notice ddclient INFO: setting ipv4 address to xxx.xxx.xxx.xxx for host.domain.com
2024-08-05T22:34:37-04:00 Notice ddclient WARNING: 'if-skip' is deprecated and does nothing for IPv4



AhnHEL (Angel)

August 06, 2024, 08:16:26 PM #1 Last Edit: August 06, 2024, 08:21:48 PM by Monviech
Can you tell me the output of your api?

When you are in the browser an logged into OPNsense, just replace "/ui/..." with this:

/api/dyndns/accounts/search_item

So e.g. https://192.168.1.1/api/dyndns/accounts/search_item

If there is sensitive data in the output, you can PM it to me. I would need the API output as raw as possible so I can see what the problem is.
Hardware:
DEC740


The widget shows these two fields as current IP and last Update:

current_ip   ""
current_mtime   ""

In your case they are empty strings. So I guess the API does not show information for all providers.
Hardware:
DEC740

August 07, 2024, 08:09:53 AM #4 Last Edit: August 07, 2024, 08:17:50 AM by Monviech
If you go into the SSH shell and issue this command:

configctl ddclient statistics

Do you get any statistics back? I get this while using duckdns:

{"535905c8-0116-4933-b524-db500691ae1c": {"ip": "80.151.xxx.xxx", "status": "good", "mtime": 1723008946.4086237, "md5": "fedd5473fc98fb1f1854b8..."}}

Maybe there's a difference when using the "native" vs. the "ddclient" backend here.
Hardware:
DEC740

One of the problems is https://github.com/opnsense/plugins/issues/3570

Does the resulting DynDNS entry returning no data work at all? That would be the main question instead of assuming the output is faulty.


Cheers,
Franco

Everything is working properly and my DNS entries at my registrar get updated as well if there is an IP change.  There just isnt a time or an IP updated in the Opnsense plugin.

Quote from: Monviech on August 07, 2024, 08:09:53 AM
If you go into the SSH shell and issue this command:

configctl ddclient statistics

Do you get any statistics back? I get this while using duckdns:


I get this

{"hosts": {"host.domain.com host.domain.com\n": {"host": "host.domain.com host.domain.com\n"}}, "version": "ddclient-3.11.2", "updated": 1722864864}
AhnHEL (Angel)

Looks like you are using the ddclient backend.

Though I don't know how to troubleshoot this any further.

If ip and time are not in the output, the widget can't show them. So technically the widget works correctly.
Hardware:
DEC740