Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECCONREFUSED with latest version of ShareLatex #1176

Closed
Doomsdayrs opened this issue Dec 17, 2023 · 6 comments
Closed

ECCONREFUSED with latest version of ShareLatex #1176

Doomsdayrs opened this issue Dec 17, 2023 · 6 comments

Comments

@Doomsdayrs
Copy link

Doomsdayrs commented Dec 17, 2023

Steps to Reproduce

  1. Upgrade to ShareLatex 4.2.1
  2. Open any project, new or old

Expected Behaviour

Entering project like normal

Observed Behaviour

Notice the view below repeating
image

Technical Info

The below is the specific issue

{
  "name": "real-time",
  "hostname": "overleaf",
  "pid": 173,
  "level": 50,
  "project_id": "657e6242e863e66861b05db1",
  "user_id": "65285bbda706d1bf35f52969",
  "client_id": "6McxkBLN14xejM31riB3",
  "err": {
    "message": "connect ECONNREFUSED ::1:3000",
    "name": "Error",
    "stack": "Error: connect ECONNREFUSED ::1:3000\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)\nTaggedError: join project request failed\n    at Request._callback (/overleaf/services/real-time/app/js/WebApiManager.js:36:18)\n    at self.callback (/overleaf/node_modules/request/request.js:185:22)\n    at Request.emit (node:events:517:28)\n    at Request.onRequestError (/overleaf/node_modules/request/request.js:877:8)\n    at ClientRequest.emit (node:events:517:28)\n    at Socket.socketErrorListener (node:_http_client:501:9)\n    at Socket.emit (node:events:517:28)\n    at emitErrorNT (node:internal/streams/destroy:151:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)",
    "info": {},
    "code": "ECONNREFUSED"
  },
  "method": "joinProject",
  "msg": "server side error in joinProject",
  "time": "2023-12-17T02:53:58.018Z",
  "v": 0
}

URL: latex.doomsdayrs.page
Browser Name and version: Firefox 120
Operating System: Fedora 39

Analysis

This seems related possibly to the continued lack of ipv6 support, as the URL "::1:3000" seems to be an ipv6 URL. No errors are reported by mongoDB nor redis.

The problem is, this issue persists regardless if I have ipv6 enabled or not.

@Doomsdayrs
Copy link
Author

#1168 is possibly related

@ehfd
Copy link

ehfd commented Feb 4, 2024

I reproduce this with an IPv6-enabled Kubernetes cluster in version 4.2.

This is a blocker for IPv6 infrastructure.

#1175 using RUN sed -i 's/127.0.0.1/localhost/g' /etc/nginx/sites-enabled/sharelatex.conf (Required to make 4.1 and 4.2 work) by @toastedcrumpets and @Wielewout did not fix the issue. When there was an NGINX 502 error in #1146, now it shows the above error message on the Web UI.

This is attributed to Overleaf 4.2 changing ports to 3000.

I am staying with 3.5.13 for now until there's a next release.

@drescherflo
Copy link

I had the same issue since the latest docker-ce update.

First I got an NGINX 502 error like in #1146.
Running sed -i 's/127.0.0.1/localhost/g' /etc/nginx/sites-enabled/sharelatex.conf like suggested brought back the web ui, but led to the issue described here.

I'm working around the issue by completely disabling IPv6 for the sharelatex container.
For the overleaf-toolkit, I did this by creating a docker-compose.override.yml in config/ with the content proposed by #1168.

---
version: '2.2'
services:
  sharelatex:
    # ...
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=1

@toastedcrumpets
Copy link

I'm working around the issue by completely disabling IPv6 for the sharelatex container. For the overleaf-toolkit, I did this by creating a docker-compose.override.yml in config/ with the content proposed by #1168.

---
version: '2.2'
services:
  sharelatex:
    # ...
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=1

This is a great solution @drescherflo, thank you for sharing. Its a good fix while we await overleaf to address IPv6 support.

@ehfd
Copy link

ehfd commented Mar 22, 2024

Unfortunately not possible in Kubernetes with ipv6.

@das7pad
Copy link
Member

das7pad commented May 6, 2024

The latest releases 4.2.4 and 5.0.3 include changes for switching all internal traffic to IPv4 on the application level.

@das7pad das7pad closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants