Problem with Rocket.Chat Cloud Connect

Description

I cannot connect my Rocket Chat instance to Rocket.Chat Cloud Connect successfully.
Here’s exactly what happens:

    1. logged into my rocket.chat cloud account and navigated to “Workspaces”
    1. clicked “Register self-managed” on the top right => I am shown a Dialog with a registration token
    1. Naviagte to “Connectivity Services” inside my running Rocket.Chat instance
    1. I am presented with an input-field where I am prompted to enter the token. Entered the token I got form cloud inside this input field.
    1. pressed the “connect” button below the input field. the following error displayed:
      image

At the same time the rocket.chat container logs the following:

{“level”:50,“time”:“2022-01-10T13:30:23.672Z”,“pid”:10,“hostname”:“ba3f7a85bdc3”,“name”:“System”,“err”:{“type”:“Error”,“message”:“tunneling socket could not be established, cause=self signed certificate”,“stack”:“Error: tunneling socket could not be established, cause=self signed certificate\n at ClientRequest.onError (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/tunnel-agent/index.js:177:17)\n at Object.onceWrapper (events.js:421:26)\n at ClientRequest.emit (events.js:314:20)\n at ClientRequest.EventEmitter.emit (domain.js:483:12)\n at TLSSocket.socketErrorListener (_http_client.js:427:9)\n at TLSSocket.emit (events.js:314:20)\n at TLSSocket.EventEmitter.emit (domain.js:483:12)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)”,“code”:“ECONNRESET”},“msg”:“tunneling socket could not be established, cause=self signed certificate”}

Every time I log in, I am reminded that the cloud registration is pending.

Server Setup Information

  • Rocket.Chat version 4.3.0
  • Operating System: container using rocket.chat:4.3.0 running within Debian 10
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: sorry, not sure what to report here.
  • NodeJS Version: with the docker image
  • MongoDB Version: 5.0.5-focal
  • Proxy: traefik
  • Firewalls involved: -

Any additional Information

Hi!
Did you ask this question at http://open.rocket.chat/channel/support?

There is a similar issue there.

Looks like a connectivity issue to me.

My suggestion is to create a server at your local machine, using docker if possible and trying to replicate that on a different connection.

Does the server where you user facing this issue has any kind of firewall restriction?

yes, I did ask that question in the #support channel as well.
I do not think that there is any firewall restriction.

Also other containers that I have running which need to connect to servers on the outside and do name resolution appear to be working fine.

I could try running the docker compose stack locally, but then I would have to modify it, because that won’t work with traefik at all, and then (whether the clodu registration works or does not locally) I am still left with the issue that I do not know how to test if it is in fact a connectivity issue.
Without the likes of ping or wget or apt (to temporarily install something) available inside the container I don’t know how to properly test this.

Turns out, in the end I had to remove the two env variables from my docker-compose file

- HTTP_PROXY=<domain>
- HTTPS_PROXY=<domain>

Just as suggested in custom oauth is ignoring /etc/hosts · Issue #13592 · RocketChat/Rocket.Chat · GitHub

1 Like