Home > Net >  Azure Cosmos DB Emulator Linux image does not start (Error: The evaluation period has expired.)
Azure Cosmos DB Emulator Linux image does not start (Error: The evaluation period has expired.)

Time:11-16

With the following image mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest when attempting to start a container either via:

  • Docker Desktop (Windows)
  • Or, via the following CLI command (Windows):
docker run --name azure-cosmosdb-emulator --memory 2GB --interactive --tty -p 8081:8081 -p 8900:8900 -p 8901:8901 -p 8902:8902 -p 10250:10250 -p 10251:10251 -p 10252:10252 -p 10253:10253 -p 10254:10254 -p 10255:10255 -p 10256:10256 -p 10350:10350 mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator

I get the same error in all the above:

2022-11-15 16:34:08 Error: The evaluation period has expired.
2022-11-15 16:34:08 ./cosmosdb-emulator: ERROR: PAL initialization failed. Error: 104

I've tried to delete the containers/image and pull latest to no avail

CodePudding user response:

There is a GitHub issue for this: https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/60

At the moment it does not help to delete and pull the image. It looks like a global issue which only Microsoft can fix by pushing a new image with where the evaluation period is extended.

As a workaround you can set back the system time.

CodePudding user response:

We are looking into this issue and update on the findings by EOD here, the new image needs to get published and it might take couple of days if everything works as expected.

as a workaround until this gets fixed, you can use the image with the tag mongodb , the same features are available

mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb

CodePudding user response:

The reason is the linux docker image evaluation period has expired, and Microsoft has to push it again.

For the time being the following workaround has unblocked me. It is highly advised to be reverted as soon as the new image is published.

Add the following RUN command to your Dockerfile or if you are using the image directly then create a custom Dockerfile with these two lines:

FROM mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest

RUN /bin/bash -c "printf '\x00' | dd of=/usr/local/bin/cosmos/cosmosdb-emulator conv=notrunc bs=1 seek=$((0x12eea2))"

The workaround is taken from GitHub repo issues

  • Related