Azure / azure-cosmos-db-emulator-docker

This repo serves as hub for managing issues, gathering feedback, and having discussions regarding the Cosmos DB Emulator Docker.
https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux%2Ccsharp&pivots=api-nosql
MIT License
165 stars 47 forks source link

Error: The evaluation period has expired. #60

Closed aaronzhongg closed 1 year ago

aaronzhongg commented 2 years ago

I have just pulled the image and tried to run it but getting the error below:

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

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

The only reference to this I could find online is: https://stackoverflow.com/questions/68187668/cosmos-db-emulator-for-linux-docker-this-is-an-evaluation-version-there-are-1

I attempted to remove the containers/images and pull the latest image again to no avail

markphillips100 commented 2 years ago

I'm not sure this is the correct repo for the linux image. I posted on the Microsoft forum in case.

noocyte commented 2 years ago

You're not the only one getting this message today...

faheemgani commented 2 years ago

I think this is a date time issue, if I set the system time back to the 14th of November, the container starts up ok... I have just started seeing this today.

noocyte commented 2 years ago

Yes, because the image is 180 days old today...

assert1337 commented 2 years ago

This solution is FAR from ideal but this is a blocker for many developer teams that already pay for the service in Azure and need to have a local emulation, having development teams blocked is not an option.

Use at your own risk, but this Dockerfile will build an image with the date check patched. It will only work with the current image and you must stop using it as soon as Microsoft updates their image.

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))"
davidguidali commented 2 years ago

Please fix!

It would also be great if you could just remove this "evaluation period" thingy because it seems pretty annoying.

kuza2010 commented 2 years ago

It's not funny :(

preichelt commented 2 years ago

Seeing this today as well.

EDIT: Can confirm that @assert1337's suggestion works.

juzkuz commented 2 years ago

I can confirm that we are seeing this as well - have not tried the suggested work around but remember that this issue has occurred in the past and that same work around seemed to work then too.

sajeetharan commented 2 years ago

Hi we are looking into this issue and update on the findings soon, 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

BrianVallelunga commented 2 years ago

PLEASE IGNORE. I was specifying more memory than my system had in the docker run command. Looks like just a typo.

Just going to add a message that the mongodb tagged one didn't work for me. I received the following on startup trying through both Ubuntu 22.04 (WSL) and Powershell (Windows):

This is an evaluation version.  There are [0] days left in the evaluation period.
Starting
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Started 1/11 partitions
Started 2/11 partitions
Failed to create CoreCLR, HRESULT: 0x8007000E
Started 3/11 partitions
Started 4/11 partitions
Failed to create CoreCLR, HRESULT: 0x8007000E
Started 5/11 partitions
Started 6/11 partitions
Started 7/11 partitions
Failed to create CoreCLR, HRESULT: 0x8007000E
Started 8/11 partitions
Started 9/11 partitions
Failed to create CoreCLR, HRESULT: 0x8007000E
Started 10/11 partitions
Started 11/11 partitions
Started
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
eddumelendez commented 2 years ago

@BrianVallelunga used to work on 22.04? AFAIK it doesn't, see https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/45

BrianVallelunga commented 2 years ago

I'm using AMD and it does, yes under WSL. Looks like it was a memory issue though, so I'm going to note that. I have it working now.

eddumelendez commented 2 years ago

@sajeetharan will the new release have a fix for #45 ?

steveacalabro commented 2 years ago

This solution is FAR from ideal but this is a blocker for many developer teams that already pay for the service in Azure and need to have a local emulation, having development teams blocked is not an option.

Use at your own risk, but this Dockerfile will build an image with the date check patched. It will only work with the current image and you must stop using it as soon as Microsoft updates their image.

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))"

This seems to work to start things but if you try to get the emulator cert it will fail with a not found object

command

curl -k https://localhost:8081/_explorer/emulator.pem > emulatorcert.crt

emulatorcert.crt

{"code":"NotFound","message":"Not Found"}
preichelt commented 2 years ago

@steveacalabro I'm using the above workaround and I'm able to get the certificate with curl just fine.

steveacalabro commented 2 years ago

@steveacalabro I'm using the above workaround and I'm able to get the certificate with curl just fine.

Weird, the solution I went with is to follow what was posted here https://stackoverflow.com/questions/74440386/azure-cosmos-db-emulator-linux-image-does-not-start-error-the-evaluation-perio and mix in the solution from above like so

Dockerfile

FROM mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb # The key is to use the mongodb tag

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

ENV AZURE_COSMOS_EMULATOR_PARTITION_COUNT 0
ENV AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE true
ENV AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE 127.0.0.1

EXPOSE 10250-10255
EXPOSE 8081

Then the curl command works

skgsergio commented 2 years ago

This seems to work to start things but if you try to get the emulator cert it will fail with a not found object

It works for me:

image

sajeetharan commented 2 years ago

Update : We have published a new image , try with the latest tag

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

AlexIovan commented 2 years ago

Update : We have published a new image , try with the latest tag

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

Works for us, thank you!

malinovic-nemanja commented 2 years ago

Update : We have published a new image , try with the latest tag

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

Deleted and pulled again, working fine. Thank you!

maciek047 commented 2 years ago

after pulling new image I get Invalid endpoint type enabled; only SQL endpoint type is supported. instead. Was using it with AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 which is necessary for compatibility. Without this env container is running. Will it be fixed?

EDIT: it's regarding the following version of the image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb which also had the 'expiration' problem; after pulling the latest image the error above started to occur

noocyte commented 2 years ago

@sajeetharan - please add a note in your calender 5-ish months from now to update the image again... Or better yet - remove the stupid 180 days rule... It just does not make any sense to have it there. Is anybody really going to run Cosmos Db like this? Why would they?

dandrejvv commented 2 years ago

@sajeetharan - please add a note in your calender 5-ish months from now to update the image again... Or better yet - remove the stupid 180 days rule... It just does not make any sense to have it there. Is anybody really going to run Cosmos Db like this? Why would they?

And even if they did, they would also have to wait 5-ish months before updating it again 😆 But I agree. This is an annoiance. Remove the check rather. I'm sure there are other ways to impose restrictions to prevent people from using the emulator in prod.

oakentling commented 2 years ago

I have the same problem as @maciek047. Would be great if this could be fixed as well.

ben-graffle commented 2 years ago

Had this same issue today, resolved with docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest

klemmchr commented 1 year ago

Had this same issue today, resolved with docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest

That is the Docker Linux image and not the Windows one which this repo is about apparently.

But since there is no repo for the Linux container, I'm posting in here. Please just get rid of this stupid evaluation period. What's even the purpose of it? What do you try to stop people from doing? If somebody was about hosting their prod Cosmos DB this evaluation period wouldn't stop them from doing that. They just need to pull a new image every other month. This is the same procedure as for local development. Stop messing up our local development experience. Azurite doesn't do such stupid things either.

vnea commented 1 year ago

Had this same issue today, resolved with docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest

It worked for me.

However, I'm afraid that the problem will occur again because I have this message after running the container:

This is an evaluation version. There are [145] days left in the evaluation period.

Can't you just remove this "evaluation period" please?

AieatAssam commented 1 year ago

It's dead again. Any chance for an update or a fix?

ggirard07 commented 1 year ago

It's dead again. Any chance for an update or a fix?

Mine is still reporting 71 days left.

Are you sure you are running latest? docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator

AieatAssam commented 1 year ago

It's dead again. Any chance for an update or a fix?

Mine is still reporting 71 days left.

Are you sure you are running latest? docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator

You are right. My compose pulled cached version. Manual docker compose pull fixed it. I with chalk it up to end of work week syndrome :)

It is still so so awkward to have to re-pull all the time to avoid expiration.

akamud commented 1 year ago

I have tried running docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest multiple times and it still keeps reporting an expiring license, it doesn't reset the count either, so it is still counting down since my very first pull.

max-motatos commented 1 year ago

37 days left ¯_(ツ)_/¯

corwestermaniddink commented 1 year ago

Update : We have published a new image , try with the latest tag

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

Same issue is returned?

image image

This is on a new fresh installed Windows 11 Pro with Docker Desktop 4.18.0

gpetrou commented 1 year ago

@sajeetharan there are only 5 days left until the expiration. Are you planning to upload a new image soon?

sajeetharan commented 1 year ago

@sajeetharan Thanks for letting us know, we will update the image and also work on a permanent solution

sajeetharan commented 1 year ago

We have updated the image! You should get rid of this warning by pulling the latest image.

khanhnd0408 commented 1 year ago

I'm currently facing the same issue; the MongoDB emulator's evaluation has expired. Please update to the latest version for this image. Thanks. image

sajeetharan commented 1 year ago

@khanhnd0408 have you tried the latest image?

ledunguit commented 1 year ago

@khanhnd0408 Have you tried this suggestion? https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/60#issuecomment-1315270682

pedrolsazevedo commented 1 year ago

Hello, I'm getting the same error: Image that I'm using mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb

USER@MACHINE$ export ipaddr="`ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' | head -n 1`"
USER@MACHINE$ docker run \
    --publish 8081:8081 \
    --publish 10250-10255:10250-10255 \
    --name=test-linux-emulator-mongo \
    --env AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 \
    --env AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true \
    --env AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=$ipaddr \
    --env AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 \
    --interactive \
    --tty \
    mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
Unable to find image 'mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb' locally
c4275ab4dc15: Download complete 
7a1d7cebd0d2: Download complete 
Error: The evaluation period has expired.
./cosmosdb-emulator: ERROR: PAL initialization failed. Error: 104
YvesDup commented 1 year ago

Hi, today too

sudo docker run \
>     --publish 8081:8081 \
>     --publish 10250-10255:10250-10255 \
>     --name=test-linux-emulator-mongo \
>     --env AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 \
>     --env AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true \
>     --env AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=$ipaddr \
>     --env AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 \
>     --interactive \
>     --tty \
>     mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
Error: The evaluation period has expired.
./cosmosdb-emulator: ERROR: PAL initialization failed. Error: 104
YvesDup commented 1 year ago

Hi, today too

sudo docker run \
>     --publish 8081:8081 \
>     --publish 10250-10255:10250-10255 \
>     --name=test-linux-emulator-mongo \
>     --env AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 \
>     --env AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true \
>     --env AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=$ipaddr \
>     --env AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 \
>     --interactive \
>     --tty \
>     mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
Error: The evaluation period has expired.
./cosmosdb-emulator: ERROR: PAL initialization failed. Error: 104

today is always down !!

@sajeetharan please can you update this container ?

sajeetharan commented 1 year ago

@YvesDup sure, thanks for letting us know! Will provide an update soon!

YvesDup commented 1 year ago

Hi @sajeetharan, have you an expected date ? Is this solution still maintain ?

sajeetharan commented 1 year ago

@YvesDup working on it @abkolant-MSFT @v1k1

YvesDup commented 1 year ago
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb

Hi @abkolant-MSFT @v1k1 @sajeetharan ,it will be nice to have feedback.

peitschie commented 1 year ago

Hello. This is 10 days later, the problem is still not resolved (and seems to have been over a month now without a resolution).

The lack of rapid resolution of this is making it very high-risk to depend on the docker-based emulator for any purpose.

What's the ETA on a fix h ere?

DrDonoso commented 1 year ago

Hello. This is 10 days later, the problem is still not resolved (and seems to have been over a month now without a resolution).

The lack of rapid resolution of this is making it very high-risk to depend on the docker-based emulator for any purpose.

What's the ETA on a fix h ere?

@peitschie Hi, I believe it is temporally fixed. Try to remove the image with docker rmi mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest and then pull it again. The evaluation period should be reset to 146 days (as today).

YvesDup commented 1 year ago

Hello. This is 10 days later, the problem is still not resolved (and seems to have been over a month now without a resolution). The lack of rapid resolution of this is making it very high-risk to depend on the docker-based emulator for any purpose. What's the ETA on a fix h ere?

@peitschie Hi, I believe it is temporally fixed. Try to remove the image with docker rmi mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest and then pull it again. The evaluation period should be reset to 146 days (as today).

Error: The evaluation period has expired.
./cosmosdb-emulator: ERROR: PAL initialization failed. Error: 104

Sorry but issue still exists or I am missing something