MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.31k stars 21.49k forks source link

Invalid endpoint type enabled; only SQL endpoint type is supported. #95755

Closed reallyworksxyz closed 1 year ago

reallyworksxyz commented 2 years ago

When following the instructions for Linux:MongoDB Emulator

docker run \
    --publish 8081:8081 \
    --publish 10251-10254:10251-10254 \
    --memory 3g --cpus=2.0 \
    --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

I received the following results:

Invalid endpoint type enabled; only SQL endpoint type is supported.

I am using Ubuntu 20.04.4 Server LTS and Docker version 20.10.17, build 100c701. When running the command for SQL endpoints everything works 100%.

Similar issue refrences:

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

GeethaThatipatri-MSFT commented 2 years ago

@reallyworksxyz Thanks for reaching out, We will Investigate and update you shortly.

seesharprun commented 2 years ago

assign:milismsft

@milismsft, can you take a look at this issue? I didn't see anything obvious in the troubleshooting guide for the Linux Docker emulator.

eugbyte commented 2 years ago

Facing the same issue. Additionally, I get a message that the image will only continue for N number of days

   docker run \
  --publish 8081:8081 \
  --publish 10251-10254:10251-10254 \
  --memory 3g --cpus=2.0 \
  --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 \
  mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator &

produces:

  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
This is an evaluation version.  There are [118] days left in the evaluation period.
Invalid endpoint type enabled; only SQL endpoint type is supported.
languy commented 2 years ago

Use mongodb as the container image tag:

docker run \
    --publish 8081:8081 \
    --publish 10251-10254:10251-10254 \
    --memory 3g --cpus=2.0 \
    --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
eugbyte commented 2 years ago

Thanks! Will try it out

In any case, I think the documentation for the emulator needs to be updated to specify mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb (https://docs.microsoft.com/en-us/azure/cosmos-db/linux-emulator?tabs=mongodb-api%2Cssl-netstd21#run-the-linux-emulator-on-macos)

eugbyte commented 2 years ago

When I include the --memory 3g --cpus=2.0 \ line, I get the error Failed to create CoreCLR, HRESULT: 0x8007000E

Omitting it, I can run the container successfully. However, the port 10255 is no longer open.

netstat -nat | grep '10255' | grep LISTEN
""
seesharprun commented 2 years ago

Hello @eugbyte!

We are publishing an update to the linux emulator instructions for the MongoDB API to not specify memory and CPU along with using the correct tag.

This should resolve the issue in this thread. If you run into any more issues with the docker flags, please consider giving feedback on the product feedback page.

seesharprun commented 2 years ago

reassign:seesharprun

eugbyte commented 2 years ago

@seesharprun the linux documentation does not publish port 10255. port 10255 is part of the mongoDB connection string

the emulator mongo db connection string is specified as mongodb://localhost:C2y6yDjf5...Jw==@localhost:10255/admin?ssl=true

docker run \
    --publish 8081:8081 \
    --publish 10251-10254:10251-10254 \              // <--- port 10255 is missing
    --memory 3g --cpus=2.0 \
    --name=test-linux-emulator \
seesharprun commented 1 year ago

please-open

karolmie1 commented 1 year ago

As of now, both :mongodb and :latest are the same image, maybe that is part of the problem?

seesharprun commented 1 year ago

After some investigation, this seems to be a bug with the product as the :mongodb tag incorrectly does not expose the mongodb endpoint. Unfortunately, we can't deal with product bugs here as this is a documentation repository and the docs articles are using the correct tag.

I looked at Microsoft Q&A and there doesn't seem to be a question about this issue. I recommend that you post your question over there so the custom support team can escalate this issue as it's blocking your work.

I'm sorry that I was unable to resolve this on the documentation site. Thanks for your patience and I hope this can be resolved quickly for you!

please-close