DynDNS IP not updating correctly (instead using false cached IP)

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: 12.1.14
How are you able to access your server: SSH

Describe your issue

After updating to yunohost 12.1 I noticed, that my instance was often not reachable from outside.
After some debugging and looking intensely for information I found, that the core of the issue is:

Instead of using an up to date version of my IP address when yunohost tries to update DynDNS (in my instance with noho.st), it falls back to an old version of the IP from a cache file. Also it seems that even after a whole day the situation does not resolve itself (thought the cache would be only valid for ~ 12 hours).

Workaround in form of a script:


#!/bin/bash

realip=$(curl -Ls https://ip.yunohost.org)
cachedip=$(cat /var/cache/yunohost/ipv4)

if [[ $realip != $cachedip ]]; then
# Clears the cache containing the old IP addresses
rm -f /var/cache/yunohost/ipv4 /var/cache/yunohost/ipv6

# Forces the DynDNS update to fetch the new IP address
yunohost dyndns update --force

# Displays the real IP and the new IP address saved in the cache
echo "real IP   = $(curl -Ls https://ip.yunohost.org)"
echo "cached IP = $(cat /var/cache/yunohost/ipv4)"

fi


based on the manual commands found by “lordmat” (THANK YOU):

Share relevant logs or error messages

https://paste.yunohost.org/raw/igekisitoh

2 Likes

it should be fixed by the latest release :slight_smile:

3 Likes

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