packages icon indicating copy to clipboard operation
packages copied to clipboard

Hono-dispatch-router service not installed

Open charanhs123 opened this issue 1 year ago • 14 comments

Hello, I noticed something strange after installing Hono and Ditto through Cloud2edge and didn't get the service like "hono-dispatch-router-ext", which is required while connecting ditto and hono, I am attaching the screenshot below. Screenshot from 2024-05-08 12-46-04

charanhs123 avatar May 08 '24 11:05 charanhs123

@charanhs123 By default, the cloud2edge chart uses Kafka messaging. For that, there is also a Kafka-based Ditto connection being created. In order to use AMQP-based messaging (with the dispatch-router and a amqp-10 type Ditto connection), the profileAmqpMessaging-values.yaml profile can be used when installing the chart. See also the cloud2edge README.

calohmn avatar May 08 '24 11:05 calohmn

Yes , I figured it out thank you anyways @calohmn

charanhs123 avatar May 08 '24 11:05 charanhs123

Hii @calohmn also , i am getting version error i tried copying yaml into amqp.yaml and used kubectl apply -f amqp.yaml -n $NS

but got the error below Screenshot from 2024-05-08 14-34-16

charanhs123 avatar May 08 '24 12:05 charanhs123

The profileAmqpMessaging-values.yaml is to be used as parameter to helm install (with -f):

helm install -n $NS -f profileAmqpMessaging-values.yaml --wait --timeout 20m $RELEASE eclipse-iot/cloud2edge

calohmn avatar May 08 '24 12:05 calohmn

it looks like you haven't set the RELEASE env variable: RELEASE=c2e

calohmn avatar May 08 '24 12:05 calohmn

Yes , i had missed it , silly error :) Thank you @calohmn

charanhs123 avatar May 08 '24 12:05 charanhs123

Screenshot from 2024-05-08 15-20-16

This error has been persistent even when I was using Kafka messaging type @calohmn

charanhs123 avatar May 08 '24 13:05 charanhs123

@charanhs123 As noted in https://github.com/eclipse/packages/issues/529#issuecomment-2102566185 in your other issue, you can check the status of pods and container logs for errors. And in general, it's better to post terminal output as text in code blocks here instead of posting screenshots (see here).

calohmn avatar May 09 '24 12:05 calohmn

Hello @calohmn now after installing for AMQP messaging , the pods are not ready , i tried multiple times , is there a issue with the repository also the Ditto api is not opening with the URl it echoes

iffroot4@iffroot:~$ kubectl get pods -n cloud2edge NAME READY STATUS RESTARTS AGE c2e-ditto-connectivity-6b76d896d9-8t6tt 1/1 Running 0 35m c2e-ditto-dittoui-6694fd44c6-785wz 1/1 Running 0 35m c2e-ditto-gateway-7f47dc44f4-rks8d 1/1 Running 0 35m c2e-ditto-nginx-6b7d6bfc74-shs5s 1/1 Running 0 35m c2e-ditto-policies-5f86cf48dd-qh8z8 1/1 Running 0 35m c2e-ditto-swaggerui-86888c6bc5-q7nsf 1/1 Running 0 35m c2e-ditto-things-668486b4f8-f6577 1/1 Running 0 35m c2e-ditto-thingssearch-66757448cc-t9d5v 1/1 Running 0 35m c2e-hono-adapter-amqp-5f496cb67b-q86bb 0/1 Running 0 35m c2e-hono-adapter-http-57c9fcb8c5-fjt9g 0/1 Running 0 35m c2e-hono-adapter-mqtt-847b9677cb-khlb5 0/1 Running 0 35m c2e-hono-artemis-7c4b4cf49f-chmzb 1/1 Running 0 35m c2e-hono-dispatch-router-9cc7d4647-4bxt9 1/1 Running 0 35m c2e-hono-service-auth-679599b48c-gw7ks 1/1 Running 0 35m c2e-hono-service-command-router-8f559d488-nkl2k 0/1 Running 0 35m c2e-hono-service-device-registry-87c7956d-9ht9p 0/1 Running 0 35m c2e-mongodb-bf5679b5b-62qhr 0/1 CrashLoopBackOff 11 (3m47s ago) 35m

