conan: Recipe not found error after storage migration
I wanted to upgrade our Conan infrastructure from 1.2.3 to 1.11.1 which works well client-wise (i.e. 1.11.1 clients still connecting to the 1.2.3 server) but I ran into problems when updating the server.
The Conan server 1.2.3 is running on a openSUSE 15 via gunicorn in a virtualenv environment. For the update I have
- stopped the systemd service
- checked out 1.11.1 via git
- updated the PIP requirements
- restarted the systemd service
After that the service could not start and systemctl status conan
yielded:
Jan 03 09:23:57 test gunicorn[3886]: EOF when reading a line
Jan 03 09:23:57 test gunicorn[3886]: **********************************************
Jan 03 09:23:57 test gunicorn[3886]: * *
Jan 03 09:23:57 test gunicorn[3886]: * STORAGE MIGRATION NEEDED! *
Jan 03 09:23:57 test gunicorn[3886]: * *
Jan 03 09:23:57 test gunicorn[3886]: **********************************************
Jan 03 09:23:57 test gunicorn[3886]: A migration of your storage is needed, please backup first the storage directory before continue:
Jan 03 09:23:57 test gunicorn[3886]: '/var/conan/data'
Jan 03 09:23:57 test gunicorn[3886]: Continue? Y/N An error ocurred during the migration, please restore the backup directory and try again
Jan 03 09:23:57 test gunicorn[3886]: EOF when reading a line
So, it is waiting for input from stdin, which gunicorn cannot provide. I went ahead and wrote a script to launch the server on the command line without gunicorn
import sys
sys.path.append('/opt/conan/conan_repo')
from conans.server.server_launcher import main
main(sys.argv[1:])
and started it via
/opt/conan_virtenv/bin/python /opt/conan/conan_server.py
I was presented with the same migration question as before and answered with Y. The migration seemingly went well
[...]
**********************************************
* *
* MIGRATION COMPLETED! *
* *
**********************************************
***********************
Using config: /home/conan/.conan_server/server.conf
Storage: /var/conan/data
Public URL: http://xxx.yyy:9342/v1
PORT: 9342
[...]
When I restart the server via systemd/gunicorn now, I can successfully perform searches from clients:
D:\temp\conantest>conan search -r test
Existing package recipes:
[...]
zlib/1.2.11@abc/testing
However, when I now want to retrieve a package or more information on the package, then I run into the “Recipe not found” error:
D:\temp\conantest>conan install -r test zlib/1.2.11@abc/testing
zlib/1.2.11@abc/testing: Not found, retrieving from server 'test'
zlib/1.2.11@abc/testing: Trying with 'test'...
ERROR: zlib/1.2.11@abc/testing was not found in remote 'test'
D:\temp\conantest>conan search -r test zlib/1.2.11@abc/testing
ERROR: Recipe not found: 'zlib/1.2.11@abc/testing'. [Remote: test]
When I check in /var/conan/data
on the server, the directories have properly been moved to the revision sub directories “0”.
Did I miss a setting for the server s.t. either no migration is performed or after the migration the data is found correctly?
Cheers, GrimSqueaker
- I’ve read the CONTRIBUTING guide.
- I’ve specified the Conan version, operating system version and any tool that can be relevant.
- I’ve explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (10 by maintainers)
Hi, we did remove every package eventually, and downgrade to 1.8.4… Happy to see that someone opened an issue!