milvus: Milvus v0.9 crashes on startup when using non-root user for the container
Bug Description Milvus v0.9 crashes on startup when using a non-root user for the container with the following error message in STDOUT:
milvus_1 | Could not open lock file.
milvus_1 | Milvus server exit...
milvus_1 | deploy_mode: single instance lock db path failed.
This problem is not present in v0.7.1 if the volumes for db and log are chown-ed with the proper user id.
Steps/Code to reproduce behavior Use any non-root user ID.
Expected behavior Milvus should boot up without any errors.
Environment details
- Hardware/Softward conditions: Nix based systems
- Method of installation: Pulled CPU only docker image
- Milvus version: 0.9.0
- Milvus configuration: N/A
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (8 by maintainers)
@Nilabhra I found the cause of this problem. Milvus create lock in
primary_pathwhich is defined in server_config.yaml, by default,primary_pathis/var/lib/milvus. So, Milvus tried to lock with/var/lib/milvus/lock. With you paste above, this file is belong toroot.So you have to delete this file
/var/lib/milvus/lockwithrootuser, and then chown/var/lib/milvuswith userdummy.If you want to prevent the executable program and config files from being modified, separating the program and data would be a good solution.