问题
Basically the same thing happened again as when I asked this question. However this time I cannot get it right again. I tried the answer of Burhan Khalid again and I get the same errors again. I also tried copy pasting the zoneinfo folder from a backup again, but this time it did not fix my errors.
Version of Django = 1.4.5
Version of Celery = 3.0.8
Version of Django-Celery = 3.0.6
Version of pytz = 2013b (same as the files I am downloading)
OS = Mac Mountain Lion
Attempt 1:
- Clear the zoneinfo folder (/usr/share/zoneinfo/)
- Paste the tar gz file in the folder (tzdata2013b.tar.gz)
- Extract tar gz file using command provided by Burhan Khalid
- Create the script provided by Burhan Khalid
- Run the script
Result:
ValueError: Incorrect timezone setting: Europe/Amsterdam when trying to run celery beat.
When i check there is indeed no folder named Europ in the zoneinfo folder where there was one before
Attempt 2:
- Do not clear zoneinfo folder (I put it back from a backup I made before attempting above)
- Paste the tar gz file in the folder (tzdata2013b.tar.gz)
- Extract tar gz file using command provided by Burhan Khalid
- Create the script provided by Burhan Khalid in the zoneinfo folder
- Run the script
Result 2:
At step 3 I get the following output, including some errors:
[13:59:07] /usr/share/zoneinfo $ tar xvzf tzdata2013b.tar.gz
x Makefile
x africa: Can't remove already-existing dir
x antarctica: Can't remove already-existing dir
x asia: Can't remove already-existing dir
x australasia
x europe: Can't remove already-existing dir
x northamerica
x southamerica
x pacificnew
x etcetera
x backward
x systemv
x factory
x solar87
x solar88
x solar89
x iso3166.tab
x zone.tab
x leapseconds
x yearistype.sh tar: Error exit
delayed from previous errors.
At step 5 I get the following output, including some errors:
[13:59:13] /usr/share/zoneinfo $ sudo ./the_script.sh
Password:
zic: error reading africa
zic: error reading antarctica
zic: error reading asia
zic: error reading europe
And I still have the corrupt file.
Attempt 3:
- Restore the backup zoneinfo folder again
- Create seperate folder on Desktop
- Paste the tar gz file and the script in the new folder on the desktop
- Extract the tar gz file using the command
- Execute the script
Result 3:
Step 3 and 5 give no errors or unusual output
Trying to run celery beat still gives corrupt file error
Question What am I doing wrong here. I cannot seem to figure this out...
EDIT
So I have done some more digging around and found the following:
- If I run the same command via foreman run instead of via the Procfile I get no error, even when it is the only command in the Procfile
- Bad file descriptor error means that Python tries to close a file that is already closed instead of the file being corrupt
Which leads me to the conclusion that something in foreman while using a Procfile forces the file to close before it is closed correctly... Thoughts?
来源:https://stackoverflow.com/questions/17746065/zoneinfo-data-corrupt-how-do-i-compile-new-data