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.

- Tit Petric

While I have you here...

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

I promise you'll learn a lot more if you buy one. Buying a copy supports me writing more about similar topics. Say thank you and buy my books.

Feel free to send me an email if you want to book my time for consultancy/freelance services. I'm great at APIs, Go, Docker, VueJS and scaling services, among many other things.