New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when replacing yesterday's geodata (Extract.writer.error [Error: ENOENT: no such file or directory, lstat '/tmp/geonames/cities/cities1000.txt']) #39
Comments
It is very curious that no one has reported this before, as it happens every time you don't clean up the data and restart local-reverse-geocoder. I may have discovered it by moving |
I think what you're asking for is making |
@tomayac Hi Thomas, that was already configurable - see here. I dived into the error with streams, but I think that the real problem is that one of See tkafka@6e96500 |
Oh, sorry. It's been a while that I touched this code.
Thanks for working on this, but…
…I wonder why you went for forking this. I am and always was happy to merge PRs. I'd be happy to add you to the list of contributors. |
@tomayac Please don't take it personally, I just needed it fixed quickly. I just created a pull request #40, and I will be happy to delete I have been running it on my server for past few days, and finally the geocoder reloads smoothly without crash, even when server is rebooted a day after previous start. Feel free to add me on a contributor list - thank you! |
Reproduction steps:
local-reverse-geocoder
, let it create files with dates in name (eg.cities/cities1000_2021-03-19.txt
)cities/cities1000_2021-03-19.txt
→cities/cities1000_2021-03-15.txt
)local-reverse-geocoder
again.What I expected:
Geocoder updates its files.
What actually happens
Geocoder crashes with
Extract.writer.error [Error: ENOENT: no such file or directory, lstat '/tmp/geonames/cities/cities1000.txt']
.The cause is this:
fstream
module, and it callsstat
on extracted file after calling close - see code!stat
on now nonexistent file causes crash (error is emitted from fstream, and not handled by anyone).Fix ideas:
close
event)error
event fromunzip.Extract
Beware:
All
_get*data
methods have this problem, it needs to be fixed everywhere.The text was updated successfully, but these errors were encountered: