RestHeart-replicaset-连接字符串包含无效选项'readPreference =

时间:2019-01-24 13:01:03

标签: restheart

我已经安装了RH 3.6,并且尝试将其配置为可与副本集一起使用 但是出了点问题,因为它不起作用:

mongodb://user:password@ip:27017,ip:27017,ip:27017/?readPreference=primary&replicaSet=rsdigital&authSource=userManagement

有人知道格式有什么问题吗?

1 个答案:

答案 0 :(得分:1)

您正在env属性文件中设置mongo-uri。 yml配置文件中的mongo-uri变量定义为{{mongo-uri}}。这样,特殊字符(等号=)被转义导致错误。

只需将变量定义为{{{mongo-uri}}}即可解决。

在即将发布的RESTHeart版本3.6.3中,conf文件已得到修复(带有三个{{{var}}}声明)

有关https://github.com/SoftInstigate/restheart/issues/327的更多信息