Mysteries of system administration ...

You have two servers, you have the same scripts available on the two servers. The scripts are run via ‘crontab’, which has the same version on both servers. They have the same operating system. The scripts use ‘perl’, which is the same version on both servers.

Script works on both servers, but throws locale warnings on server B.

In the end, the solution was to edit /etc/environment (deprecated). Somehow crontab still uses this file, and the file was empty on the working server, and set to an old (also deprecated) charset on the other. The only difference was the time when the servers were installed - one was installed before the deprecation of /etc/environment, and the second one after that. And since /etc/environment is not part of the crontab package, and it wasn’t cleaned up during server upgrades, you’re left with different behaviour on two “identical” servers.

While I have you here...

It would be great if you buy one of my books:

Buying a copy supports me writing more about similar topics.

For business inqueries, send me an email. I'm available for consultany/freelance work. See my page for more detail..