'Dapr error initialising state store to local cosmosDB
I am using docker compose to spin up an api, along with Dapr for state management and a local cosmosDB emulator.
When specifying my local azure cosmosDB as the state store in my local Dapr component, the Dapr container fails to start with the error message: level=warning msg="error initializing state store cosmosdb (state.azure.cosmosdb/v1): Post "https://localhost:8081//dbs": dial tcp 127.0.0.1:8081: connect: connection refused"
If I change the Dapr component to point at my cosmosDB in azure the Dapr container works fine, so I know this is an issue with cosmosDB locally. Im new to dapr and cosmos db but I'm not sure what I'm missing.
Solution 1:[1]
Since you are using https do you have a self-signed certificate? this might be because of SSL exception.
Also, check if your local Azure Cosmos DB Emulator is running or not by navigating to the below url:
https://localhost:8081/_explorer/index.html
Checkout some related issues: here, here, here try closing and restarting the emulator sometime.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | KarthikBhyresh-MT |
