You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.
I have a cron running as root that's supposed to check for updates everyday however all the new downloads are available but the actual renaming fails with the error
geoipupdate 2.5.0
Opened License file /tmp/GeoIP.conf
AccountID 0
LicenseKey 000000000000
Insert edition_id GeoLite2-City
Insert edition_id GeoLite2-ASN
Read in license key /tmp/GeoIP.conf
Number of edition IDs 2
Uncompress file /data/GeoLite2-City.mmdb.gz to /data/GeoLite2-City.mmdb.test
Rename /data/GeoLite2-City.mmdb.test to /data/GeoLite2-City.mmdb
Rename /data/GeoLite2-City.mmdb.test to /data/GeoLite2-City.mmdb failed
The text was updated successfully, but these errors were encountered:
Interesting. This means the rename() call failed. Unfortunately we are not printing out what the underlying error is so it's hard to say what is going on.
Are you able to run geoipupdate with strace to capture what the return value from the rename() is? e.g., strace geoipupdate. There will be a lot of output, but we only really need to see rename() lines.
Another way to figure this out would be to alter the code to print the error and rebuild geoipupdate. Something like this:
diff --git a/bin/geoipupdate.c b/bin/geoipupdate.c
index ce347f8..c5133f5 100644
--- a/bin/geoipupdate.c
+++ b/bin/geoipupdate.c
@@ -915,7 +915,7 @@ static int gunzip_and_replace(geoipupdate_s const *const gu,
say_if(gu->verbose, "Rename %s to %s\n", file_path_test, geoip_filename);
int err = rename(file_path_test, geoip_filename);
- exit_if(err, "Rename %s to %s failed\n", file_path_test, geoip_filename);
+ exit_if(err, "Rename %s to %s failed: %s\n", file_path_test, geoip_filename, strerror(errno));
if (gu->preserve_file_times && filetime > 0) {
struct utimbuf utb;
Also, fixed some incorrect error checking. There are likely many other
places where the error checking needs to be improved. I only fixed
issues that I noticed when trying to improve the existing messages.
Closes#82.
I have a cron running as root that's supposed to check for updates everyday however all the new downloads are available but the actual renaming fails with the error
The text was updated successfully, but these errors were encountered: