[SOLVED: mongo dump/restore is easier] Migrating (Docker): error Got signal: 11

Hello,

Description

I use RC with your provided docker-compose.yml: Rocket.Chat/docker-compose.yml at develop · RocketChat/Rocket.Chat · GitHub
I wanted to migrate to another dedicated server, so I just copy/paste my /docker/rocketchat folder with data and docker-compose but I got a Mongo error when running it.

My docker-compose:
version: ‘2’

services:
  rocketchat:
    image: rocketchat/rocket.chat:latest
    command: >
      bash -c
        "for i in `seq 1 30`; do
          node main.js &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    restart: always
    volumes:
      - /home/aerya/docker/rocketchatUAC/chat/uploads:/app/uploads
    environment:
      - PORT=3000
      - ROOT_URL=http://0.0.0.0:3000
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
      - MAIL_URL=xxx
    depends_on:
      - mongo
    ports:
      - 3000:3000
    labels:
      - com.centurylinklabs.watchtower.enable=true

  mongo:
    image: mongo:4.0
    restart: always
    volumes:
     - /home/aerya/docker/rocketchatUAC/data/db:/data/db
    command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1

  mongo-init-replica:
    image: mongo:4.0
    command: >
      bash -c
        "for i in `seq 1 30`; do
          mongo mongo/rocketchat --eval \"
            rs.initiate({
              _id: 'rs0',
              members: [ { _id: 0, host: 'localhost:27017' } ]})\" &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    depends_on:
      - mongo

Mongo logs:

I don’t understand this error because everything is exactly the same except IPv4/6 which doesn’t matter here.

Server Setup Information

Not related

Hmmm.

So I think that somewhere we’re probably missing some info.

We have this:

021-05-29T08:18:30.563+0000 I REPL [initandlisten] Recovering from an unstable checkpoint (top of oplog: { ts: Timestamp(1622273765, 2), t: 15 }, appliedThrough: { ts: Timestamp(1622273765, 2), t: 15 })

2021-05-29T08:18:30.563+0000 I REPL [initandlisten] Starting recovery oplog application at the appliedThrough: { ts: Timestamp(1622273765, 2), t: 15 }, through the top of the oplog: { ts: Timestamp(1622273765, 2), t: 15 }

2021-05-29T08:18:30.563+0000 I REPL [initandlisten] No oplog entries to apply for recovery. Start point is at the top of the oplog.

2021-05-29T08:18:30.569+0000 I REPL [replexec-0] New replica set config in use: { _id: “rs0”,

And then this which seems to indicate the DB is not up:

NETWORK [LogicalSessionCacheRefresh] Unable to reach primary for set rs0

I’d also think perhaps you ought to think about migrating to wiredTiger - it might be easier to do a proper dump backup/restore rather than trying to copy which may leave other settings buried somewhere.

1 Like

Thanks for last advice. I used mongodump/restore to make it through.
It’s not really solved but I could go on.

OK.

I suggest you solve any issues now…

Hope you didn’t misunderstand me meaning it’s not really solved. I was talking about the cp/rsync/mv that should have worked “out of the box”.
I’m glad to be able to use RC again on my new server.

Ah OK.

The copy issue is down to your OS/docker, not Rocket.

Glad it is working.