Skip to content
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

POD Crashes when deploying cosmos DB binding #1092

Closed
ubhanja opened this issue Aug 18, 2021 · 9 comments
Closed

POD Crashes when deploying cosmos DB binding #1092

ubhanja opened this issue Aug 18, 2021 · 9 comments
Labels

Comments

@ubhanja
Copy link

ubhanja commented Aug 18, 2021

I have a producer deployment (yaml is attached) which is posting data to Azure service bus queue binding in DAPR. This producer works fine with Azure Service BUS binding. I created a new Cosmos DB Binding (attached is the binding Yaml). As soon as the binding is deployed in default namespace the producer pod crashes. I increased the request and limit memory but still the issue continues. If I delete the binding component for Azure Cosmos DB , POD starts running. I am able to shell into the POD and post data at 3500 port for Azure Service bus . I created a state store for COSMOS DB and it works. I am able to save the data in COSMOS DB using statestore. But for bindings it is failing. I have the POD logs and DAPR container logs attached with yaml file. Appreciate if you can provide some input on why bindings in cosmos DB is causing the POD to crash,
daprdeploy.zip

@CodeMonkeyLeet
Copy link
Contributor

Given the errors in your pod logs:

time="2021-08-17T14:55:32.504974844Z" level=debug msg="loading component. name: ukbcosmos, type: bindings.azure.cosmosdb/v1" app_id=producer instance=producer-66f7578fd-qz6r6 scope=dapr.runtime type=log ver=1.3.0
time="2021-08-17T14:55:32.615879781Z" level=error msg="failed to init output binding ukbcosmos (bindings.azure.cosmosdb/v1): , " app_id=producer instance=producer-66f7578fd-qz6r6 scope=dapr.runtime type=log ver=1.3.0
time="2021-08-17T14:55:32.616122885Z" level=error msg="failed to init output bindings: , " app_id=producer instance=producer-66f7578fd-qz6r6 scope=dapr.runtime type=log ver=1.3.0
time="2021-08-17T14:55:32.616299288Z" level=warning msg="process component error daprd process will exited, gracefully to stop" app_id=producer instance=producer-66f7578fd-qz6r6 scope=dapr.runtime type=log ver=1.3.0

This suggests an issue in the configuration of your daprcosmosbindings, which are blanked out in the logs you've provided. I'd test that your cosmosdb configuration works independently first (e.g. maybe by replacing the kafka in the bindings quickstart and verifying that the producer sample can start locally).

@ubhanja
Copy link
Author

ubhanja commented Aug 19, 2021

Yes that would ne helpful. If you need further details , pls ping me.

@CodeMonkeyLeet
Copy link
Contributor

@ubhanja I think you misunderstood me: I've already tried this with using cosmosdb binding in a minimal environment like the quickstart, and the cosmosdb component inits successfully. I'm suggesting that you test your cosmosdb configuration similarly in an isolated setting to help debug your failure, because the failure is very early in initializing the output binding, which usually indicates an incorrect component configuration.

@ubhanja
Copy link
Author

ubhanja commented Aug 20, 2021

@CodeMonkeyLeet can you please share your sample cosmosdb binding

@ubhanja
Copy link
Author

ubhanja commented Aug 20, 2021

@CodeMonkeyLeet I think I got the issue. CosmosDB with DocumentDB is working fine. When I use Mongo client the binding is crashing the POD. i.e if it is https://.documents.azure.com:443/ it works fine. but for https://.mongo.azure.com:443/ it fails . Can you please confirm that COSMOS DB Binding only works for Cosmos Document DB

@yaron2
Copy link
Member

yaron2 commented Aug 20, 2021

@CodeMonkeyLeet I think I got the issue. CosmosDB with DocumentDB is working fine. When I use Mongo client the binding is crashing the POD. i.e if it is https://.documents.azure.com:443/ it works fine. but for https://.mongo.azure.com:443/ it fails . Can you please confirm that COSMOS DB Binding only works for Cosmos Document DB

Yes, I can confirm that.
You can try using the Dapr MongoDB state store component.

@dapr-bot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

@dapr-bot dapr-bot added the stale label Sep 19, 2021
@dapr-bot
Copy link
Collaborator

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.

@berndverst
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants