-
Notifications
You must be signed in to change notification settings - Fork 200
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
Azure Function with Cosmos DB trigger is not connecting with CosmosDB Emulator #1797
Comments
Hi @gmartinezsan, I believe the To use CosmosDB emulator you can use this connectionstring when developing locally (and have the CosmosDb emulator installed and running): More info in https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator?tabs=cli%2Cssl-netstd21#authenticate-requests |
hi @marcduiker, my dev env runs on mac using VS Code, and the cosmos db emulator runs inside parallels with Windows 10, so my connection string is not using localhost but the IP of the guest Windows machine, same as the one you shared except by the ip address. This is documented at the MS docs in the section of using the emulator with a macOS
Regarding the setting |
Finally got this setup working. Here are the steps that made it work:
Note: If this does not work it is recommended to reset the data in the emulator (cosmos icon tray ->reset data). Second note: I tried to get the traces as suggested in the troubleshooting guide but it never created any. I do not know why. Maybe the combination with the AllowNetworkAccess flag? I used it like this: Thanks @marcduiker for pointing out the usage of 'UseDevelopmentStorage' flag. Hope this helps someone else with the same setup. :) |
hi Azure Functions team.
I have my Azure Function App with a CosmosDb Binding for that I'm using the CosmosDb emulator. Every time I run the Azure Function App with VS Code I got an error:
I have followed the steps at the docs about using the CosmosDB Emulator in Mac (I'm using parallels).
The emulator runs fine in parallels.
In the Function App I'm using TLS and I have imported the certificate in Mac.
Steps are here
The settings of the app are like the following:
This same app runs fine if it uses CosmosDB from the Azure Portal.
Is there anything else that should be done to make this setup work?
Thank you in advance.
The text was updated successfully, but these errors were encountered: