nboisse
November 24, 2021, 2:21pm
1
Description
Hi,
I have a problem with configuring RocketChat & snap.
RC is installed with snap. When I use the command “snap set rocketchat-server caddy-url = https myRC.com ”, I get the error “Your public IP doesn’t match the one resolved for caddy-url, disabling https”.
I noticed in the code that RC uses the command “curl ipinfo.io/ip ” in order to find the IP of the server. But on my server, the IP of our proxy servers is found. So I have to configure RC with “caddy-url = https /myPROXY.com” for it to work, and then change the url in the desktop app settings. But I have to do it regularly because the proxy url reconfigures itself automatically.
How to fix this? Can developers change the way to retrieve the server name based on the name (like
a good old nslookup command ^^)
Thanks for your help
Server Setup Information
Version of Rocket.Chat Server: 3.18.3
Operating System: Debian 10
Deployment Method: snap 16-2.53.2
Hi! Sorry for the late response.
Not sure if nslookup will solve it here, as it can have multiple IPs or not be a valid IP yet (like, not propagated)
Do you still have this problem? Seems like an edge case. If you do, I can escalate it with our deployment specialist.
THanks!
Yes I still have the problem. You can escalate it
Thanks!
HI!
You will need to upgrade to 4.x snaps in order to use the caddy builtin.
I have found this that shows how to use Nginx instead:
It seems that with version 4.x we are losing LDAP functionality. Do you confirm ? If this is the case we cannot update because we absolutely need this functionality.
I am using version RocketChat 4.2 and it still has LDAP for sign in. I hope it isn’t going away with a newer version.
LDAP will still work.
Advanced sync (role/channel mapping and background sync) was moved to EE.
You can still implement those features by scripting with REST APIs.
Check out this doc where you can see what features is in EE x CE:
Hi,
After few weeks for testing Nginx instead of Caddy, now I can say that the problem is fixed
Thank you for your help !
But now, since upgrade to 4.5.1, notications no longer work
“name”:“Push”,“msg”:"Error sending push to gateway (2 try) → {“message”:“network timeout at: https://gateway.rocket.chat/push/gcm/send",“type”:"request-timeout ”
We using RocketChat behind a proxy. Proxy is configured in /etc/environment file and in snapd.service.
Do you have any idea to fix that ?
I believe you have hit this issue:
opened 02:22PM - 30 Jan 22 UTC
bug
### Description:
RocketChat is unable to use a http proxy anymore.
May be … related to Meteor upgraded from v2.2 to v2.5.
### Steps to reproduce:
RocketChat started with configured env (http_proxy/https_proxy)
```
[Unit]
Description=The Rocket.Chat server
After=network.target mongod.service
[Service]
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=rocketchat
Environment=http_proxy=http://srv-proxy-1.********************:3128 https_proxy=http://srv-proxy-1.********************:3128 MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=https://rocket****************** PORT=3001
[Install]
WantedBy=multi-user.target
```
### Expected behavior:
Application store is working, external image downloader is working.
### Actual behavior:
Connection error
### Server Setup Information:
- Version of Rocket.Chat Server: 4.4.0
- Operating System: Debian 11
- Deployment Method: manual
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 14.18.3
- MongoDB Version:4.2.17
### Client Setup Information
- Desktop App or Browser Version: Firefox last version
- Operating System: Linux
### Additional context
Worked with 4.3.x
### Relevant logs:
```
{"level":50,"time":"2022-01-30T14:19:01.133Z","pid":10159,"hostname":"srv-rocket","name":"","name":"System","err":{"type":"FetchError","message":"request to https://cloud.rocket.chat/api/oauth/token failed, reason: connect ECONNREFUSED 51.81.11.198:443","stack":"FetchError: request to https://cloud.rocket.chat/api/oauth/token failed, reason: connect ECONNREFUSED 51.81.11.198:443\n at ClientRequest.<anonymous> (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/fetch/node_modules/node-fetch/lib/index.js:1444:11)\n at ClientRequest.emit (events.js:400:28)\n at ClientRequest.emit (domain.js:475:12)\n at TLSSocket.socketErrorListener (_http_client.js:475:9)\n at TLSSocket.emit (events.js:400:28)\n at TLSSocket.emit (domain.js:475:12)\n at emitErrorNT (internal/streams/destroy.js:106:8)\n at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)","errno":"ECONNREFUSED","code":"ECONNREFUSED","name":"FetchError"},"msg":"request to https://cloud.rocket.chat/api/oauth/token failed, reason: connect ECONNREFUSED 51.81.11.198:443"}
{"level":50,"time":"2022-01-30T14:19:01.136Z","pid":10159,"hostname":"srv-rocket","name":"","name":"System","err":{"type":"FetchError","message":"request to https://cloud.rocket.chat/api/oauth/token failed, reason: connect ECONNREFUSED 51.81.11.198:443","stack":"FetchError: request to https://cloud.rocket.chat/api/oauth/token failed, reason: connect ECONNREFUSED 51.81.11.198:443\n at ClientRequest.<anonymous> (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/fetch/node_modules/node-fetch/lib/index.js:1444:11)\n at ClientRequest.emit (events.js:400:28)\n at ClientRequest.emit (domain.js:475:12)\n at TLSSocket.socketErrorListener (_http_client.js:475:9)\n at TLSSocket.emit (events.js:400:28)\n at TLSSocket.emit (domain.js:475:12)\n at emitErrorNT (internal/streams/destroy.js:106:8)\n at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)","errno":"ECONNREFUSED","code":"ECONNREFUSED","name":"FetchError"},"msg":"request to https://cloud.rocket.chat/api/oauth/token failed, reason: connect ECONNREFUSED 51.81.11.198:443"}
{"level":40,"time":"2022-01-30T14:19:01.173Z","pid":10159,"hostname":"srv-rocket","name":"","name":"Rocket.Chat Apps","msg":"Unable to access Marketplace. Does the server has access to the internet? 'request to https://marketplace.rocket.chat/v1/apps failed, reason: connect ECONNREFUSED 51.81.11.138:443'"}
```
If that’s the case, a fix is being worked.
I found plenty of threads except this one.
So I’m waiting for the next update.