vinbigdata-medical / vindr-lab-deployment

Getting started with VinDr Lab. We support Kubernetes and Docker deployments.
MIT License
19 stars 8 forks source link

Caught 502 bad gateway when running by kubernetes #3

Open nautilux2 opened 3 years ago

nautilux2 commented 3 years ago

image image image image

Same as error occur when running by docker I think it's some kind of misconfigured

iamatsundere commented 3 years ago

I've updated the Note/README in the commit a056252. Please check it.

nautilux2 commented 3 years ago

@iamatsundere nah, I've just deployed and waited about 10mins but it still the same for keycloak image Update error logs screenshot image

iamatsundere commented 3 years ago

Have you tried something like localhost:8080/minio or did you use 8080 port for other service in your machine?

nautilux2 commented 3 years ago

Hi @iamatsundere image image Here is localhost:8080/minio vin git 2 And here is 8080 port

iamatsundere commented 3 years ago

Can you run kubectl get svc -n vinlab and send me the return?

nautilux2 commented 3 years ago

image

Here you go

iamatsundere commented 3 years ago

image

Here you go

It seems like the services in cluster worked. Please jump into the nginx pod, then run curl -i http://es.vinlab:9200 and check the result. I guess there might be something wrong when connect between the gateway and the services behind.

nautilux2 commented 3 years ago

In the first comment, I gave you an image with an error that can not connect to elasticsearch image I think you missed it

iamatsundere commented 3 years ago

In the first comment, I gave you an image with an error that can not connect to elasticsearch I think you missed it

My bad, I think the kubernetes coredns service can't resolve the services now. Can you check the log of it and restart it?

nautilux2 commented 3 years ago

Here is coredns log image Let me restart and let you know

nautilux2 commented 3 years ago

@iamatsundere Dashboard url seems working coz it redirects to http://localhost:8080/auth/realms/vinlab/protocol/openid-connect/auth?client_id=vinlab-frontend&response_type=code&state=lwvqhedf9fk&scope=profile&redirect_uri=http://localhost:8080/dashboard but the keycloak URL still stuck in bad gateway

iamatsundere commented 3 years ago

I think the Keycloak works fine, because when the dashboard redirects to http://localhost:8080/auth/realms/vinlab/protocol/openid-connect/auth?client_id=vinlab-frontend&response_type=code&state=lwvqhedf9fk&scope=profile&redirect_uri=http://localhost:8080/dashboard, it is the link provided by Keycloak. Please retry in fresh browser and I'll think about it.

Ping me if MinIO and OrthanC url work...

nautilux2 commented 3 years ago

@iamatsundere Neither MinIO nor OrthanC url work. Both produce 502 error code

iamatsundere commented 3 years ago

Can you check the nginx log or your local machine firewall?

nautilux2 commented 3 years ago

Here nginx logs for MinIO and OrthanC image

iamatsundere commented 3 years ago

I've updated the documentations, please try it again, thanks!

Stephen-Lobo commented 2 years ago

Hi, I have tried to install multiple times through Docker, but getting same 502 Bad gateway error for myipaddress:8080/auth url. As per your document, I even waited for hours, but still same error.

Error logs displays :

[error] 30#30: *122 connect() failed (113: No route to host) while connecting to upstream, client: MYLOCAL_IP_ADDRESS server: 0.0.0.0, request: "GET /auth HTTP/1.1", upstream: "http://MY_SERVER_IP_ADDRESS:9090/auth", host: "MY_SERVER_IP_ADDRESS:8080" MYLOCAL_IP_ADDRESS - - [06/Dec/2021:19:08:47 +0000] "GET /auth HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36" "-"

Please help.

iamatsundere commented 2 years ago

Sorry for disconnecting, have you tried http://your_host:8080/minio or http://your_host:8080/elasticsearch?