Closed ghost closed 2 years ago
@cubikca Thank you for your feedback. We reviewing this and will back shorlty.
@milismsft, can you take a look at this issue? I didn't see anything obvious in the troubleshooting guide for the Linux Docker emulator.
After attempting to resolve this for a few weeks, this seems to be a bug with the emulator.
I have tried to run the emulator using this command:
docker run \
--publish 8081:8081 \
--publish 10251-10254:10251-10254 \
--env AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 \
--interactive \
--tty \
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator
Since this is a product bug, and not a documentation issue, I recommend reporting an issue with the product team following their instructions. For now, I will close this Docs bug since there's not much we can do on the documentation side of things.
The solution is to use mongodb
as the container image tag. IOW, run this:
docker run \
--publish 8081:8081 \
--publish 10251-10254:10251-10254 \
--env AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 \
--interactive \
--tty \
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
The solution is to use
mongodb
as the container image tag. IOW, run this:docker run \ --publish 8081:8081 \ --publish 10251-10254:10251-10254 \ --env AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 \ --interactive \ --tty \ mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:mongodb
I'm trying this command, but I get this issue:
This program has encountered a fatal error and cannot continue running at Tue Sep 13 09:09:52 2022
The following diagnostic information is available:
Reason: OS Hard Error (0x00000002)
Stack Trace:
file://package1/windows/system32/sqlpal.dll+0x0000000000298F1C
file://package1/windows/system32/sqlpal.dll+0x000000000029802A
file://package1/windows/system32/sqlpal.dll+0x0000000000265CD9
file://package1/windows/system32/sqlpal.dll+0x00000000002ACD9B
file://package1/windows/system32/sqlpal.dll+0x0000000000394658
Process: 19 - cosmosdb-emulator
Thread: 125 (application thread 0x1c0)
Instance Id: 1d149154-eeea-4737-bebd-167b22243b9f
Crash Id: 57f0f055-2169-4a42-ac43-db3337480df1
Build stamp: (null)
Distribution: Ubuntu 20.04.4 LTS
Processors: 8
Total Memory: 8241176576 bytes
Timestamp: Tue Sep 13 09:09:52 2022
Last errno: -34938881
Last errno text: Unknown error -34938881
*********** PAL PANIC CORE DUMP GENERATION FAILED **********
Unable to locate handle-crash.sh. Error: File: signals.cpp:483 [Status: 0xC0000034 Object name not found errno = 0x2(2) No such file or directory]
Executing: /usr/local/bin/cosmos/handle-crash.sh with parameters
handle-crash.sh
/usr/local/bin/cosmos/cosmosdb-emulator
19
/usr/local/bin/cosmos
/tmp/cosmos/appdata/log/
1d149154-eeea-4737-bebd-167b22243b9f
57f0f055-2169-4a42-ac43-db3337480df1
*********** PANIC CORE DUMP GENERATION FAILED **********
Attempt to launch handle-crash.sh failed.
This program has encountered a fatal error and cannot continue running at Tue Sep 13 09:09:52 2022
The following diagnostic information is available:
Reason: Host Extension RTL_ASSERT (0x00000003)
Status: STATUS_WAIT_2 (0x00000002)
Message: !killTheTarget
Stack:
SP IP Function
---------------- ---------------- ----------------
00007fae4a6b9df0 0000559476cbfbba <unknown>
00007fae4a6bae50 0000559476cbf58f <unknown>
00007fae4a6bb0b0 0000559476c22b26 <unknown>
00007fae4a6bb0e0 0000559476cc30a4 <unknown>
00007fae4a6bc310 0000559476cc2769 <unknown>
00007fae4a6bc440 00007fae4c814609 start_thread+0xd9
00007fae4a6bc500 00007fae4c295133 clone+0x43
Process: 17 - cosmosdb-emulator
Thread: 18
Instance Id: 1d149154-eeea-4737-bebd-167b22243b9f
Crash Id: 57f0f055-2169-4a42-ac43-db3337480df1
Build stamp: (null)
Distribution: Ubuntu 20.04.4 LTS
Processors: 8
Total Memory: 8241176576 bytes
Timestamp: Tue Sep 13 09:09:52 2022
Last errno: 2
Last errno text: No such file or directory
Aborted
Not sure where to report it.
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!
I have attempted to run the CosmosDB emulator, from both WSL and Windows, using the following command:
docker run \ -p 8081:8081 \ -p 10251-10254:10251-10254 \ --memory 3g --cpus=2.0 \ -e AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 \ -e AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true \ -e AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT=4.0 \ -it \ mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator
I have also attempted to launch it from a docker-compose file:
cosmosdb: image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator tty: true stdin_open: true restart: always cpu_count: 2 volumes:
I am quite certain these are equivalent, but I end up with the following error in any case:
cosmosdb_1 | This is an evaluation version. There are [145] days left in the evaluation period. cosmosdb_1 | Invalid endpoint type enabled; only SQL endpoint type is supported.
I believe I can safely ignore the first message as there is no actual time lock on the image. However the second error is fatal. If I leave off the ENABLE_MONGODB_ENDPOINT=4.0 environment variable, CosmosDB starts, but the mongodb URL provided at https://localhost:8081/_explorer/index.html doesn't work. Please advise.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.