Closed GideonWislang closed 3 years ago
Can you confirm that you can access a Cosmos DB instance in Azure? Just want to confirm that the problem is specific to the Cosmos DB extension talking to the emulator in Parallels.
Have your restarted your machine after you trusted the cert? Doubt it'd help as you can access the emulator with other apps on your Mac, not sure if func somehow has things cached.
Yeah I can access a Cosmos DB instance in Azure and just gave it a restart and seems to still be happening.
Hey @anthonychu did you manage to find a solution?
@southpolesteve Any thoughts on this?
@GideonWislang Are you still getting this error? Were you able to find a workaround or fix?
@GideonWislang Are you still getting this error? Were you able to find a workaround or fix?
Yeah so no fix but I was able to find a workaround which was just running the functions on the parallels then just ssh into it to monitor logs. Able to easily edit the functions as the directory where the functions are stored is shared.
I'm not sure how this works for .NET. NodeJS has an env var that will turn off cert checks, but I don't know if anything like that exists for .NET. @ealsur an ideas?
We tested running the Emulator running in a Windows VM inside a Mac following these steps: https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#running-on-mac-or-linux
I'm not sure how this works for .NET. NodeJS has an env var that will turn off cert checks, but I don't know if anything like that exists for .NET. @ealsur an ideas?
Perfect! what would it be as they are NodeJS function.
We tested running the Emulator running in a Windows VM inside a Mac following these steps: https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#running-on-mac-or-linux
Yes this is what I followed when setting it up, works great just can't connect to it via azure functions core tools.
Are you using the .NET Cosmos SDK in Azure Functions? Or using the bindings? Did you change the connection policy by any chance to Direct (should be Gateway for this to work)
For NodeJS, you can turn off TLS checks by setting this env variable https://nodejs.org/api/cli.html#cli_node_tls_reject_unauthorized_value
The error looks like it is coming from the .NET functions tool though. Not the JS code.
Yeah looks like this is the bindings not able to connect, so Node.js settings are likely to have no effect.
@GideonWislang could try pulling in the Cosmos DB SDK and see if that makes a difference (disabling Node.js TLS if needed). That's not really solving the problem but could be a workaround.
We tested running the Emulator running in a Windows VM inside a Mac following these steps: https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#running-on-mac-or-linux
@ealsur Do you know if a .NET app in macOS was used for this test?
Yes, we tested it on a NET Core app running on the Mac and it was working, when the SDK was set to Gateway mode (using HTTPS). (The screenshots on the docs were taken on that process).
I am also experiencing this issue and I assume it's ongoing. While the instructions work perfectly in almost all cases, it appears that Azure Functions Core Tools still continues to reject the SSL certificate. Personally I am using bindings and it isn't working. I'm running core tools in WSL and imported the cert using the update-ca-certificates command and all that.
Do we have any updates on this?
I have a similar issue. I'm running node on wsl2 and try accessing the cosmosDB emulator in a windows host. Before having an SSL issue, I had a connection refused. I had to start the emulator with /AllowNetworkAccess flag. See
I'm also using the Azure Functions Core Tools. I'm gonna try to start the emulator with the /GenCert flag!
@GideonWislang are you still experiencing issues?
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
I'm developing functions locally on MacOS using bindings pointing to the CosmosDB Emulator which is on a parallels Windows VM. I followed the documentation and installed the SSL Certificate which allowed me to connect to the Cosmos Emulator on my Mac via browser and VSCode: Azure databases extension with no problem.
I'm currently having trouble with my locally run functions connecting to the CosmosDB Emulator. I can see this is likely a certificate issue but I've installed the CosmosDB certificate on my Mac and was then able to connect to it but no luck with Azure Function. Not sure what else to do.
Appreciate any help, Thank you! :)