OsiriX-Foundation / kheops

20 stars 11 forks source link

502:Bad gateway from API using reverse proxy-letsencrypt #48

Closed DennisMuchiri closed 2 years ago

DennisMuchiri commented 2 years ago

Hi @nikpap @spalte @rliechti . I followed the tutorial about securing my installation https://github.com/OsiriX-Foundation/KheopsDocumentation/blob/master/docs/installation/installation.md .Keycloak works fine but after log in api requests don't go through. A 502 response is returned. What am I missing?

Screenshot 2022-02-13 at 17 45 03 copy
DennisMuchiri commented 2 years ago

@nikpap please help

nikpap commented 2 years ago

Hello @DennisMuchiri , could you provide the changes you made to docker-compose.yml and docker-compose.env ? Are you using Let's Encrypt or a custom certificate?

DennisMuchiri commented 2 years ago

@nikpap I am using the reverse proxy-letsencrypt version . letsencrypt.

Here is the link https://drive.google.com/drive/folders-yTeNoQ4bT8?usp=sharing

nikpap commented 2 years ago

Both of these files look correct. Can you send me a copy of your docker-compose logs ?

docker-compose logs

DennisMuchiri commented 2 years ago

@nikpap okay sending in a few(the file is really huge). All works okay but the api requests are not getting to the /api end points.

DennisMuchiri commented 2 years ago

@nikpap here it is

https://drive.google.com/file/d//view?usp=sharing

nikpap commented 2 years ago

I have a hunch that the kheopsauthorization container is not working as expected.

I see no logs from it after a certain point, that's definitely not normal (eg there's a log when a user logs in).

If you do a docker ps -a, has it exited? If not, can you only share it's log?

DennisMuchiri commented 2 years ago

@nikpap no it's still up and running

Screenshot 2022-02-14 at 14 00 19

g

DennisMuchiri commented 2 years ago

@nikpap

Screenshot 2022-02-14 at 14 03 27
DennisMuchiri commented 2 years ago

@nikpap I think the proxy is rejecting my connection.

nikpap commented 2 years ago

I just realized that KHEOPS_AUTHORIZATION_PORT is set to port 8443 in docker-compose.env. I suspect that might be causing the issue. It should be set to 8080.

If that doesn't work, I think it might be best to set up a Zoom call to debug this issue.

DennisMuchiri commented 2 years ago

@nikpap okay let me try this. If it doesn't work, we'll have the call

DennisMuchiri commented 2 years ago

@nikpap that was the issue. Thanks a alot. Closing.