Recently we just installed Sentry Onpremise version 21.9.0. Installation has been successful and we can access the web page. We also has enabled SSO and we can login to web using SSO.
We found several errors when access several menu/page on sentry web.
Mostly the error is 502 error and from console inspect on web browser the url that sent 502 error is /api/ for example:
These requests should not be going to Sentry but to relay, that’s why you are having issues. Looks like you are not using our Nginx config from the onpremise repo as it does this routing out of the box.
So basically when doing first installation, we just change some parameters on config.yaml and sentry.conf.py to use external redis cluster and external postgres DB. Also doing some changes on mail configuration. But the rest should be the same.
2021-10-06T04:02:31Z [r2d2] ERROR: failed to lookup address information: Name or service not known
2021-10-06T04:02:36Z [relay_log::utils] ERROR: could not initialize redis cluster client
caused by: failed to pool redis connection
caused by: timed out waiting for connection: failed to lookup address information: Name or service not known
2021-10-06T04:02:58Z [relay_server::actors::upstream] ERROR: authentication encountered error: could not send request to upstream
caused by: error sending request for url (http://web:9000/api/0/relays/register/challenge/): error trying to connect: tcp connect error: Connection refused (os error 111)
2021-10-06T04:02:58Z [rdkafka::client] ERROR: librdkafka: FAIL [thrd:kafka:9092/bootstrap]: kafka:9092/bootstrap: Connect to ipv4#172.18.0.27:9092 failed: Connection refused (after 1ms in state CONNECT)
2021-10-06T04:02:58Z [relay_server::actors::upstream] ERROR: authentication encountered error: could not send request to upstream
caused by: error sending request for url (http://web:9000/api/0/relays/register/challenge/): error trying to connect: tcp connect error: Connection refused (os error 111)
2021-10-06T04:02:58Z [rdkafka::client] ERROR: librdkafka: Global error: BrokerTransportFailure (Local: Broker transport failure): kafka:9092/bootstrap: Connect to ipv4#172.18.0.27:9092 failed: Connection refused (after 1ms in state CONNECT)
2021-10-06T04:02:58Z [rdkafka::client] ERROR: librdkafka: Global error: AllBrokersDown (Local: All broker connections are down): 1/1 brokers are down
2021-10-06T04:02:58Z [rdkafka::client] ERROR: librdkafka: FAIL [thrd:kafka:9092/bootstrap]: kafka:9092/bootstrap: Connect to ipv4#172.18.0.27:9092 failed: Connection refused (after 7ms in state CONNECT)
2021-10-06T04:02:58Z [rdkafka::client] ERROR: librdkafka: Global error: BrokerTransportFailure (Local: Broker transport failure): kafka:9092/bootstrap: Connect to ipv4#172.18.0.27:9092 failed: Connection refused (after 7ms in state CONNECT)
2021-10-06T04:02:58Z [rdkafka::client] ERROR: librdkafka: Global error: AllBrokersDown (Local: All broker connections are down): 1/1 brokers are down
2021-10-06T04:02:59Z [rdkafka::client] ERROR: librdkafka: FAIL [thrd:kafka:9092/bootstrap]: kafka:9092/bootstrap: Connect to ipv4#172.18.0.27:9092 failed: Connection refused (after 0ms in state CONNECT, 1 identical error(s) suppressed)
2021-10-06T04:02:59Z [rdkafka::client] ERROR: librdkafka: Global error: BrokerTransportFailure (Local: Broker transport failure): kafka:9092/bootstrap: Connect to ipv4#172.18.0.27:9092 failed: Connection refused (after 0ms in state CONNECT, 1 identical error(s) suppressed)
2021-10-06T04:02:59Z [relay_server::actors::upstream] ERROR: authentication encountered error: could not send request to upstream
caused by: error sending request for url (http://web:9000/api/0/relays/register/challenge/): error trying to connect: tcp connect error: Connection refused (os error 111)
Actually we changed the redis configuration to use external redis cluster. But for kafka we still use internal kafka that run from sentry docker-compose.yml. We also has changed redis related configuration on config.yml and sentry.conf.py
Relay cannot resolve the address of redis, hence not being able to connect to it
It cannot authenticate with Sentry web service, getting a “Connection refused” error, indicating that the service is not healthy or not listening on the default port that it should be listening to
It cannot connect to kafka with the same “Connection refused” error.
Adding these up, it definitely looks like a network and routing issue to me in your setup.