Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 06-10-2023 at 15:10
Please, ANSWER this question AT https://stackoverflow.com/questions/77245778/orion-ld-fails-to-establish-a-connection-with-the-mongodb-community-operator-due
Question:
Orion-ld fails to establish a connection with the MongoDB Community Operator due to a connection string issue
Description:
I am attempting to connect Orion-LD to the MongoDB Community Operator in a Kubernetes (k8s) environment, but I am encountering the following error:
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
Interestingly, when I use the standard Orion, this issue does not occur. In my view, there is an error in the connection string because a '/' is required between the host list and any options.
Could someone please assist me with this issue?
Here's the relevant part of my Kubernetes configuration:
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
I need Orion-ld to connect to the MongoDB Community Operator.
2023-10-07 05:31|CREATED monitor | # answers= 0, accepted answer= False