Issue with Cron Job and Hostname Resolution Error

Hi everyone,

I am encountering an issue with my Hestia CP setup. Every day, I receive multiple email notifications from my server with the following content:

✉️ Cron Daemon <[email protected]>
Cron  sudo /usr/local/hestia/bin/v-update-sys-queue backup

sudo: unable to resolve host tecwindow.net: Temporary failure in name resolution

It appears that there is a temporary failure in resolving my server’s hostname (tecwindow.net) when the cron job runs the v-update-sys-queue backup command.

Could anyone please help me understand why this is happening and how I can fix it?

Thank you in advance for your assistance.

Best regards,
Ahmed

Hi @MesterPerfect,

Show the output of these commands (execute them as normal user with sudo privileges):

sudo echo test
hostname -f
cat /etc/hostname
cat /etc/hosts | grep -vE '^#|^$'
root@tecwindow:~# sudo echo test
test
root@tecwindow:~# hostname -f
tecwindow.net
root@tecwindow:~# cat /etc/hostname
tecwindow.net
ng-space.com
mx-blind.org
vmi1169018.contaboserver.net
root@tecwindow:~# cat /etc/hosts | grep -vE '^#|^$'
127.0.0.1       localhost
127.0.1.1       vmi1169018.contaboserver.net    vmi1169018
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
86.48.0.129    vmi1169018.contaboserver.net vmi1169018

I executed the commands through the root user. Do I have to use the tecwindow user or any other user?

This one sudo echo test as user tecwindow.

If you see no error, as root:

su - admin
echo -e "#!/bin/bash\necho test" > /usr/local/hestia/bin/v-test-sudo
chmod +x /usr/local/hestia/bin/v-test-sudo
sudo /usr/local/hestia/bin/v-test-sudo

Once checked, edit your /etc/hosts file and add tecwindow.net in this line:

127.0.1.1       vmi1169018.contaboserver.net    vmi1169018 

like this:

127.0.1.1       vmi1169018.contaboserver.net vmi1169018 tecwindow.net

admin@tecwindow:/root$ echo -e “#!/bin/bash\necho test” > /usr/local/hestia/bin/v-test-sudo
bash: !/bin/bash\necho: event not found

Sorry, my bad, use this:

sudo su -
echo -e '#!/bin/bash\necho test' > /usr/local/hestia/bin/v-test-sudo
chmod +x /usr/local/hestia/bin/v-test-sudo
su - admin
sudo /usr/local/hestia/bin/v-test-sudo

hi
“I apologize for the delay in responding to this matter. I have tried the suggested solution and I no longer receive any error messages in my email. Thank you.”

1 Like

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