-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create a collection for mongodb for Azure Cosmos DB Emulator #1552
Comments
Need to look into the emulator scenario. I believe partition keys aren't used for mongo and the action says "DocDB" instead of mongo. It could be an issue where we're confusing database types |
I ran into this one too. Anyone have thoughts on how to work around it? |
Try path |
I run into the same issue. Whenever I enable the endpoint alone using the emulator I can't seem to create a container. This issue is caused by the emulator (very irritating). |
Any updates on this? Cosmos DB emulator is basically unusable for MongoDB as collections cannot be created. |
please get this fixed |
this issue still persists... has anyone found a workaround? |
Same here, still running into this issue |
We are in September and the issue still persists. Very irritating. |
Any updates here? Would really be great if this was fixed! |
Same issue here |
Same here |
This is the critical bug, that doesn't allow to create container and, therefore, work with emulator using mongo endpoint. |
Wow. A completely useless emulator for Mongo, although MS markets it as CosmosDB Emulator for Mongo. |
Hi everyone, First off, I'm extremely apologetic for the delay to investigate this issue. There is really no great excuse as why it has been in our backlog for this long when it has been blocking users. I started investigating this issue, I haven't actually been able to reproduce it. I am running the current latest version of Azure Cosmos DB Emulator v2.14.6.0 on Windows 11. Using the cmd terminal with administrator privileges, I started the emulator with the following command: Connecting via
As mentioned by @ejizba, partition keys aren't used for MongoDB, so it shouldn't be prompting for a partition key when trying to create a collection. I can't really imagine why it would be doing this, but we do cache the attached accounts, so it's possible that some error occurred with serialization or an update broke compatibility. If you are seeing If anybody could provide some more detailed repro steps, including the version of the emulator, how you are initializing the emulator, and a screenshot of your Attached Database Accounts node (similar to what I provided), that would be immensely helpful. EDIT: Also, I would like to mention that our team only maintains the |
I'm running Ubuntu Desktop 22.04 in Virtual Box (Windows 10 host) and can reproduce this issue. I'm running the emulator with the following docker-compose.yml:
I start the container with I can create a database no problem, but when I try to add a container I get the issue reported in this thread |
@nturinski the issue is with the built-in explorer UI -- it won't let you create a container without specifying the partition key. For all others, the workaround is to use another tool like mongo shell...
|
Make sure that the Docker container is also exposing the 10255 port as well, otherwise accessing it through shell/GUI like Studio 3T will not establish a connection for you |
Was everyone with this issue using this portal screen to create the collection? While having the partition key as an input is definitely the issue, our extension doesn't control this page. If you are having issues at that page, you'll have to file an issue with the CosmosDB Emulator team. You can find instructions to do that here. |
Workround for this issue : 1.Start the emulator from command prompt as an administrator with "/EnableMongoDbEndpoint"
Hope this helps! |
Thanks for the workaround, but it didn't work for me. I still get the self signed issue, any ideas? I updated to latest compass 1.43.x and still not working |
Does this occur consistently? Yes
Repro steps:
Action: cosmosDB.createDocDBCollection
Error type: BadRequest
Error Message: Partition key path /id is invalid for MongoDB API.
ActivityId: 735214de-482e-4aaa-897d-b6cf25aac33f, Microsoft.Azure.Documents.Common/2.11.0
Version: 0.13.0
OS: win32
OS Release: 10.0.18363
Product: Visual Studio Code
Product Version: 1.45.1
Language: en
The text was updated successfully, but these errors were encountered: