Unable to deploy Fiware Orion using helm chart
pooja1pathak opened this issue · comments
I am trying to deploy orion latest version using helm chart: https://github.com/FIWARE/helm-charts/tree/main/charts/orion. For this, I have created a pod of mongo:3.6 and updated image and db details in values.yaml file of orion as:
...
image:
# -- orion image name
#ref: https://hub.docker.com/r/fiware/orion/
# ref: https://hub.docker.com/r/fiware/orion-ld
#repository: fiware/orion-ld
repository: fiware/orion
# -- tag of the image to be used
tag: latest
# -- specification of the image pull policy
pullPolicy: IfNotPresent
...
db:
# -- configuration of the mongo-db hosts. if multiple hosts are inserted, its assumed that mongo is running as a replica set
hosts: [mongo]
# - mongodb
# -- the db to use. if running in multiservice mode, its used as a prefix.
name: orion
...
after this change, orion pod is created and is in running state: kubectl get pods
but when I try to hit localhost:1026/verion
api from pod's shell it shows error: error
I have tried to see logs of the pod and docker container created at worker node but nothing is showing.
At worker node: docker ps docker logs docker logs
Please correct me if I am doing anything wrong and suggest me the way in which I can proceed to deploy orion using helm chart.
Hello,
can you provide more information about your mongo-db deployment, especially its configuration?
Beside that, please also show the service-definition of "mongo".
Best,
Stefan
I have set the log level to debug and I got below logs
time=2021-07-12T06:54:46.957Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[1063]:main | msg=start command line </usr/bin/contextBroker -fg -multiservice -ngsiv1Autocast -disableFileLog>
time=2021-07-12T06:54:46.957Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[937]:logEnvVars | msg=env var ORION_PORT (-port): 1026
time=2021-07-12T06:54:46.957Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[929]:logEnvVars | msg=env var ORION_MONGO_HOST (-dbhost): mongo
time=2021-07-12T06:54:46.958Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[929]:logEnvVars | msg=env var ORION_MONGO_DB (-db): orion
time=2021-07-12T06:54:46.958Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[933]:logEnvVars | msg=env var ORION_USEIPV4 (-ipv4): 1
time=2021-07-12T06:54:46.958Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[933]:logEnvVars | msg=env var ORION_DISABLE_METRICS (-disableMetrics): 1
time=2021-07-12T06:54:46.958Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[1137]:main | msg=Orion Context Broker is running
time=2021-07-12T07:04:42.672Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=mongoConnectionPool.cpp[220]:mongoConnect | msg=Database Startup Error (cannot connect to mongo - doing 100 retries with a 1000 millisecond interval)
time=2021-07-12T07:04:42.673Z | lvl=FATAL | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=MongoGlobal.cpp[142]:mongoInit | msg=Fatal Error (MongoDB error)
time=2021-07-12T07:04:42.675Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=contextBroker.cpp[591]:exitFunc | msg=Orion shutdown completed
Hi @wistefan , I have used kompose to deploy mongodb. Below is the yaml file which I have used:
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.22.0 (955b78124)
creationTimestamp: null
labels:
io.kompose.service: mongo
name: mongo
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: mongo
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.22.0 (955b78124)
creationTimestamp: null
labels:
io.kompose.service: mongo
spec:
containers:
- args:
- --nojournal
image: mongo:3.6
name: mongo
resources: {}
restartPolicy: Always
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: mongo
spec:
selector:
io.kompose.service: mongo
ports:
- protocol: TCP
port: 27017
targetPort: 27017
Do we need to deploy mongo via chart only or we can do this way?
You can deploy mongo without a chart, too. Does the mongo db require authentication? Since none is configured on orion, it might be the problem. Beside that, you should check if mongo is reachable from the orion pod. You can execute into it and try to connect it via curl.