Wget fails with host not found


I did my usual weekly updates this past Saturday and since then have had an isolated problem with access to my website.

For context, I am running Fedora 36 server (no gui) with the Apache server. The local IP for the server is For internet access I am using a dynamic IP. This configuration has been working for several years.

Each (early) morning I have a cron job on the server that access the genealogy web site to send email reminders about the days births and anniversaries.

After the update, if I use a web browser I am able to access the web server with no problem. However, the wget (which is the cron job that runs on the physical server itself) fails with the message that the web server was not found. In summary, access from an external system through a web browser works, access from the physical system itself (using wget) is now failing.

Doing some Google searches, I think (not sure) that is may be related to the nsswitch.conf as the order of the hosts has dns at the end of the list of hosts. The file also indicates that the file should not be updated manually.

My question then is if my assumption that it is related to the nsswitch.conf file how do I update the file to move dns up in the search list?

Of course, if I am totally out to lunch would appreciate knowing what else might be causing the problem.


Please clarify are these 2 separate devices:

Sorry but its not clear from your post.

Probably a stupid question, but before the google search did you try:

ping google.com


Regards Tom.

Hopefully this clarifies. is the IP of the server on the LAN. The Internet IP for my location is a 99.249.xx.xxx is the IP assigned by my ISP. I have setup an dynamic IP that forwards my domain xxxxxx.duckdns.org to the 99.249 address and my router forwards it to the address on the LAN.

Re the ping of google.com - I had not tried that before posting the query. I just tried it now and it did ping google okay. Since that worked I tried to run the wget again from the command line and this time it went through.

I though it might have been a problem with the update as it occured that past two mornings and also when I tried to run the wget from the command line. Now I’m beginning to wonder if it was an Internet hicup in the wee hours of the morning.


Please provide cronjob line from crontab?

Thanks Tom.

Here is the cron job

0 9 * * * wget -O - -q “https://xxxxxx.duckdns.org/webtrees/index.php?route=/webtrees/reminder-cron/run&key=lz5bat6RW1MXLCFQ


Looks fine to me. If the issue is still occurring, all I can suggest is take a look at systemd-timers.

Regards Tom.