[Support] Rocket.Chat


Recommended Posts

19 hours ago, Zeroeth said:

 

I've had the exact same problem today, and the above argument seems to have fixed the issue. However, I can see the below error in the logs right after > SERVER RUNNING. Would appreciate any insights on this.

 

+--------------------------------------------------+
|                  SERVER RUNNING                  |
+--------------------------------------------------+
|                                                  |
|  Rocket.Chat Version: 5.0.1                      |
|       NodeJS Version: 14.19.3 - x64              |
|      MongoDB Version: 5.0.10                     |
|       MongoDB Engine: unknown                    |
|             Platform: linux                      |
|         Process Port: 3000                       |
|             Site URL: https://xxx  |
|     ReplicaSet OpLog: Enabled                    |
|          Commit Hash: xxx                 |
|        Commit Branch: HEAD                       |
|                                                  |
+--------------------------------------------------+
=== UnHandledPromiseRejection ===
MongoServerSelectionError: getaddrinfo ENOTFOUND mongodatabase
    at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/mongodb/lib/sdam/topology.js:306:38)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)
 => awaited here:
    at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
    at server/database/DatabaseWatcher.ts:96:3
    at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 {
  reason: TopologyDescription {
    type: 'ReplicaSetNoPrimary',
    servers: Map(1) { 'mongodatabase:27017' => [ServerDescription] },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: 'rs01',
    maxSetVersion: 1,
    maxElectionId: new ObjectId("7fffffff0000000000000034"),
    commonWireVersion: 13,
    logicalSessionTimeoutMinutes: undefined
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {}
}
---------------------------------
Errors like this can cause oplog processing errors.
Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the process
Future node.js versions will automatically exit the process
=================================

 

 

 

 

Adding the directConnection=true argument to both the MONGO_URL and MONGO_OPLOG_URL seems to have resolved the issue above.

 

MONGO_URL:

mongodb://rocketchat:<password>@<localhost>:27017/rocketchat?directConnection=true

 

MONGO_OPLOG_URL

mongodb://rocketchat:<password>@<localhost>:27017/local?authSource=admin&directConnection=true

 

Reference:

https://github.com/RocketChat/Rocket.Chat/releases

 

image.png.2387f526db243e89131fbfe13372303c.png

 

@9BAR Thanks for the update regarding adding the above argument. :)

 

Edited by Zeroeth
  • Like 1
Link to comment

I made the changes mentioned above.  I don't get the error screen anymore and the startup logs look proper now for rocketchat, however, the web page does not load.  I just get a dark blue screen.

 

Just did a test and it seems like the mobile apps work.  It's just the web interface does not.  I should clarify that it's the internal web location.  The external web location works.

Edited by Mogo
Link to comment
  • 1 month later...

Hi!

 

After the last update for RC and MongoDB, I'm getting the following errors. RC is working, but notifications (both in the browser and app) just don't work anymore.

 

Quote

 

{"level":40,"time":"2022-09-15T11:54:21.307Z","pid":1,"hostname":"39f56867de46","name":"Push","msg":"Error sending push to gateway (not authorized) {\"statusCode\":401,\"content\":\"{\\\"code\\\":121,\\\"error\\\":\\\"rocket.chat cloud registration required\\\",\\\"requestId\\\":\\\"0bc27b0d-1e88-4859-b3a4-4a8d3eb88698\\\",\\\"status\\\":401}\",\"headers\":{\"access-control-allow-headers\":\"Content-Type, Authorization, Content-Length, X-Requested-With\",\"access-control-allow-methods\":\"GET, PUT, POST, DELETE, OPTIONS\",\"access-control-allow-origin\":\"*\",\"access-control-expose-headers\":\"Content-Type, Authorization, Cache-Control, Expires, Pragma, X-powered-by\",\"cache-control\":\"private, no-cache, no-store, must-revalidate\",\"connection\":\"close\",\"content-length\":\"126\",\"content-type\":\"application/json; charset=utf-8\",\"date\":\"Thu, 15 Sep 2022 11:54:21 GMT\",\"expires\":\"-1\",\"pragma\":\"no-cache\",\"vary\":\"Accept-Encoding\",\"x-powered-by\":\"Rocket Fuel and Rocketeers\"},\"ok\":false,\"data\":{\"code\":121,\"error\":\"rocket.chat cloud registration required\",\"requestId\":\"0bc27b0d-1e88-4859-b3a4-4a8d3eb88698\",\"status\":401}}"}


 

 

 

 

I've tried re-registering RC on the cloud and currently it shows the instance is connected. I'm also able to sync it, at least that's the notification that I get :).

 

image.thumb.png.370a67c6203d3a900ef0d266decbb1eb.png

 

image.png.1c534c8103438681f854b960cb81fcbe.png

 

image.thumb.png.0f220e86028b27f9ddac80f9f4c73afe.png

 

but I cannot Login to Rocket.Chat Cloud when I click the Login to Rocket.Chat Cloud button. This is the error message that I get:

 

Quote

{"level":50,"time":"2022-09-15T12:01:09.946Z","pid":1,"hostname":"39f56867de46","name":"System","err":{"type":"Error","message":"failed [401]{\"status\":401}","stack":"Error: failed [401]{\"status\":401}\n    at makeErrorByStatus (server/lib/http/call.ts:59:9)\n    at server/lib/http/call.ts:168:19\n    at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40","response":{"statusCode":401,"content":"{\"status\":401}","headers":{"access-control-allow-headers":"Content-Type, Authorization, Content-Length, Last-Event-ID, X-Requested-With","access-control-allow-methods":"GET, PUT, POST, DELETE, OPTIONS","access-control-allow-origin":"*","access-control-expose-headers":"Content-Type, Authorization, Cache-Control, Expires, Pragma, X-powered-by","cache-control":"private, no-cache, no-store, must-revalidate","connection":"close","content-length":"14","content-type":"application/json; charset=utf-8","date":"Thu, 15 Sep 2022 12:01:09 GMT","expires":"-1","pragma":"no-cache","vary":"Accept-Encoding","x-fleet-version":"-77b34ba","x-powered-by":"Rocket Fuel and Rocketeers"},"ok":false,"data":{"status":401}}},"msg":"failed [401]{\"status\":401}"}
{"level":50,"time":"2022-09-15T12:03:45.303Z","pid":1,"hostname":"39f56867de46","name":"System","msg":"Exception while invoking method cloud:finishOAuthAuthorization 'Invalid state provided [error-invalid-state]'"}

 

My RC docker log on start:

 

 

image.thumb.png.ce633cd340c9935ac6ffb1ecf5ef62b8.png

 

 

Would highly appreciate any insights/help to resolve this issue.
 

Link to comment
  • 2 weeks later...

Can confirm I and some others are having this issue.

 

See Zeroeth's support thread here:

 

https://forums.rocket.chat/t/error-in-push-notifications-cloud-registration-error/14940

 

There's a user in there on the latest version so it may or not be an unRAID issue as we're out of date at the moment. 

 

Github bug:

 

https://github.com/RocketChat/Rocket.Chat/issues/26947

 

Here's the server log entry on error

{"level":50,"time":"2022-09-26T06:17:22.311Z","pid":1,"hostname":"0b8fd1acb48a","name":"System","msg":"Exception while invoking method cloud:finishOAuthAuthorization 'Invalid state provided [error-invalid-state]'"}

Edited by Avsynthe
Link to comment
  • 2 weeks later...

Hey all. Sorry I've been busy but I did end up having that chat with @dudanogueira from Rocket.Chat. Great guy btw!

The solution was to use the docker compose stack that installs rocket.chat and mongodb together. If you're on unRAID like me, you'll need to look at getting Docker Compose enabled first, yes it's a thing and it works great.

Here is the compose file:

volumes:
  mongodb_data: { driver: local }
networks:
  default:
    external: false
  **_YOUR-CUSTOM-DOCKER-NETWORK_**:
    external: true



services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
    restart: on-failure
    labels:
      traefik.enable: "true"
      traefik.http.routers.rocketchat.rule: Host(`${DOMAIN}`)
      traefik.http.routers.rocketchat.tls: "true"
      traefik.http.routers.rocketchat.entrypoints: https
      traefik.http.routers.rocketchat.tls.certresolver: le
    environment:
      MONGO_URL: "${MONGO_URL:-\
        mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        ${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\
        -mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3001}}
      PORT: ${PORT:-3001}
      DEPLOY_METHOD: docker
      DEPLOY_PLATFORM: ${DEPLOY_PLATFORM}
    depends_on:
      - mongodb
    expose:
      - ${PORT:-3001}
    networks:
      - default
      - YOUR-CUSTOM-DOCKER-NETWORK
    ports:
      - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3001}:${PORT:-3001}"



  mongodb:
    image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-4.4}
    restart: on-failure
    volumes:
      - mongodb_data:/bitnami/mongodb
    environment:
      MONGODB_REPLICA_SET_MODE: primary
      MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0}
      MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017}
      MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb}
      MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
      MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb}
      MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
      ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}

 

Please note thee sections that read "**_YOUR-CUSTOM-DOCKER-NETWORK_**", this is where you would enter the name of your custom docker network if you use one, there are two sections, one near the top and one under the "networks" parameter after the port is specified further below.

 

This was one and done, all working. That easily! I was able to register the server and log in to Rocket.Chat cloud from the settings menu with everything working perfectly. Good luck!

Link to comment
On 9/15/2022 at 4:30 PM, Zeroeth said:

Hi!

 

After the last update for RC and MongoDB, I'm getting the following errors. RC is working, but notifications (both in the browser and app) just don't work anymore.

 

 

 

 

I've tried re-registering RC on the cloud and currently it shows the instance is connected. I'm also able to sync it, at least that's the notification that I get :).

 

image.thumb.png.370a67c6203d3a900ef0d266decbb1eb.png

 

