FTL failed to start due to duplicate CNAME at line 1 of /etc/dnsmasq.d/05-pihole-custom-cname.conf

Hi community,
My pihole 6 container keeps complaining about my custom CNAME config.
I already ran a repair through it and it still complains.

FTL failed to start due to duplicate CNAME at line 1 of /etc/dnsmasq.d/05-pihole-custom-cname.conf.

and won't let me add any further CNAME entries.
in the begging the container did run out of RAM which I did resolve.

Here is the link to the tricoder log
Thx for your help,
user4747

The issue here is that you have in your /etc/pihole/pihole.toml

     cnameRecords = [
       "mfc-l2730dw,brother"
     ] ### CHANGED, default = []

but you also have said /etc/dnsmasq.d/05-pihole-custom-cname.conf which reads

   cname=mfc-l2730dw,drucker
   cname=travelmate-b113,analog

The error message is not wrong, we just need find out how you ended up in this scenario. When upgrading Pi-hole v5.x to v6.0 for the first time, FTL should have read the file /etc/pihole/05-pihole-custom-cname.conf, imported all the lines it found therein to /etc/pihole/pihole.toml (at dns.cnameRecords) and thereafter move the file to /etc/pihole/05-pihole-custom-cname.conf.bck.

From this point on, only pihole.toml should be used to manage your custom CNAME records.

I have four questions:

  1. Did you manually move the file back from 05-pihole-custom-cname.conf.bck to 05-pihole-custom-cname.conf ?
  2. Did you add the second line in this file after the migration to v6.0?
  3. Do you recall when have renamed the destination of mfc-l2730dw from brother (as in pihole.toml) to drucker (as in 05-pihole-custom-cname.conf)?
  4. In case the answers to the questions above are mostly no and the error is on Pi-hole's side: When did you do the migration? Do you maybe still have the log files (precisely /var/log/pihole/FTL.log, maybe a version with .1, etc. at the end) available so we could check then for error messages during the migration process?
  1. Did you manually move the file back from 05-pihole-custom-cname.conf.bck to 05-pihole-custom-cname.conf ?

I did not move or touch the any file with name of 05-pihole-custom-cname.conf or 05-pihole-custom-cname.conf.bck at any time.

  1. Did you add the second line in this file after the migration to v6.0?
    I did not touch any file on the shell before or after the migration to v6.0

  2. Do you recall when have renamed the destination of mfc-l2730dw from brother (as in pihole.toml) to drucker (as in 05-pihole-custom-cname.conf)?
    I only tried editing custom cname entries via the web gui and wondered why the gui stopped responding.

I later noticed via the proxmox gui that the lxd container ran out of memory.
I therefore raised the memory size from 1024 to 2048.

  1. In case the answers to the questions above are mostly no and the error is on Pi-hole's side: When did you do the migration? Do you maybe still have the log files (precisely /var/log/pihole/FTL.log, maybe a version with .1, etc. at the end) available so we could check then for error messages during the migration process?

I do not remember the exact date of the migration, however /var/log/pihole containers the following log files.

ls -al
total 240
drwxr-xr-x 2 pihole pihole 4096 Nov 5 04:12 .
drwxrwxr-x 8 root syslog 4096 Nov 5 00:00 ..
-rw-r----- 1 pihole pihole 3444 Nov 5 07:40 FTL.log
-rw-r----- 1 pihole pihole 4616 Nov 5 00:00 FTL.log.1
-rw-r----- 1 pihole pihole 6711 Nov 4 00:00 FTL.log.2.gz
-rw-r----- 1 pihole pihole 1485 Nov 3 00:00 FTL.log.3.gz
-rw-r----- 1 pihole pihole 135773 Nov 4 09:11 pihole_debug.log
-rw-r----- 1 pihole pihole 0 Nov 4 00:00 pihole.log
-rw-r----- 1 pihole pihole 7168 Nov 4 00:00 pihole.log.1
-rw-r----- 1 pihole pihole 1346 Nov 1 00:00 pihole.log.2.gz
-rw-r----- 1 pihole pihole 743 Oct 31 08:25 pihole.log.3.gz
-rw-r----- 1 pihole pihole 45383 Nov 5 04:15 pihole_updateGravity.log
-rw-r----- 1 pihole pihole 4732 Nov 5 07:37 webserver.log

Please remove the file /etc/dnsmasq.d/05-pihole-custom-cname.conf and restart pihole-FTL. It should work flawlessly afterwards.

Then, please run

cat /var/log/pihole/FTL.log | pihole tricorder
cat /var/log/pihole/FTL.log.1 | pihole tricorder
cat /var/log/pihole/FTL.log.2.gz | pihole tricorder
cat /var/log/pihole/FTL.log.3.gz | pihole tricorder

and provide the tokens so we can check if there is still anything relevant in these files.

Also a

ls -lh /etc/pihole

would be helpful.

Thank you!

Here are the new tokens
Upload successful, your token is: https://tricorder.pi-hole.net/LWXrhT55/
Upload successful, your token is: https://tricorder.pi-hole.net/ofRYP3ui/
Upload successful, your token is: https://tricorder.pi-hole.net/cQpESoTY/
Upload successful, your token is: https://tricorder.pi-hole.net/4taNFPyQ/

Thank your for your help!

8 posts were split to a new topic: Custom CNAMEs