overleaf / toolkit

GNU Affero General Public License v3.0
638 stars 153 forks source link

Mongo error when `bin/up` on Ubuntu 16.04 #308

Open horizon86 opened 2 weeks ago

horizon86 commented 2 weeks ago

Steps to Reproduce

  1. clone toolkit
  2. run bin/up

Expected Behaviour

Everything runs OK.

Observed Behaviour

Initiating Mongo replica set...
Creating mongo ... done

  #  mongosh[25]: std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68
  #  Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

----- Native stack trace -----

 1: 0xd5a347 node::Assert(node::AssertionInfo const&) [mongosh]
 2: 0xdcde28 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [mongosh]
 3: 0xdcdf11 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [mongosh]
 4: 0xc784ab node::MultiIsolatePlatform::Create(int, v8::TracingController*, v8::PageAllocator*) [mongosh]
 5: 0xc684ae main [mongosh]
 6: 0x7f5a046ffd90  [/lib/x86_64-linux-gnu/libc.so.6]
 7: 0x7f5a046ffe40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0xc7135e  [mongosh]

Context

I try to update docker, but it doesn't work.

Technical Info

Analysis

It seems like a docker error, but I have no idea.

horizon86 commented 2 weeks ago

Update to ubuntu 20.04 solves everything...

horizon86 commented 2 weeks ago

output of bin/doctor

====== Overleaf Doctor ======
- Host Information
    - Linux
    - Output of 'lsb_release -a':
            No LSB modules are available.
            Distributor ID:     Ubuntu
            Description:        Ubuntu 16.04.7 LTS
            Release:    16.04
            Codename:   xenial
- Dependencies
    - bash
        - status: present
        - version info: 4.3.48(1)-release
    - docker
        - status: present
        - version info: Docker version 18.09.7, build 2d0083d
    - realpath
        - status: present
        - version info: realpath (GNU coreutils) 8.25
    - perl
        - status: present
        - version info: 5.022001
    - awk
        - status: present
        - version info: GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0)
    - openssl
        - status: present
        - version info: OpenSSL 1.1.1n  15 Mar 2022
    - docker-compose
        - status: present
        - version info: docker-compose version 1.27.4, build 40524192
- Docker Daemon
    - status: up
    - server version: 18.09.7
WARNING: No swap limit support
====== Configuration ======
- config/version
    - status: present
    - version: 5.2.1
- config/overleaf.rc
    - status: present
    - values
        - OVERLEAF_DATA_PATH: data/overleaf
        - OVERLEAF_LOG_PATH: not set, keeping logs in container
        - SERVER_PRO: false
        - SIBLING_CONTAINERS_ENABLED: false
        - OVERLEAF_LISTEN_IP: 127.0.0.1
        - OVERLEAF_PORT: 9001
        - MONGO_ENABLED: true
        - MONGO_IMAGE: mongo
        - MONGO_VERSION: 4.1
        - 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: false
- config/variables.env
    - status: present
    - values
        - SHARELATEX_FILESTORE_BACKEND: fs
        - SHARELATEX_HISTORY_BACKEND: fs
        - OVERLEAF_FILESTORE_BACKEND: fs
        - OVERLEAF_HISTORY_BACKEND: fs
====== Warnings ======
! docker-compose v1 has reached its End Of Life in July 2023 (https://docs.docker.com/compose/migrate/). Support for docker-compose v1 in the Overleaf Toolkit will be dropped with the release of Server Pro 5.2. We recommend upgrading to Docker Compose v2 before then.
! Docker v18.09 has reached its End Of Life. We recommend upgrading to a supported version.
! 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 ======
horizon86 commented 2 weeks ago

Solved.

  1. Change REDIS_IMAGE=redis:5.0.5, in config/overleaf.rc
  2. add privileged: true to toolkit/lib/docker-compose.base.yml and toolkit/lib/docker-compose.mongo.yml
ShelpAm commented 19 hours ago

Thank you! You've saved my day!

And in my case, I should also add privileged: true to docker-compose.redis.yml.