image.png.1c534c8103438681f854b960cb81fcbe.png

 

image.thumb.png.0f220e86028b27f9ddac80f9f4c73afe.png

 

but I cannot Login to Rocket.Chat Cloud when I click the Login to Rocket.Chat Cloud button. This is the error message that I get:

 

 

My RC docker log on start:

 

 

image.thumb.png.ce633cd340c9935ac6ffb1ecf5ef62b8.png

 

 

Would highly appreciate any insights/help to resolve this issue.
 

 

 

Hi All!

 

I've finally managed to get RC docker working on mongo:5 with all my previous data restored successfully :).

 

Notifications are working now and I can connect to the Rocket.Chat cloud.

 

+--------------------------------------------------+
|                  SERVER RUNNING                  |
+--------------------------------------------------+
|                                                  |
|  Rocket.Chat Version: 5.2.0                      |
|       NodeJS Version: 14.19.3 - x64              |
|      MongoDB Version: 5.0.13                     |
|       MongoDB Engine: wiredTiger                 |
|             Platform: linux                      |
|         Process Port: 3000                       |
|             Site URL: https://my.domain.com      |
|     ReplicaSet OpLog: Enabled                    |
|          Commit Hash: 08f03cc9d8                 |
|        Commit Branch: HEAD                       |
|                                                  |
+--------------------------------------------------+

 

 

Posting the steps I followed for anyone who might be facing a similar issue.

 

#1 Stop RC and backup existing data from your current mongodb docker console
 

mongodump --archive --gzip > 2022.10.15_rocketchat_mongo_server.dump.archive.gzip

 

#2 Remove the existing mongodb docker 

  • stop the mongodb docker
  • rename the /mnt/appdata/mongodb folder to mongodb-backup
  • remove the mongodb docker.

#3 Install mongodb docker (default) with the following changes

Repository:

mongo:5

 

(Advanced View)

Extra Parameters:

--hostname mongodatabase


Post Arguments:

--bind_ip_all --replSet "rs0"

 

 

#4 Initialise ReplicaSet in mongodb
- open the console and type

 

mongosh

 

then on the prompt 

 

test >

 

type

 

rs.initiate( {
   _id : "rs0",
   members: [
      { _id: 0, host: "<YOUR-SERVER-IP>:27017" },
   ]
})


- you should see the result as below

 

test> rs.initiate( {
...    _id : "rs0",
...    members: [
...       { _id: 0, host: "<YOUR-SERVER-IP>:27017" },
...    ]
... })
{ ok: 1 }
rs0 [direct: other] test> 

rs0 [direct: primary] test> 

 

 

#5 Restore the backup data to the new mongodb instance

  • copy the backup file from step #1 into the new mongodb appdata folder
  • open the mongodb console and move into the /data/db dir
  • then type
mongorestore --archive --gzip < 2022.10.15_rocketchat_mongo_server.dump.archive.gzip

 

You should see something similar to this on a successful restore (this may take a while depending on your backup file size):

 

2022-10-15T14:54:16.776+0400    159574 document(s) restored successfully. 0 document(s) failed to restore.

 

#6 Edit your RC docker settings as below

 

MONGO_URL

mongodb://rocketchat:<Password>@<YOUR-SERVER-IP>:27017/rocketchat?replicaSet=rs0

 

MONGO_OPLOG_URL

mongodb://rocketchat:<Password>@<YOUR-SERVER-IP>:27017/local?replicaSet=rs0

 

That's it.

 

Start the docker and it should work! Enjoy :)
 

 

 

Edited by Zeroeth
  • Thanks 1
Link to comment
  • 5 weeks later...
On 11/11/2017 at 12:46 PM, fanningert said:

Application Name: Rocket.Chat

Application Site: https://rocket.chat/

Docker Hub: https://hub.docker.com/r/library/rocket.chat/

Github: https://github.com/RocketChat/Rocket.Chat

Template-Repository: https://github.com/fanningert/unraid-docker-templates

 

Requirements:

  •  Mondo-DB (There is a mondoDB docker image for unraid in the CA)

 

Installation (external MongoDB):

  1. Install and Start MongoDB
  2. Install Rocket.Chat docker
  3. Change the variable "Mono DB" (tech name: MONGO_URL) with the URL of your mongoDB
  4. Start Rocket.Chat and after some second it should be reachable over the Web-Frontend URL

Installation (MongoDB as docker):

  1. Install and Start MongoDB
  2. Install Rocket.Chat docker
  3. Add in the attribute "Extra Parameters" the value "--link "MongoDB:db"". MongoDB is the name of the MongoDB docker container.
  4. Change the variable "Mono DB" (tech name: MONGO_URL) to "mongodb://db/rocketchat"
  5. Start Rocket.Chat and after some second it should be reachable over the Web-Frontend URL

 

Hints:

  • By default, the first account to register on Rocket Chat becomes the admin, so if your chat room is public, do this immediately in order to prevent someone else from registering and becoming the administrator.

Does this still apply in 2022 ?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.