fjc0k / docker-YApi

接口管理平台 YApi 的 Docker 镜像。
https://hub.docker.com/r/jayfong/yapi/tags
MIT License
1.09k stars 261 forks source link

how to fix mongodb version conflict ? #82

Closed Bittttter closed 2 years ago

Bittttter commented 2 years ago

I encountered a problem when building the yapi-server based on readme. yapi-mongo can't start, it hints that the mongodb version used is 4.2, but the installed mongodb version is 5.0, so it does not work.

Based on the hints it seems I should upgrade yapi-mongo ?

This is the error msg:

UPGRADE PROBLEM:
Found an invalid featureCompatibilityVersion file (ERROR: Location4926900: 
Invalid featureCompatibilityVersion document in admin.system) .
version: { _id: \`"featureCompatibilityVersion\", version: \"4.2\" }. 
See https://docs.mongodb.com/master/release-notes/4.4-compatibility/#feature-compatibility. 
:: Causes:: admin.system.version in Invalid value for featureCompatibilityVersiondocument, found to be 4.2, expected to be '4.4' or '4.9' or '5.0. See https://docs.mongodb.com/master/release-notes/4.4- compatibility/#feature-compatibility.).
 If the current featureCompatibilityVersion is lower than 4.4, please see the upgrade documentation on https://docs.mongodb.com/master/release-notes/4.4/#upgrade-procedures.

But I didn't find any configurations to modify the version of yapi-mongo (maybe other dependence as mongo ? I don't sure), has anyone seen a similar problem and is there any documentation I can refer to?

Bittttter commented 2 years ago

Sorry, this is because migrated data used invalid version. ignore this issue