Hello,
I’m use self-hosted Sentry 9.1.2, and now try to update it to 21.3.0. I created separate instances for redis, clickhouse, postgres, kafka. On main server I will start only sentry web, snubs and relay.
For this I will use docker-compose.yml from your repository, just removes some services. And will provide variables with my existing services. All works just fine, across relay.
I got these errors after start:
relay_1 | 2021-04-02T12:26:37Z [relay_server::actors::upstream] WARN: Network outage, scheduling another check in 0ns
relay_1 | 2021-04-02T12:26:37Z [relay_server::actors::upstream] ERROR: authentication encountered error: could not send request to upstream
relay_1 | caused by: could not send request using reqwest
relay_1 | caused by: error sending request for url (http://web:9000/api/0/relays/register/challenge/): operation timed out
My resolve.conf from relay:
$ docker-compose exec relay bash
root@c61c2db57f11:/work# cat /etc/resolv.conf
nameserver 127.0.0.11
options ndots:0
I can send requests from relay container after installation curl:
root@c61c2db57f11:/work# curl -I http://web:9000/
HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Location: /auth/login/
X-Robots-Tag: noindex, nofollow
Vary: Accept-Language, Cookie
Content-Language: en
Content-Length: 0
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Set-Cookie: sentrysid=gAJ9cQBYBQAAAF9uZXh0cQFYAQAAAC9xAnMu:1lSIe9:sYmc8R-RAfPzKt7TCa4CKzUuf4c; expires=Fri, 16-Apr-2021 12:11:29 GMT; HttpOnly; Max-Age=1209600; Path=/
root@c61c2db57f11:/work# curl -I http://web:9000/api/0/relays/register/challenge/
HTTP/1.1 405 Method Not Allowed
Content-Type: application/json
Allow: POST, OPTIONS
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding
Access-Control-Expose-Headers: X-Sentry-Error, Retry-After
Access-Control-Allow-Origin: *
Vary: Accept-Language, Cookie
Content-Language: en
Content-Length: 41
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
But relay container logged what it cannot send request. I use relay settings from your repository, and created credentials.json from install.sh file.
What happend?
Docker version 20.10.5, build 55c4c88
docker-compose version 1.28.5, build c4eb3a1f
I was try downgrade docker too, but relay do not work:
Docker version 19.03.14, build 5eb3275d40
I got ip address for web container and try it to use in relay, but got the same error:
relay_1 | 2021-04-02T13:50:56Z [relay_server::actors::upstream] ERROR: authentication encountered error: could not send request to upstream
relay_1 | caused by: could not send request using reqwest
relay_1 | caused by: error sending request for url (http://172.17.0.21:9000/api/0/relays/register/challenge/): operation timed out
It’s not dns issue. And connection sucessful:
root@1d457d6999fc:/work# curl -I http://172.17.0.21:9000/api/0/relays/register/challenge/
HTTP/1.1 405 Method Not Allowed
Content-Type: application/json
Allow: POST, OPTIONS
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding
Access-Control-Expose-Headers: X-Sentry-Error, Retry-After
Access-Control-Allow-Origin: *
Vary: Accept-Language, Cookie
Content-Language: en
Content-Length: 41
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
root@1d457d6999fc:/work# curl -I http://172.17.0.21:9000/
HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Location: /auth/login/
X-Robots-Tag: noindex, nofollow
Vary: Accept-Language, Cookie
Content-Language: en
Content-Length: 0
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Set-Cookie: sentrysid=gAJ9cQBYBQAAAF9uZXh0cQFYAQAAAC9xAnMu:1lSKCP:NZ3QFfPwzQZuF0dAo9abN-pKxgE; expires=Fri, 16-Apr-2021 13:50:57 GMT; HttpOnly; Max-Age=1209600; Path=/