charanhs123 avatar May 13 '24 10:05 charanhs123

c2e-mongodb-bf5679b5b-62qhr 0/1 CrashLoopBackOff 11 (3m47s ago) 35m

This is causing the other pods to not get ready. Can you check the output of

kubectl describe pod -n cloud2edge c2e-mongodb-bf5679b5b-62qhr

and in there check the events and the status of the mongodb container (looking for Last State, Reason and Exit code)? You could also get the logs of the mongodb container and look for errors there: kubectl logs -n cloud2edge cloud2edge c2e-mongodb-bf5679b5b-62qhr

calohmn avatar May 13 '24 10:05 calohmn

hey @calohmn i am attching the output below

iffroot4@iffroot:~$ kubectl describe pod -n cloud2edge c2e-mongodb-bf5679b5b-cnx6k Name: c2e-mongodb-bf5679b5b-cnx6k Namespace: cloud2edge Priority: 0 Service Account: c2e-mongodb Node: minikube/192.168.49.2 Start Time: Mon, 13 May 2024 13:00:50 +0200 Labels: app.kubernetes.io/component=mongodb app.kubernetes.io/instance=c2e app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=mongodb helm.sh/chart=mongodb-12.1.31 pod-template-hash=bf5679b5b Annotations: Status: Running IP: 10.244.1.40 IPs: IP: 10.244.1.40 Controlled By: ReplicaSet/c2e-mongodb-bf5679b5b Containers: mongodb: Container ID: docker://5b848c9f22e33814e20f3d9abb899aa2b9fa4275482717c4f0681da967a89609 Image: docker.io/bitnami/mongodb:5.0.10-debian-11-r3 Image ID: docker-pullable://bitnami/mongodb@sha256:563e1572db6c23a7bc5d8970d4cf06de1f1a80bd41c4b5e273a92bfa9f26d0f1 Port: 27017/TCP Host Port: 0/TCP State: Waiting Reason: CrashLoopBackOff Last State: Terminated Reason: Error Exit Code: 132 Started: Mon, 13 May 2024 13:07:05 +0200 Finished: Mon, 13 May 2024 13:07:08 +0200 Ready: False Restart Count: 6 Limits: cpu: 250m memory: 512Mi

charanhs123 avatar May 13 '24 11:05 charanhs123

also the logs iffroot4@iffroot:~$ kubectl logs -n cloud2edge c2e-mongodb-bf5679b5b-cnx6k mongodb 11:12:16.55 mongodb 11:12:16.56 Welcome to the Bitnami mongodb container mongodb 11:12:16.57 Subscribe to project updates by watching https://github.com/bitnami/containers mongodb 11:12:16.58 Submit issues and feature requests at https://github.com/bitnami/containers/issues mongodb 11:12:16.66 mongodb 11:12:16.67 INFO ==> ** Starting MongoDB setup ** mongodb 11:12:17.06 INFO ==> Validating settings in MONGODB_* env vars... mongodb 11:12:17.85 WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment. mongodb 11:12:18.16 INFO ==> Initializing MongoDB... mongodb 11:12:19.37 INFO ==> Deploying MongoDB from scratch... /opt/bitnami/scripts/libos.sh: line 336: 47 Illegal instruction (core dumped) "$@" > /dev/null 2>&1

charanhs123 avatar May 13 '24 11:05 charanhs123

It seems the CPU you are using isn't supported - see https://github.com/bitnami/charts/issues/12834 and https://github.com/bitnami/charts/issues/10255.

calohmn avatar May 13 '24 12:05 calohmn

hello @calohmn thank you so much for the information, I went through the discussion and like mentioned here https://www.mongodb.com/docs/manual/administration/production-notes/#platform-support I changed the processor on my VM in Proxmox to Sandry Bridge , now the pod Mongodb is working properly and I tried the examples given in Cloud2edge vlog and it worked. Thanks for the responses again

charanhs123 avatar May 13 '24 13:05 charanhs123