Skip to Content

My /etc/hosts file is re-set on every restart


Have you tried to modify the /etc/hosts file of your CAL instance? In that case, you probably already know that the file is overwritten on every OS reboot.

This is caused by service registered by SAP CAL during the creation of the instance and the purpose is to restore broken connectivity between components running on the virtual machines in the landscape.

Depending on the CAL solution, the service name is ‘updatehosts’ or ‘updatehosts-network’. For example, on my IDES instance it is ‘updatehosts’:

wdflbmd16124:~ # ll /etc/init.d/update*

-rwxr-xr-x 1 root root 1036 Dec 10 14:48 /etc/init.d/updatehosts

An easy way to stop this service is just to modify it and make it do nothing. For example, the following command can be used:

sed -i.disable ‘/case/i exit 0’ /etc/init.d/updatehosts

Enjoy!

Ventsislav

Be the first to leave a comment
You must be Logged on to comment or reply to a post.