RocketChat / RocketChat/Rocket.Chat
Error sending push to gateway.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Something strange with push gateway server.
Steps to reproduce:
- Just chat with someone.
Expected behavior:
Actual behavior:
- Push notify missing.
- Sometimes push notify doubles.
Server Setup Information:
- Version of Rocket.Chat Server: 3.8.0
- Operating System: Ubuntu 18.04
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 12.18.4
- MongoDB Version:4.0.21
Client Setup Information
- Desktop App or Browser Version: MacOS, Web, Android, iOS.
Additional context
Relevant logs:
`server.js:204 Push ➔ error Error sending push to gateway (0 try) -> Error: failed [502] Bad Gateway
at Object.exports.makeErrorByStatus (packages/http.js:177:10)
at Request._callback (packages/http.js:141:24)
at Request.self.callback (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:185:22)
at Request.emit (events.js:315:20)
at Request.EventEmitter.emit (domain.js:483:12)
at Request. (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1161:10)
at Request.emit (events.js:315:20)
at Request.EventEmitter.emit (domain.js:483:12)
at IncomingMessage. (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at IncomingMessage.EventEmitter.emit (domain.js:483:12)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
response: {
statusCode: 502,
content: 'Bad Gateway',
headers: {
date: 'Wed, 09 Dec 2020 12:24:58 GMT',
'content-length': '11',
'content-type': 'text/plain; charset=utf-8',
connection: 'close'
},
data: null
}
}
server.js:204 Push ➔ error Error sending push to gateway (0 try) -> Error: ESOCKETTIMEDOUT
at ClientRequest. (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:421:28)
at ClientRequest.emit (events.js:315:20)
at ClientRequest.EventEmitter.emit (domain.js:483:12)
at TLSSocket.emitRequestTimeout (_http_client.js:709:9)
at Object.onceWrapper (events.js:421:28)
at TLSSocket.emit (events.js:327:22)
at TLSSocket.EventEmitter.emit (domain.js:483:12)
at TLSSocket.Socket._onTimeout (net.js:482:8)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
code: 'ESOCKETTIMEDOUT',
connect: false
}
server.js:204 Push ➔ error Error sending push to gateway (1 try) -> Error: ESOCKETTIMEDOUT
at ClientRequest. (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:421:28)
at ClientRequest.emit (events.js:315:20)
at ClientRequest.EventEmitter.emit (domain.js:483:12)
at TLSSocket.emitRequestTimeout (_http_client.js:709:9)
at Object.onceWrapper (events.js:421:28)
at TLSSocket.emit (events.js:327:22)
at TLSSocket.EventEmitter.emit (domain.js:483:12)
at TLSSocket.Socket._onTimeout (net.js:482:8)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
code: 'ESOCKETTIMEDOUT',
connect: false
}
server.js:204 Push ➔ error Error sending push to gateway (2 try) -> Error: ESOCKETTIMEDOUT
at ClientRequest. (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:421:28)
at ClientRequest.emit (events.js:315:20)
at ClientRequest.EventEmitter.emit (domain.js:483:12)
at TLSSocket.emitRequestTimeout (_http_client.js:709:9)
at Object.onceWrapper (events.js:421:28)
at TLSSocket.emit (events.js:327:22)
at TLSSocket.EventEmitter.emit (domain.js:483:12)
at TLSSocket.Socket._onTimeout (net.js:482:8)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
code: 'ESOCKETTIMEDOUT',
connect: false
}
`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at server.js:204, where the push gateway errors and retry attempts are logged, and inspect the push delivery entry point around that path. Reproduce the missing and duplicated notifications using the provided server setup and logs; done means push requests no longer fail or create duplicate notifications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nodejs, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100