I am getting issue while starting vagrant for the first time. I have followed steps mentioned in this page. But I am getting multiple errors, such as
default: Starting ol-infobase.service
default: Failed to start ol-infobase.service: Unit ol-infobase.service not found.
default: Failed to restart ol-infobase.service: Unit ol-infobase.service not found.
default: Starting ol-solr-updater.service
default: Failed to start ol-solr-updater.service: Unit ol-solr-updater.service not found.
default: Failed to restart ol-solr-updater.service: Unit ol-solr-updater.service not found.
default: Starting ol-web.service
default: Failed to start ol-web.service: Unit ol-web.service not found.
default: Failed to restart ol-web.service: Unit ol-web.service not found.
For more verbose information, check this gist
Judging by your gist, I think this is related to #1256 . Are you using windows? Could you give me the output of git config core.autocrlf?
@cdrini, yes I am using windows. And git config core.autocrlf gives me false.
Oh, I think you closed the wrong issue, @mekarpeles :P but that's ok, we can continue at #1256
@cdrini thank you! You're right, I was trying to reference 1260 :)
@cdrini above "... service not found" issue has resolved after changing the autocrlf config to input. But now it is giving this error
default: psql openlibrary -t -c 'select key from thing' | sed 's/ *//' | grep '^/books/' | PYTHONPATH= xargs python openlibrary/solr/update_work.py -s http://0.0.0.0/ -c conf/openlibrary.yml --data-provider=legacy
default: Traceback (most recent call last):
default: File "openlibrary/solr/update_work.py", line 17, in <module>
default: from data_provider import get_data_provider
default: File "/openlibrary/openlibrary/solr/data_provider.py", line 11, in <module>
default: from openlibrary.core import ia
default: File "/openlibrary/openlibrary/core/ia.py", line 10, in <module>
default: from infogami import config
default: ImportError: No module named infogami
default: Makefile:95: recipe for target 'reindex-solr' failed
default: make: *** [reindex-solr] Error 123
For detailed information gist
Ah, right; the _other_ windows issue :P The openlibrary repo makes use of symlinks, which by default git on windows checks out as plain text files. To fix it, enable symlinks FOR THE OL REPO only (note no --global this time):
git config core.symlinks true
Then reset the repo:
git reset --hard HEAD
(Checkout https://git-scm.com/docs/git-config for documentation about these config settings).
Yeah, we need to update the docs for Windows users; I think these issues affect both vagrant and docker.
@ChangezKhan Let me know if this works!
@cdrini your solution worked perfectly. Big thanks.
One thing I have to mention here that before running git reset --hard HEAD, I had to run git BASH as an Administrator, cause I was getting "unable to create symlink permission denied" issue without that.
Ahhh, right; that sounds vaguely familiar :P Great! I'm going to close this issue as resolved. I've opened #1321 to track updating the documentation (feel free to tackle it if you feel like it!).
Happy coding!
Hello @cdrini. To be sure, I deleted my local repo and started with scratch. Before vagrant up, I enabled symlinks, but still I got the No module named infogami error.
Only after vagrant up, I again enabled the symlinks and hard reset the head, then only it worked.
This is gist of all list of commands I used.
@ChangezKhan Nice! Starting from scratch is a great approach for testing this.
Ah, you have to reset the repo after enabling symlinks. After running the checkout command, all the symlinks are created as text files (default on Windows+git). Enabling symlinks doesn't modify what's already been created, so you have reset the repo. The reset removes these "false" symlinks (along with every other file :P) and re-downloads everything. Because you enabled symlinks, it now creates proper symlinks instead of just text files. Hope that helps! I think you might have enough info to tackle that documentation ticket, if you'd like ;)