1
votes

I'm getting an error trying to connect CosmosDB (SQL) as an Azure Stream Analytics Output.

I have configured CosmosDB account, added database and new container + I've added a sample JSON document to my container.

When trying to set Stream Analytics output is says: "Failed to load database" in Database selection menu.

CosmosDB account and Stream Analytics job are in the same resource group and location (North Europe).

enter image description here

I've tried another way of setup, but when I select "Provide Cosmos DB settings manually" it creates Output, but instantly I got an error "Connection test failed":

enter image description here

Any idea what could cause these errors?

1
Can you double check to ensure you have access to the database in Cosmos DB? Another thing you can check is to see if the database is behind a VNET or a firewall - in which case it will result in failure. - Sid Ramadoss

1 Answers

0
votes

By updating the Firewall configuration to “All networks” resolves the issue.

In depth solution from my repro:

I have received failed to load databases error:

enter image description here

Error due to: Firewall and virtual networks=> Allow access from : Selected networks.

enter image description here

Now, changed the Firewall and virtual networks=> Allow access from: All networks.

enter image description here

After updating the firewall configuration, loads the databases as shown without any issue.

enter image description here

Hope this helps.