我尝试在 Kubernetes (k8s) 环境中将 Orion-LD 连接到 MongoDB Community Operator,但遇到以下错误:
time=Friday 06 Oct 15:25:17 2023.339Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=mongocInit.cpp[58]:mongocLog | msg=MONGOC[mongoc]: A '/' is required between the host list and any options.
time=Friday 06 Oct 15:25:17 2023.339Z | lvl=FATAL | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=mongocInit.cpp[294]:mongocInit | msg=Unable to connect to mongo(URI: mongodb://my-user:xxxx@orionld-mongodb-svc:27017?replicaSet=orionld-mongodb&authMechanism=SCRAM-SHA-256&): Invalid host string in URI
有趣的是,当我使用标准 Orion 时,不会出现此问题。在我看来,连接字符串中存在错误,因为主机列表和任何选项之间需要一个“/”。
有人可以帮我解决这个问题吗?
这是我的 Kubernetes 配置的相关部分:
spec:
containers:
- name: orion
image: fiware/orion-ld
args: ["-dbhost","orionld-mongodb-svc:27017","-rplSet","orionld-mongodb","-dbuser","my-user","-dbpwd","xxxx","-dbAuthMech","SCRAM-SHA-256","-db","orion","-logLevel","INFO"]
ports:
- containerPort: 1026
我需要 Orion-ld 来连接到 MongoDB Community Operator。
“出于某种奇怪的原因需要”斜杠的问题已解决,请参阅 Orion-LD 的 github 中的 PR