# Not migrating, control is locked - Rocket Chat Docker - Version 6

**URL:** <https://forums.rocket.chat/t/not-migrating-control-is-locked-rocket-chat-docker-version-6/16299>\
**Category:** Community Support\
**Created:** [March 23, 2023, 4:26pm UTC](https://forums.rocket.chat/t/not-migrating-control-is-locked-rocket-chat-docker-version-6/16299 "2023-03-23T16:26:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LomaxFairchild](https://avatars.discourse-cdn.com/v4/letter/l/7993a0/32.png) [@LomaxFairchild](https://forums.rocket.chat/u/LomaxFairchild)\
**Post date:** [March 23, 2023, 4:26pm UTC](https://forums.rocket.chat/t/not-migrating-control-is-locked-rocket-chat-docker-version-6/16299/1 "2023-03-23T16:26:19Z")

</div>

### Description

Hi - my installation has upgraded from 5.4 to the 6 (we’re using the ‘latest’ Docker image) and since doing so is returning the at the bottom of this post.

Attempting to rollback to 5.4.4 give the error

```auto
Error: Can't find migration version 286

```

Any thoughts on what could be causing this? Google only seems to throw up results from 2018.

Thanks

### Server Setup Information

- Version of Rocket.Chat Server: 6.0
- Operating System: Docker/Amazon ECS
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 14.21.2
- MongoDB Version: 5.0.14
- Proxy: Docker
- Firewalls involved:

### Any additional Information

```auto
23/03/2023, 14:44:06	{"level":40,"time":"2023-03-23T14:44:06.188Z","pid":1,"hostname":"ip-172-31-37-108.eu-west-2.compute.internal","name":"Migrations","msg":"Not migrating, control is locked. Attempt 1/30. Trying again in 10 seconds."}	rocketchat-latest
23/03/2023, 14:43:56	{"level":40,"time":"2023-03-23T14:43:56.179Z","pid":1,"hostname":"ip-172-31-37-108.eu-west-2.compute.internal","name":"Migrations","msg":"Not migrating, control is locked. Attempt 0/30. Trying again in 10 seconds."}	rocketchat-latest
23/03/2023, 14:43:53	{"level":40,"time":"2023-03-23T14:43:53.788Z","pid":1,"hostname":"ip-172-31-37-108.eu-west-2.compute.internal","name":"VoIPService","msg":"Voip is not enabled. Cant start the service"}	rocketchat-latest
23/03/2023, 14:43:52	MessageType.render is deprecated. Use MessageType.message instead. livechat_webrtc_video_call	rocketchat-latest
23/03/2023, 14:43:49	strict mode: use allowUnionTypes to allow union type keyword at "#/properties/value" (strictTypes)	rocketchat-latest
23/03/2023, 14:43:40	Error creating index: livechat_priority -> { name: 1 } {	rocketchat-latest
23/03/2023, 14:43:40	unique: true,	rocketchat-latest
23/03/2023, 14:43:40	partialFilterExpression: { '$and': [[Object], [Object] ] }	rocketchat-latest
23/03/2023, 14:43:40	} MongoServerError: An existing index has the same name as the requested index. When index names are not specified, they are auto generated and can cause conflicts. Please refer to our documentation. Requested index: { v: 2, unique: true, key: { name: 1 }, name: "name_1", partialFilterExpression: { $and: [{ name: { $exists: true } }, { name: { $gt: "" } }] } }, existing index: { v: 2, unique: true, key: { name: 1 }, name: "name_1" }	rocketchat-latest
23/03/2023, 14:43:40	at Connection.onMessage (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:230:30)	rocketchat-latest
23/03/2023, 14:43:40	at MessageStream.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:61:60)	rocketchat-latest
23/03/2023, 14:43:40	at MessageStream.emit (events.js:400:28)	rocketchat-latest
23/03/2023, 14:43:40	at MessageStream.emit (domain.js:475:12)	rocketchat-latest
23/03/2023, 14:43:40	at processIncomingData (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:125:16)	rocketchat-latest
23/03/2023, 14:43:40	at MessageStream._write (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:33:9)	rocketchat-latest
23/03/2023, 14:43:40	at writeOrBuffer (internal/streams/writable.js:358:12)	rocketchat-latest
23/03/2023, 14:43:40	at MessageStream.Writable.write (internal/streams/writable.js:303:10)	rocketchat-latest
23/03/2023, 14:43:40	at Socket.ondata (internal/streams/readable.js:731:22)	rocketchat-latest
23/03/2023, 14:43:40	at Socket.emit (events.js:400:28)	rocketchat-latest
23/03/2023, 14:43:40	at Socket.emit (domain.js:475:12)	rocketchat-latest
23/03/2023, 14:43:40	at addChunk (internal/streams/readable.js:293:12)	rocketchat-latest
23/03/2023, 14:43:40	at readableAddChunk (internal/streams/readable.js:267:9)	rocketchat-latest
23/03/2023, 14:43:40	at Socket.Readable.push (internal/streams/readable.js:206:10)	rocketchat-latest
23/03/2023, 14:43:40	at TCP.onStreamRead (internal/stream_base_commons.js:188:23)	rocketchat-latest
23/03/2023, 14:43:40	at TCP.callbackTrampoline (internal/async_hooks.js:130:17) {	rocketchat-latest
23/03/2023, 14:43:40	ok: 0,	rocketchat-latest
23/03/2023, 14:43:40	code: 86,	rocketchat-latest
23/03/2023, 14:43:40	codeName: 'IndexKeySpecsConflict',	rocketchat-latest
23/03/2023, 14:43:40	'$clusterTime': {	rocketchat-latest
23/03/2023, 14:43:40	clusterTime: new Timestamp({ t: 1679582616, i: 1 }),	rocketchat-latest
23/03/2023, 14:43:40	signature: {	rocketchat-latest
23/03/2023, 14:43:40	hash: new Binary(Buffer.from("cd57e7e76f0ddedb9c8beb9dbc19c7c32717563b", "hex"), 0),	rocketchat-latest
23/03/2023, 14:43:40	keyId: new Long("7186307793261953030")	rocketchat-latest
23/03/2023, 14:43:40	}	rocketchat-latest
23/03/2023, 14:43:40	},	rocketchat-latest
23/03/2023, 14:43:40	operationTime: new Timestamp({ t: 1679582616, i: 1 }),	rocketchat-latest
23/03/2023, 14:43:40	[Symbol(errorLabels)]: Set(0) {}	rocketchat-latest
23/03/2023, 14:43:40	}	rocketchat-latest
23/03/2023, 14:43:38	LocalStore: store created at	rocketchat-latest
23/03/2023, 14:43:38	LocalStore: store created at	rocketchat-latest
23/03/2023, 14:43:38	LocalStore: store created at

```

---

<div class="post-metadata">

**Author:** ![LomaxFairchild](https://avatars.discourse-cdn.com/v4/letter/l/7993a0/32.png) [@LomaxFairchild](https://forums.rocket.chat/u/LomaxFairchild)\
**Post date:** [March 24, 2023, 2:08pm UTC](https://forums.rocket.chat/t/not-migrating-control-is-locked-rocket-chat-docker-version-6/16299/2 "2023-03-24T14:08:02Z")

</div>

> [@LomaxFairchild](#):
>
> `Not migrating, control is locked. Attempt`

OK - I seem to have fixed this by specifying ‘registry.rocket.chat/rocketchat/rocket.chat:6.0.1’ for the docker image, instead of latest. Since learned that using ‘latest’ for a production environment is not a good idea (obvious, really).

Lesson learnt.

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [March 24, 2023, 7:49pm UTC](https://forums.rocket.chat/t/not-migrating-control-is-locked-rocket-chat-docker-version-6/16299/3 "2023-03-24T19:49:53Z")

</div>

THanks for sharing!

indeed, it’s not a good idea to keep latest.

Also, check this nice blog post about the reasoning: [What's Wrong With The Docker :latest Tag? · vsupalov.com](https://vsupalov.com/docker-latest-tag)

---

<div class="post-metadata">

**Author:** ![marcinwrobel](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@marcinwrobel](https://forums.rocket.chat/u/marcinwrobel)\
**Post date:** [April 3, 2023, 3:24pm UTC](https://forums.rocket.chat/t/not-migrating-control-is-locked-rocket-chat-docker-version-6/16299/4 "2023-04-03T15:24:53Z")

</div>

Hello guys,

thanks for your work into the chat.

My problems, migration from 5.3:

```auto
rocket-chat-rocketchat-1 | LocalStore: store created at 
rocket-chat-rocketchat-1 | LocalStore: store created at 
rocket-chat-rocketchat-1 | LocalStore: store created at 
rocket-chat-rocketchat-1 | strict mode: use allowUnionTypes to allow union type keyword at "#/properties/value" (strictTypes)
rocket-chat-rocketchat-1 | MessageType.render is deprecated. Use MessageType.message instead. livechat_webrtc_video_call
rocket-chat-rocketchat-1 | {"level":40,"time":"2023-04-03T15:05:19.475Z","pid":1,"hostname":"c5e4cdbf9d81","name":"VoIPService","msg":"Voip is not enabled. Cant start the service"}
rocket-chat-rocketchat-1 | {"level":51,"time":"2023-04-03T15:05:19.889Z","pid":1,"hostname":"c5e4cdbf9d81","name":"Migrations","msg":"Not migrating, already at version 292"}
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.906Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/BROKER: Moleculer v0.14.21 is starting...
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.906Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/BROKER: Namespace: <not defined>
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.906Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/BROKER: Node ID: 77a8bda5-eb2a-4b75-beea-a5041f14eb9b
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.907Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/REGISTRY: Strategy: RoundRobinStrategy
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.907Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/REGISTRY: Discoverer: LocalDiscoverer
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.907Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/BROKER: Serializer: JSONSerializer
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.910Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/BROKER: Validator: FastestValidator
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.910Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/BROKER: Registered 13 middleware(s).
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.911Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/BROKER: Transporter: TcpTransporter
rocket-chat-rocketchat-1 | {"level":51,"time":"2023-04-03T15:05:19.920Z","pid":1,"hostname":"c5e4cdbf9d81","name":"DatabaseWatcher","msg":"Using change streams"}
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.946Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/TRANSIT: Connecting to the transporter...
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.953Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/TRANSPORTER: TCP server is listening on port 37137
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.953Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/TRANSPORTER: UDP Discovery is disabled.
rocket-chat-rocketchat-1 | [2023-04-03T15:05:19.953Z] INFO 77a8bda5-eb2a-4b75-beea-a5041f14eb9b/TRANSPORTER: TCP Transporter started.
rocket-chat-rocketchat-1 | meteor://💻app/app/app.js:1436440
rocket-chat-rocketchat-1 | throw err;
rocket-chat-rocketchat-1 | ^
rocket-chat-rocketchat-1 | 
rocket-chat-rocketchat-1 | MongoServerError: The $changeStream stage is only supported on replica sets
rocket-chat-rocketchat-1 | at Connection.onMessage (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:230:30)
rocket-chat-rocketchat-1 | at MessageStream.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:61:60)
rocket-chat-rocketchat-1 | at MessageStream.emit (events.js:400:28)
rocket-chat-rocketchat-1 | at MessageStream.emit (domain.js:475:12)
rocket-chat-rocketchat-1 | at processIncomingData (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:125:16)
rocket-chat-rocketchat-1 | at MessageStream._write (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
rocket-chat-rocketchat-1 | at writeOrBuffer (internal/streams/writable.js:358:12)
rocket-chat-rocketchat-1 | at MessageStream.Writable.write (internal/streams/writable.js:303:10)
rocket-chat-rocketchat-1 | at Socket.ondata (internal/streams/readable.js:731:22)
rocket-chat-rocketchat-1 | at Socket.emit (events.js:400:28)
rocket-chat-rocketchat-1 | at Socket.emit (domain.js:475:12)
rocket-chat-rocketchat-1 | at addChunk (internal/streams/readable.js:293:12)
rocket-chat-rocketchat-1 | at readableAddChunk (internal/streams/readable.js:267:9)
rocket-chat-rocketchat-1 | at Socket.Readable.push (internal/streams/readable.js:206:10)
rocket-chat-rocketchat-1 | at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
rocket-chat-rocketchat-1 | at TCP.callbackTrampoline (internal/async_hooks.js:130:17) {
rocket-chat-rocketchat-1 | ok: 0,
rocket-chat-rocketchat-1 | code: 40573,
rocket-chat-rocketchat-1 | codeName: 'Location40573',
rocket-chat-rocketchat-1 | [Symbol(errorLabels)]: Set(0) {}
rocket-chat-rocketchat-1 | }
rocket-chat-rocketchat-1 exited with code 0

```

My config:

```auto
---
version: "3.9"
services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:6.1.0
    restart: unless-stopped
    environment:
      MONGO_URL: "${MONGODB_ADVERTISED_HOSTNAME}://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@${MONGODB_ADVERTISED_HOSTNAME}:${MONGODB_PORT_NUMBER}/${MONGODB_DATABASE}?authSource=${MONGODB_DATABASE}"
      MONGO_OPLOG_URL: "${MONGODB_ADVERTISED_HOSTNAME}://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@${MONGODB_ADVERTISED_HOSTNAME}:${MONGODB_PORT_NUMBER}/local?authSource=${MONGODB_DATABASE}"
      ROOT_URL: myhost
      PORT: "3000"
      DEPLOY_METHOD: docker
    depends_on:
      - mongodb
    ports:
      - "5015:3000"
    networks:
      - rocketchat

  mongodb:
    image: bitnami/mongodb:5.0
    restart: unless-stopped
    volumes:
      - /mongodb_data:/bitnami/mongodb
    environment:
      PUID: "1000"
      PGID: "1000"
      MONGODB_USERNAME: ${MONGODB_USERNAME}
      MONGODB_PASSWORD: ${MONGODB_PASSWORD}
      MONGODB_DATABASE: ${MONGODB_DATABASE}
      MONGODB_ROOT_PASSWORD: ${MONGODB_ROOT_PASSWORD}
      MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER}
      MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME}
      ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD}
    networks:
      - rocketchat
networks:
  rocketchat:

```

I tried to use the version which was working for me, but without any success. Any help?
