# Wrong IP Server

**URL:** <https://forums.rocket.chat/t/wrong-ip-server/12684>\
**Category:** Community Support\
**Created:** [November 24, 2021, 2:21pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684 "2021-11-24T14:21:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nboisse](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nboisse](https://forums.rocket.chat/u/nboisse)\
**Post date:** [November 24, 2021, 2:21pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/1 "2021-11-24T14:21:52Z")

</div>

### 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](http://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](http://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

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [December 14, 2021, 9:40pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/2 "2021-12-14T21:40:43Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![nboisse](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nboisse](https://forums.rocket.chat/u/nboisse)\
**Post date:** [January 5, 2022, 9:21am UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/3 "2022-01-05T09:21:45Z")

</div>

Yes I still have the problem. You can escalate it 😉

Thanks!

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [January 5, 2022, 2:12pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/4 "2022-01-05T14:12:32Z")

</div>

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:

> **[Create a private Rocket.Chat server](https://medium.com/@bogdan_nic100/create-a-private-rocket-chat-server-d7b68cf1515e)**
>
> In our days we have a lot of options for chat:Slack, Teams,Skype may of them are host on cloud but now are going to to install on private…

---

<div class="post-metadata">

**Author:** ![nboisse](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nboisse](https://forums.rocket.chat/u/nboisse)\
**Post date:** [January 12, 2022, 2:58pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/5 "2022-01-12T14:58:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![moesestt](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@moesestt](https://forums.rocket.chat/u/moesestt)\
**Post date:** [January 12, 2022, 5:17pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/6 "2022-01-12T17:17:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [January 13, 2022, 5:23pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/7 "2022-01-13T17:23:12Z")

</div>

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:

> **[Identity Management (EE vs CE)](https://docs.rocket.chat/quick-start/identity-management-ee-vs-ce)**
>
> List of available login methods and features. Including:

---

<div class="post-metadata">

**Author:** ![nboisse](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nboisse](https://forums.rocket.chat/u/nboisse)\
**Post date:** [March 16, 2022, 1:31pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/8 "2022-03-16T13:31:59Z")

</div>

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](https://gateway.rocket.chat/push/gcm/send%22,%22type%22:%22request-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 ?

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [March 16, 2022, 5:33pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/9 "2022-03-16T17:33:12Z")

</div>

I believe you have hit this issue:

> <https://github.com/RocketChat/Rocket.Chat/issues/24350>
>
> \### 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.

---

<div class="post-metadata">

**Author:** ![nboisse](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nboisse](https://forums.rocket.chat/u/nboisse)\
**Post date:** [March 17, 2022, 3:35pm UTC](https://forums.rocket.chat/t/wrong-ip-server/12684/10 "2022-03-17T15:35:51Z")

</div>

I found plenty of threads except this one.

So I’m waiting for the next update.
