Closed qwz111 closed 1 month ago
Hi, have you tried other applications like hotel reservation? Based on the YAML you provided, I think you are configuring things correctly, so I recommend you to test other application first to see if it's a problem about your k8s cluster.
Hi, have you tried other applications like hotel reservation? Based on the YAML you provided, I think you are configuring things correctly, so I recommend you to test other application first to see if it's a problem about your k8s cluster.
Hi, thank you for your advice! I try to test hotel reservation in my k8s cluster, but when I deploy only stateless deployments only(run init_app()
only in main.py
, It still has some errors, here is the log of the entry of hotel-reservation, exactly frontend:
root@master:~# kubectl logs frontend-6685f495bd-vbszm -n hotel-reserv
2024/08/18 06:48:35 TLS disabled
2024-08-18T06:48:35Z INF cmd/frontend/main.go:21 > Reading config...
2024-08-18T06:48:35Z INF cmd/frontend/main.go:36 > Read target port: 5000
2024-08-18T06:48:35Z INF cmd/frontend/main.go:37 > Read consul address: consul:8500
2024-08-18T06:48:35Z INF cmd/frontend/main.go:38 > Read jaeger address: jaeger:6831
2024-08-18T06:48:35Z INF cmd/frontend/main.go:45 > Initializing jaeger agent [service name: frontend | host: jaeger:6831]...
2024-08-18T06:48:35Z PNC cmd/frontend/main.go:48 > Got error while initializing jaeger agent: lookup jaeger on 10.96.0.10:53: no such host
panic: Got error while initializing jaeger agent: lookup jaeger on 10.96.0.10:53: no such host
goroutine 1 [running]:
github.com/rs/zerolog.(*Logger).Panic.func1({0xc000024120, 0x0})
/go/src/github.com/harlow/go-micro-services/vendor/github.com/rs/zerolog/log.go:359 +0x2d
github.com/rs/zerolog.(*Event).msg(0xc00006a060, {0xc000024120, 0x57})
/go/src/github.com/harlow/go-micro-services/vendor/github.com/rs/zerolog/event.go:149 +0x2b8
github.com/rs/zerolog.(*Event).Msgf(0xc00006a060, {0x8dfe90, 0xc00011e470}, {0xc000187c00, 0xb, 0x8cc659})
/go/src/github.com/harlow/go-micro-services/vendor/github.com/rs/zerolog/event.go:129 +0x4e
main.main()
/go/src/github.com/harlow/go-micro-services/cmd/frontend/main.go:48 +0xa3b
By the way, when I run (run full_init("hotel", 30096)
only in main.py
, It doesn't have this error(this case is deploying all services in hotel application).
it seems that there is not a jeager host, but the service of jeager host is in stateful service set, in yamlRepository/hotelReservation/non-test
, so I want to konw if I need to deploy the jeager service before I deploy the stateless service only?
Yes, jaeger is classified as a part of stateful services and you need to deploy stateful services first. Those stateful services can be deployed through full_init()
.
ok, it works now. Thank you very much!
I start a cluster with 4 nodes on Alibaba Cloud by ECS and deploy prometheus on it as follow:
I install the python dependencies in requirements.txt and change Erms-main/configs/media-global/yaml as follows
When I run
main.py
following problems occurs:and I examine the state of pod, see:
so the entry of media service----nginx-web-server's pod is not ready, and when I examine the log of nginx-web-server-9c9ccfbcb-flbx5, I see:
It seems that media-microsvc cannot be deployed properly. I guess I didn't modify the configuration files (i.e., *-global.yaml and utils.py) correctly but I don't know how to fix it.