8000 MongoDB : container mongo is unhealthy · Issue #348 · overleaf/toolkit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MongoDB : container mongo is unhealthy #348

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

Open
idealemu opened this issue Apr 2, 2025 · 1 comment
Open

MongoDB : container mongo is unhealthy #348

idealemu opened this issue Apr 2, 2025 · 1 comment

Comments

@idealemu
Copy link
idealemu commented Apr 2, 2025

Moved from: overleaf/overleaf#1332 (comment)

I have just run /bin/upgrade while following this issue, now while everything seems to start I cannot access the website on localhost and get errors regarding MongoDB.

Doctor output:

~/opt/overleaf master*
❯ bin/doctor
====== Overleaf Doctor ======
- Host Information
    - Linux
    - Output of 'lsb_release -a':
            LSB Version:        n/a
            Distributor ID:     cachyos
            Description:        CachyOS
            Release:    rolling
            Codename:   n/a
- Dependencies
    - bash
        - status: present
        - version info: 5.2.37(1)-release
    - docker
        - status: present
        - version info: Docker version 28.0.4, build b8034c0ed7
    - realpath
        - status: present
        - version info: realpath (GNU coreutils) 9.6
    - perl
        - status: present
        - version info: 5.040001
    - awk
        - status: present
        - version info: GNU Awk 5.3.1, API 4.0, PMA Avon 8-g1, (GNU MPFR 4.2.2, GNU MP 6.3.0)
    - openssl
        - status: present
        - version info: OpenSSL 3.4.1 11 Feb 2025 (Library: OpenSSL 3.4.1 11 Feb 2025)
    - docker compose
        - status: present
        - version info: Docker Compose version 2.34.0
- Docker Daemon
    - status: up
    - server version: 28.0.4
====== Configuration ======
- config/version
    - status: present
    - version: 5.3.3
- config/overleaf.rc
    - status: present
    - values
        - OVERLEAF_DATA_PATH: data/sharelatex
        - OVERLEAF_LOG_PATH: not set, keeping logs in container
        - SERVER_PRO: false
        - SIBLING_CONTAINERS_ENABLED: false
        - OVERLEAF_LISTEN_IP: 0.0.0.0
        - OVERLEAF_PORT: 8081
        - MONGO_ENABLED: true
        - MONGO_IMAGE: mongo
        - MONGO_VERSION: 6.0
        - MONGO_DATA_PATH: data/mongo
        - REDIS_ENABLED: true
        - REDIS_IMAGE: redis:6.2
        - REDIS_AOF_PERSISTENCE: true
        - REDIS_DATA_PATH: data/redis
        - NGINX_ENABLED: false
        - NGINX_CONFIG_PATH: config/nginx/nginx.conf
        - TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
        - TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
        - NGINX_HTTP_LISTEN_IP: 127.0.1.1
        - NGINX_HTTP_PORT: 80
        - NGINX_TLS_LISTEN_IP: 127.0.1.1
        - TLS_PORT: 443
        - GIT_BRIDGE_ENABLED: true
- config/variables.env
    - status: present
    - values
        - SHARELATEX_FILESTORE_BACKEND: fs
        - SHARELATEX_HISTORY_BACKEND: fs
        - OVERLEAF_FILESTORE_BACKEND: fs
        - OVERLEAF_HISTORY_BACKEND: fs
====== Warnings ======
! Detected SIBLING_CONTAINERS_ENABLED=false. When not using Sibling containers, users have full read and write access to the 'sharelatex' container resources (filesystem, network, environment variables) when running LaTeX compiles. Only use this mode in environments where all users are trusted and no isolation of users is required.
====== End ======

Additionaly here is some docker logs:

docker logs sharelatex

cannot connect to mongodb
MongoServerSelectionError: connect ECONNREFUSED 172.18.0.2:27017
    at Topology.selectServer (/overleaf/node_modules/mongodb/lib/sdam/topology.js:320:38)
    at async Topology._connect (/overleaf/node_modules/mongodb/lib/sdam/topology.js:204:28)
    at async Topology.connect (/overleaf/node_modules/mongodb/lib/sdam/topology.js:156:13)
    at async topologyConnect (/overleaf/node_modules/mongodb/lib/mongo_client.js:233:17)
    at async LegacyMongoClient._connect (/overleaf/node_modules/mongodb/lib/mongo_client.js:246:13)
    at async LegacyMongoClient.connect (/overleaf/node_modules/mongodb/lib/mongo_client.js:171:13)
    at async main (file:///overleaf/services/web/modules/server-ce-scripts/scripts/check-mongodb.mjs:14:19) {
  reason: TopologyDescription {
    type: 'Unknown',
    servers: Map(1) { 'mongo:27017' => [ServerDescription] },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: null,
    maxElectionId: null,
    maxSetVersion: null,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: null
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {},
  [cause]: MongoNetworkError: connect ECONNREFUSED 172.18.0.2:27017
      at Socket.<anonymous> (/overleaf/node_modules/mongodb/lib/cmap/connect.js:285:44)
      at Object.onceWrapper (node:events:633:26)
      at Socket.emit (node:events:518:28)
      at emitErrorNT (node:internal/streams/destroy:169:8)
      at emitErrorCloseNT (node:internal/streams/destroy:128:3)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    [Symbol(errorLabels)]: Set(1) { 'ResetPool' },
    [cause]: Error: connect ECONNREFUSED 172.18.0.2:27017
        at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
      errno: -111,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '172.18.0.2',
      port: 27017
    }
  }
}
*** /etc/my_init.d/500_check_db_access.sh failed with status 1

*** Killing all processes...
Mar 30 19:13:12 9b4eba7da90a syslog-ng[51]: syslog-ng shutting down; version='4.3.1'
*** Running /etc/my_init.d/000_check_for_old_bind_mounts_5.sh...
*** Running /etc/my_init.d/000_check_for_old_env_vars_5.sh...
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/100_generate_secrets.sh...
*** Running /etc/my_init.d/100_make_overleaf_data_dirs.sh...
*** Running /etc/my_init.d/100_restore_site_status.sh...
*** Running /etc/my_init.d/100_set_docker_host_ipaddress.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
Mar 30 19:13:13 9b4eba7da90a syslog-ng[51]: syslog-ng starting up; version='4.3.1'
*** Running /etc/my_init.d/200_nginx_config_template.sh...
Nginx: generating config file from template
Checking Nginx config
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Nginx: reloading config
 * Reloading nginx configuration nginx
   ...done.
*** Running /etc/my_init.d/300_delete_old_logs.sh...
*** Running /etc/my_init.d/500_check_db_access.sh...
Checking can connect to mongo and redis
Using default settings from /overleaf/services/web/config/settings.defaults.js
Using settings from /etc/overleaf/settings.js
Set UV_THREADPOOL_SIZE=16

I am running on Cachy OS (arch) and thinking this might be some system package issue, updated everything but it does not seem to be the case. The mongo container appears to be unable to start/stuck in restarting until the version error is fixed, but I am unable to fix it in the current state.

@idealemu
Copy link
Author
idealemu commented Apr 2, 2025

Could this be linked to #343 ?

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

1 participant
0