element-hq / element-hq/synapse
HTTP client reports unhelpful log message on connection error
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#15745](https://github.com/matrix-org/synapse/issues/15745).
---
### Description
When the AS tried to access the ping endpoint, it instead gets a 502 response. The response logs are pretty unhelpful, as it doesn't explain what's actually failing.
Note: This service was working prior to an update to the bridge which caused it to start pinging the HS, so I'm fairly sure the connection to the AS should be fine.
### Steps to reproduce
(I'm afraid I don't know the full steps to cause this, as I'm just reporting what I am seeing)
- Run a bridge which supports the ping endpoint, such as mautrix/whatsapp.
- Start the bridge.
- Notice that it pings out with a 502, with the unhelpful stack trace.
### Homeserver
N/A
### Synapse Version
1.85.1
### Installation Method
Docker (matrixdotorg/synapse)
### Database
PostgreSQL
### Workers
Multiple workers
### Platform
Kubernetes
### Configuration
_No response_
### Relevant log output
```shell
2023-06-08 08:50:52,909 - synapse.http.client - 423 - INFO - POST-136036- Error sending request to POST http://wabridge-appservice-service:29318/_matrix/app/v1/ping: ConnectError [Failure instance: Traceback (failure with no frames): : Connection was closed cleanly.
2023-06-08 08:50:52,909 - synapse.http.server - 114 - INFO - POST-136036- SynapseError: 502 - ConnectError: An error occurred while connecting: [Failure instance: Traceback (failure with no frames): : Connection was closed cleanly.
2023-06-08 08:50:52,910 - synapse.access.http.8008 - 461 - INFO - POST-136036- 13.50.81.126 - 8008 - {@whatsappbot:one.ems.host} Processed request: 0.304sec/0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 192B 502 "POST /_matrix/client/v1/appservice/wabridge/ping?user_id=%40whatsappbot%3Ahost HTTP/1.1" "mautrix-whatsapp/0.8.5-41326773fcbe0255222da58cd32c36d813ed065d+dev.unknown mautrix-go/v0.15.2 go/1.20.5" [0 dbevts]
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.