MicrosoftDocs / azure-docs

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

Unable to start mongodb version version #103342

Closed yubele closed 1 year ago

yubele commented 1 year ago

I found https://github.com/MicrosoftDocs/azure-docs/issues/95755 on the issue and still get the same error. How can I use the mongodb version?

$  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
This is an evaluation version.  There are [130] days left in the evaluation period.
Invalid endpoint type enabled; only SQL endpoint type is supported.

As per the documentation, the mongodb tag is used. When I check the image id it appears to be the same as the LATEST, is this correct?

$  docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
mongodb: Pulling from cosmosdb/linux/azure-cosmos-emulator
d7bfe07ed847: Pulling fs layer 
36fa5862c795: Pulling fs layer 
9a0c6c013dde: Pulling fs layer 
ac2323e1dbe1: Pulling fs layer 
e448b7b24c9f: Pulling fs layer 
e8ae8e4f368f: Pulling fs layer 
b12082378c75: Pulling fs layer 
c179b44ae075: Pulling fs layer 
860113fc41f4: Pull complete 
cc9f4be5ddce: Pull complete 
03253ef18358: Pull complete 
37717bdc4f51: Pull complete 
687432500fde: Pull complete 
e1769ad6e072: Pull complete 
257d64871554: Pull complete 
69fa8a67727d: Pull complete 
a13581a9d01e: Pull complete 
4a2591c9e88a: Pull complete 
0cef34cf1e4b: Pull complete 
1a54b2f019c9: Pull complete 
Digest: sha256:c4275ab4dc15f6472ba05ed19ed729c4580986ac27c6542a3320ab0dfea85fde
Status: Downloaded newer image for mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
$ docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator
Using default tag: latest
latest: Pulling from cosmosdb/linux/azure-cosmos-emulator
Digest: sha256:c4275ab4dc15f6472ba05ed19ed729c4580986ac27c6542a3320ab0dfea85fde
Status: Downloaded newer image for mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
REPOSITORY                                                               TAG                            IMAGE ID       CREATED         SIZE
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator                   latest                         7a1d7cebd0d2   6 weeks ago     1.88GB
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator                   mongodb                        7a1d7cebd0d2   6 weeks ago     1.88GB

The image id is the same as above.


Document Details

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

Naveenommi-MSFT commented 1 year ago

@yubele Thanks for your feedback! We will investigate and update as appropriate.

seesharprun commented 1 year ago

@stefarroyo or @milismsft, can either of you assist with this issue? This seems to be a product question.

StevenMasini commented 1 year ago

I am also running into this issue. It also seems that prefixing the tag :mongodb to the emulator docker image doesn't change anything. You end up downloading the same image.

> docker images
REPOSITORY                                               TAG       IMAGE ID       CREATED         SIZE
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator   latest    7a1d7cebd0d2   8 weeks ago     1.88GB
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator   mongodb   7a1d7cebd0d2   8 weeks ago     1.88GB

I am on Mac OS and I have tried to run the command line as suggested in the documentation Run the Linux Emulator on macOS

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

If I remove the line relative to MongoDB --env AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0, the emulator will launch, but the Mongo Connection String won't work.

When trying to connect to it via MongoDB Compass -> Client network socket disconnected before secure TLS connection was established

seesharprun commented 1 year ago

assign:milismsft

seesharprun commented 1 year ago

@StefArroyo or @milismsft, can either of you assist with this issue? This seems to be a product question.

StevenMasini commented 1 year ago

Would be great to have a solution here. I am still stuck with this issue. 🙏

jessephelps commented 1 year ago

Same.

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

seesharprun commented 1 year ago

:tada:

We recently released a complete revamp of the emulator documentation to cover many of the content gaps, be more succinct, and enable you to use the emulator quickly.

The new emulator documentation shows how to use the containerized (Docker) or local (Windows) variants of the emulators across five different APIs (NoSQL, MongoDB, Apache Cassandra, Apache Gremlin, Table) and three programming languages (Python, .NET, JavaScript).

We have also retired the outdated legacy emulator documentation as many of the code samples and instructions were out of date relative to the latest SDKs/libraries for each API and programming language.

Here's a few helpful links to get you started with the new emulator docs:

Link
Emulator landing page https://learn.microsoft.com/azure/cosmos-db/emulator
How-to use the emulator guide https://learn.microsoft.com/azure/cosmos-db/how-to-develop-emulator
Emulator release notes (local Windows only) https://learn.microsoft.com/azure/cosmos-db/emulator-release-notes
**Emulator command-line arguments (local Windows only) https://learn.microsoft.com/azure/cosmos-db/emulator-windows-arguments

I hope this helps unblock you. If you need changes to the emulator docs, feel free to open a new GitHub issue.

Thank you for your patience!

monish001 commented 8 months ago

same issue