-
Notifications
You must be signed in to change notification settings - Fork 2.8k
catalogue unable to connect to Database #889
Comments
have you solved the problem? i meet the same question |
Answer Update! Pre AnswerI meet the same question. When I used |
Hi Team i am facing the same issue but the above answer is not clear for me |
Below are the logs of the catalogue |
Error="Unable to connect to Database" DSN=catalogue_user:default_password@tcp(catalogue-db:3306)/socksdb |
hi @MohammedAbuibaid @ShuaidongGG Could you help me to fix the above issue Thanks in advance |
Same issues maybe point to very different resons. So if you can see the pod "catalogue" not ready, right? |
I have used kubeadm to provision my cluster in aws in ec2 instances of ubuntu os one for master and one for slave ls: ["images/WAT.jpg" "images/WAT2.jpg" "images/bit_of_leg_1.jpeg" "images/bit_of_leg_2.jpeg" "images/catsocks.jpg" "images/catsocks2.jpg" "images/classic.jpg" "images/classic2.jpg" "images/colourful_socks.jpg" "images/cross_1.jpeg" "images/cross_2.jpeg" "images/holy_1.jpeg" "images/holy_2.jpeg" "images/holy_3.jpeg" "images/puma_1.jpeg" "images/puma_2.jpeg" "images/rugby_socks.jpg" "images/sock.jpeg" "images/youtube_1.jpeg" "images/youtube_2.jpeg"] |
Did you got any solution for this |
- Add labels appropriate to the issue
sock-shop demo, catalogue, catalogue-db
- Describe the expected behaviour and the actual behaviour
root@master:~# kubectl get pods -n sock-shop -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
carts-b4d4ffb5c-h27zm 1/1 Running 0 67s 192.168.0.58 master
carts-db-6c6c68b747-9wbrq 1/1 Running 0 68s 192.168.0.51 master
catalogue-5bd97b4988-hbsrk 0/1 Running 0 68s 192.168.0.53 master
catalogue-db-6868f865bb-c7lvd 1/1 Running 0 68s 192.168.0.52 master
front-end-6649c54d45-v7gkh 1/1 Running 0 68s 192.168.0.54 master
orders-7664c64d75-9njmr 1/1 Running 0 68s 192.168.0.56 master
orders-db-659949975f-b6fq9 1/1 Running 0 68s 192.168.0.62 master
payment-dd67fc96f-2897v 0/1 Running 0 67s 192.168.0.55 master
queue-master-5f6d6d4796-549vw 1/1 Running 0 67s 192.168.0.64 master
rabbitmq-5bcbb547d7-sg4hd 2/2 Running 0 67s 192.168.0.60 master
session-db-7cf97f8d4f-4vtvv 1/1 Running 0 67s 192.168.0.59 master
shipping-7f7999ffb7-s8j8c 1/1 Running 0 67s 192.168.0.57 master
user-888469b9f-whzbv 0/1 Running 0 66s 192.168.0.61 master
user-db-6df7444fc-h94tw 1/1 Running 0 66s 192.168.0.63 master
root@master:~# curl 192.168.0.53:80/health
{"health":[{"service":"catalogue","status":"OK","time":"2022-03-21 14:47:04.366461364 +0000 UTC"},{"service":"catalogue-db","status":"err","time":"2022-03-21 14:47:04.366704712 +0000 UTC"}]}
root@master:~# kubectl logs ccatalogue-5bd97b4988-hbsrk -n sock-shop
...
ts=2022-03-21T14:02:29Z caller=main.go:108 Error="Unable to connect to Database" DSN=catalogue_user:default_password@tcp(catalogue-db:3306)/socksdb
ts=2022-03-21T14:02:29Z caller=main.go:136 transport=HTTP port=80
ts=2022-03-21T14:05:31Z caller=logging.go:85 method=Health result=2 took=1.013200827s
- Describe steps to reproduce the problem:
kubectl create -f https://raw.githubusercontent.com/microservices-demo/microservices-demo/master/deploy/kubernetes/complete-demo.yaml
The text was updated successfully, but these errors were encountered: