First, do check that you have the latest version of the GeoIP plugin installed on all of your sites. MaxMind changed their geolocation libraries and their download locations a few years ago and we did publish an updated version of our plugin.
If you do have the latest plugin version but the problem persists please talk to your host. Most likely they have a firewall which stops outbound connections.
Remember that as you said running the same code on other sites works. Therefore the problem is not with the code (something we could help with) but on the server side. Even if all sites are hosted by the same company do remember that they may be hosted on different physical or virtual servers, therefore having different firewall rules. Check with your host to be sure.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!