RocketChat / RocketChat/Docker.Official.Image

problem at start - duplicate key error

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
337
Forks
228
Avg merge
3d 10h
Merged PRs (30d)
5

Description

hi, i cant start the containers that already has working, here is the logs.

thanks.

docker-compose up -d && docker-compose logs -f
Creating rocket_db_1 ... done
Creating rocket_rocket_1 ... done
Attaching to rocket_rocket_1, rocket_db_1
db_1 | 2019-03-26T23:32:48.407+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=2a49f7d6d3e1
db_1 | 2019-03-26T23:32:48.407+0000 I CONTROL [initandlisten] db version v3.0.15
db_1 | 2019-03-26T23:32:48.407+0000 I CONTROL [initandlisten] git version: b8ff507269c382bc100fc52f75f48d54cd42ec3b
db_1 | 2019-03-26T23:32:48.407+0000 I CONTROL [initandlisten] build info: Linux ip-10-166-66-3 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 BOOST_LIB_VERSION=1_49
db_1 | 2019-03-26T23:32:48.407+0000 I CONTROL [initandlisten] allocator: tcmalloc
db_1 | 2019-03-26T23:32:48.407+0000 I CONTROL [initandlisten] options: { storage: { mmapv1: { smallFiles: true } } }
db_1 | 2019-03-26T23:32:48.410+0000 W - [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
db_1 | 2019-03-26T23:32:48.423+0000 I JOURNAL [initandlisten] journal dir=/data/db/journal
db_1 | 2019-03-26T23:32:48.423+0000 I JOURNAL [initandlisten] recover begin
db_1 | 2019-03-26T23:32:48.424+0000 I JOURNAL [initandlisten] info no lsn file in journal/ directory
db_1 | 2019-03-26T23:32:48.424+0000 I JOURNAL [initandlisten] recover lsn: 0
db_1 | 2019-03-26T23:32:48.424+0000 I JOURNAL [initandlisten] recover /data/db/journal/j._0
db_1 | 2019-03-26T23:32:48.424+0000 I JOURNAL [initandlisten] recover applying initial journal section with sequence number 90
db_1 | 2019-03-26T23:32:48.433+0000 I JOURNAL [initandlisten] recover cleaning up
db_1 | 2019-03-26T23:32:48.433+0000 I JOURNAL [initandlisten] removeJournalFiles
db_1 | 2019-03-26T23:32:48.451+0000 I JOURNAL [initandlisten] recover done
db_1 | 2019-03-26T23:32:48.452+0000 I JOURNAL [initandlisten] preallocating a journal file /data/db/journal/prealloc.0
db_1 | 2019-03-26T23:32:49.043+0000 I JOURNAL [durability] Durability thread started
db_1 | 2019-03-26T23:32:49.044+0000 I JOURNAL [journal writer] Journal writer thread started
db_1 | 2019-03-26T23:32:49.055+0000 I NETWORK [initandlisten] waiting for connections on port 27017
db_1 | 2019-03-26T23:32:50.088+0000 I NETWORK [initandlisten] connection accepted from 172.17.0.6:54164 #1 (1 connection now open)
db_1 | 2019-03-26T23:32:50.251+0000 I NETWORK [initandlisten] connection accepted from 172.17.0.6:54166 #2 (2 connections now open)
db_1 | 2019-03-26T23:32:50.910+0000 I NETWORK [initandlisten] connection accepted from 172.17.0.6:54172 #3 (3 connections now open)
db_1 | 2019-03-26T23:32:52.220+0000 I NETWORK [initandlisten] connection accepted from 172.17.0.6:54176 #4 (4 connections now open)
db_1 | 2019-03-26T23:32:52.241+0000 I NETWORK [initandlisten] connection accepted from 172.17.0.6:54178 #5 (5 connections now open)
rocket_1 | Updating process.env.MAIL_URL
rocket_1 | LocalStore: store created at
rocket_1 | LocalStore: store created at
rocket_1 | LocalStore: store created at
rocket_1 | Starting Email Intercepter...
rocket_1 | Setting default file store to GridFS
rocket_1 | Warning: connect.session() MemoryStore is not
rocket_1 | designed for a production environment, as it will leak
rocket_1 | memory, and will not scale past a single process.
rocket_1 | {"line":"121","file":"migrations.js","message":"Migrations: Not migrating, already at version 137","time":{"$date":1553643182655},"level":"info"}
rocket_1 | ufs: temp directory created at "/tmp/ufs"
rocket_1 | Updating process.env.MAIL_URL
db_1 | 2019-03-26T23:33:03.413+0000 I INDEX [conn3] build index on: meteor.rocketchat_cron_history properties: { v: 1, unique: true, key: { intendedAt: 1, name: 1 }, name: "intendedAt_1_name_1", ns: "meteor.rocketchat_cron_history" }
db_1 | 2019-03-26T23:33:03.413+0000 I INDEX [conn3] building index using bulk method
rocket_1 | Exception in callback of async function: { MongoError: exception: E11000 duplicate key error index: meteor.rocketchat_cron_history.$intendedAt_1_name_1 dup key: { : new Date(1553616000000), : "Generate download files for user data" }
rocket_1 | at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:581:63
rocket_1 | at authenticateStragglers (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:504:16)
rocket_1 | at Connection.messageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:540:5)
rocket_1 | at emitMessageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:310:10)
rocket_1 | at Socket. (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:453:17)
rocket_1 | at emitOne (events.js:116:13)
rocket_1 | at Socket.emit (events.js:211:7)
rocket_1 | at addChunk (_stream_readable.js:263:12)
rocket_1 | at readableAddChunk (_stream_readable.js:250:11)
rocket_1 | at Socket.Readable.push (_stream_readable.js:208:10)
rocket_1 | at TCP.onread (net.js:597:20)
rocket_1 | createdCollectionAutomatically: false,
rocket_1 | numIndexesBefore: 1,
rocket_1 | errmsg: 'exception: E11000 duplicate key error index: meteor.rocketchat_cron_history.$intendedAt_1_name_1 dup key: { : new Date(1553616000000), : "Generate download files for user data" }',
rocket_1 | code: 11000,
rocket_1 | ok: 0,
rocket_1 | name: 'MongoError',
rocket_1 | [Symbol(mongoErrorContextSymbol)]: {} }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported docker-compose up -d failure and reviewing the MongoDB logs around the meteor.rocketchat_cron_history index. Inspect migrations.js and the duplicate intendedAt/name entry; done means the containers start without the E11000 duplicate-key error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, mongodb
Domain
databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.