I launched Rocket Chat in Docker Compose according to the instructions Deploy with Docker & Docker Compose. It works well, but there are two problems:
The web app and desktop sometimes do not open random chats. You have to close/open the browser or close/open the desktop app. After that, it works fine.
The “Remind me about this” function stopped working.
To fix these problems, I went to the logs of the Rocket Chat container. Everything is fine in the logs, but sometimes this error appears:
"level":50,
"time":"2024-08-15T08:14:35.245Z",
"pid":1,
"hostname":"f4b696898f15",
"name":"OEmbed",
"msg":"Error fetching url content",
"err":{
"type":"Error",
"message":"invalid host",
"stack":
"Error: invalid host
at app/oembed/server/server.ts:79:9
at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
=> 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 app/oembed/server/server.ts:187:10
at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
"
}
Mongo logs look fine. Nginx logs look fine.
I can’t figure out what causes this error. Is it possible to configure Rocket Chat to give more information in the logs? What other ways are there to find the cause of my problems?
Server Setup Information
Version of Rocket.Chat Server: registry.rocket.chat/rocketchat/rocket.chat:6.10.2
Thanks for the quick reply!
I went to read the docs on ssl setup. I will also find out the answer about GridFS. Then I will come back with the information.
Websocket is fine now. When problems appear, I will definitely check websocket again.
Now I’ll attach docker-compose, variables file and nginx.conf.
docker-compose.yaml:
### Rocket.Chat configuration
# Rocket.Chat version
# see:- https://github.com/RocketChat/Rocket.Chat/releases
RELEASE=6.10.2
# MongoDB endpoint (include ?replicaSet= parameter)
#MONGO_URL=
# MongoDB endpoint to the local database
#MONGO_OPLOG_URL=
# IP to bind the process to
BIND_IP=127.0.0.1
# URL used to access your Rocket.Chat instance
ROOT_URL=https://rc.mydomain.com
# Port Rocket.Chat runs on (in-container)
#PORT=
# Port on the host to bind to
HOST_PORT=3001
### MongoDB configuration
# MongoDB version/image tag
MONGODB_RELEASE=6.0.5
# See:- https://hub.docker.com/r/bitnami/mongodb
### Traefik config (if enabled)
# Traefik version/image tag
#TRAEFIK_RELEASE=
# Domain for https (change ROOT_URL & BIND_IP accordingly)
#DOMAIN=
# Email for certificate notifications
nginx.conf:
server {
server_name rc.mydomain.com;
access_log /var/log/nginx/rc_access.log;
error_log /var/log/nginx/rc_error.log;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/rc.mydomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/rc.mydomain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}server {
if ($host = rc.mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name rc.mydomain.com;
listen 80;
return 404; # managed by Certbot
}
Thank you! I need to figure this out. I don’t understand how I can use this. HOSTNAME=f4b696898f15 is the container ID. This variable is set by Docker when the container starts without my participation.