Giter VIP home page Giter VIP logo

Comments (10)

ShuaidongGG avatar ShuaidongGG commented on May 27, 2024 1

oops, I notice that you wanna show some screenshot but it doesn't really show. Here is what I can see.
image

So anyway, if you wanna debug errors in you k8s, you should try to login to your "catalaogue" pod and test network connectivity with other nodes and pods. You maybe use the command line to debug, instead of checking your error logs again and again. And How use command line to debug, I think you can google it. Hope it helps. :)

from microservices-demo.

ChongyangZ avatar ChongyangZ commented on May 27, 2024

have you solved the problem? i meet the same question

from microservices-demo.

ShuaidongGG avatar ShuaidongGG commented on May 27, 2024

Answer Update!
The reson made this issus happen on my k8s was that i forget to edit the hosts file( it's on /etc/hosts maybe ). so when i add some route rules to hosts file like this 192.168.56.190 master1 and rebuild cluster, it works.

Pre Answer

I meet the same question. When I used kubectl logs catalogue-5bd97b4988-hbsrk -n sock-shop -v=9 to check out what's going on, I noticed a unnormal response body hostIP=10.0.2.15, it's seem a NAT default IP. So I try to drain all pod(sock-shop related) to an alone Node, and it works. The reason I guess that pods like catalogue need database running on locally, and if wanna distributed running maybe every node should running database image or some better sulotion.

from microservices-demo.

vamshibeju avatar vamshibeju commented on May 27, 2024

Hi Team

i am facing the same issue but the above answer is not clear for me

from microservices-demo.

vamshibeju avatar vamshibeju commented on May 27, 2024

Below are the logs of the catalogue
LAST SEEN TYPE REASON OBJECT MESSAGE
2m27s Warning Unhealthy pod/catalogue-6479dbb5bd-ss678 Readiness probe failed: Get "http://10.244.1.185:80/health": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

from microservices-demo.

vamshibeju avatar vamshibeju commented on May 27, 2024

Error="Unable to connect to Database" DSN=catalogue_user:default_password@tcp(catalogue-db:3306)/socksdb

from microservices-demo.

vamshibeju avatar vamshibeju commented on May 27, 2024

hi @MohammedAbuibaid @ShuaidongGG

Could you help me to fix the above issue

Thanks in advance

from microservices-demo.

ShuaidongGG avatar ShuaidongGG commented on May 27, 2024

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 think the code in "catalogue pod" rely on the "database pod". Your "catalogue pod" can't works while it can't connect to "database pod". I don't realy know how your k8s build, so I can't really help more without more infomation. Maybe it helps : )

from microservices-demo.

vamshibeju avatar vamshibeju commented on May 27, 2024

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 think the code in "catalogue pod" rely on the "database pod". Your "catalogue pod" can't works while it can't connect to "database pod". I don't realy know how your k8s build, so I can't really help more without more infomation. Maybe it helps : )

I have used kubeadm to provision my cluster in aws in ec2 instances of ubuntu os one for master and one for slave
My catalaogue db is working successfully but catalogue deployment
is not working and getting the below error

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"]
ts=2023-08-30T19:28:15Z caller=main.go:108 Error="Unable to connect to Database" DSN=catalogue_user:default_password@tcp(catalogue-db:3306)/socksdb
ts=2023-08-30T19:28:15Z caller=main.go:136 transport=HTTP port=80
ts=2023-08-30T19:31:17Z caller=logging.go:85 method=Health result=2 took=20.003337999s
ts=2023-08-30T19:31:17Z caller=logging.go:85 method=Health result=2 took=50.004340945s
ts=2023-08-30T19:32:07Z caller=logging.go:85 method=Health result=2 took=50.002380741s
ts=2023-08-30T19:32:07Z caller=logging.go:85 method=Health result=2 took=20.001907332s
ts=2023-08-30T19:32:57Z caller=logging.go:85 method=Health result=2 took=8.462768ms
ts=2023-08-30T19:32:57Z caller=logging.go:85 method=Health result=2 took=30.010821456s
ts=2023-08-30T19:32:57Z caller=logging.go:85 method=Health result=2 took=20.000942237s
ts=2023-08-30T19:32:57Z caller=logging.go:85 method=Health result=2 took=50.002989202s

from microservices-demo.

vamshibeju avatar vamshibeju commented on May 27, 2024

have you solved the problem? i meet the same question

Did you got any solution for this

from microservices-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.