-
Notifications
You must be signed in to change notification settings - Fork 3k
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 CosmosDB emulator isn't running on localhost. #7039
Comments
This issue might be related to Azure/azure-docs-sdk-dotnet#2278, which also started occurring around the same time for me. |
Hi @MartinDemberger, we'll take a look on it. |
This is also an issue on the github hosted windows 2019 runner. Note that locally it is running against localhost but is still returning a 500 when attempting to estabalish gremlin websocket |
As a note we have raised a support request directly with MS Azure as per the Emulators Troubleshooting, but as the immediate response is the expected "uninstall and install the older version" what is the Github/MS policy for rolling back a dependency in the runner image until the Azure cosmos team can fix their emulator? |
Hi @MartinDemberger, I guess it may be something in the newer version of the emulator (2.14.11). However, I tried to make just a simple test in Azure and GH runners (gh workflow sample), by starting emulator like suggested: ... If you need to test with a previous version (2.14.9), you may try to uninstall current one and take the previous version from choco: |
I can confirm I'm getting the same issue. My tests started failing on CI, getting an Here's the stack trace using v3.17.2 of the @azure/cosmos Node SDK.
|
I can confirm that @bogdan-damian-bgd's work around solved the issue for us. The downgrade takes approximately 6 minutes to execute in our build pipeline. |
I switched our tests to a payed CosmosDB-Instance to be able to work. This works but it's money my company doesn't want to pay :-( I hope a fix is available in the near future. |
@MartinDemberger, could you please provide some more clear repro steps, as the line mentioned in the issue description doesn't seem to be enough? Also, could you check if the mentioned workaround for downgrading the emulator version works for you? |
@bogdan-damian-bgd The downgrade works. What do you need for reproduction? We have a huge project which uses CosmosDB with Gremlin-API. In the pipelines the tests are running which connects against the local CosmosDB Emulator. When I run I can create a new project and pipeline to reproduce this if you need it. This is the complete stacktrace I see in my tests:
|
@MartinDemberger, It is almost obvious that the problem may come with the latest version of the emulator (2.14.11) and I would raise an issue with its support team. However, the basic tests I mentioned previously (getting a response from localhost:8081) seems to pass Ok. Also, the repro line you suggested ( |
@TobiasMorell, @dwhieb - this modified workaround seems to be pretty quicker than the previous one suggested:
|
@bogdan-damian-bgd That workaround works great. Thanks for the quicker version! |
@bogdan-damian-bgd You are right. Sorry. The command doesn't have any helpful output. This is a copy and paste error which I reproduced in my answer. The complete script was $Emulator = Get-Item "$env:ProgramFiles\Azure Cosmos DB Emulator\Microsoft.Azure.Cosmos.Emulator.exe"
$IPAddress = Get-NetIPAddress -AddressFamily IPV4 -AddressState Preferred -PrefixOrigin Manual | Select-Object IPAddress
New-Object PSObject @{
Emulator = $Emulator.BaseName
Version = $Emulator.VersionInfo.ProductVersion
Endpoint = @($(hostname), $IPAddress.IPAddress) | ForEach-Object { "https://${_}:8081/" }
MongoDBEndpoint = @($(hostname), $IPAddress.IPAddress) | ForEach-Object { "mongodb://${_}:10255/" }
CassandraEndpoint = @($(hostname), $IPAddress.IPAddress) | ForEach-Object { "tcp://${_}:10350/" }
GremlinEndpoint = @($(hostname), $IPAddress.IPAddress) | ForEach-Object { "http://${_}:8901/" }
TableEndpoint = @($(hostname), $IPAddress.IPAddress) | ForEach-Object { "https://${_}:8902/" }
IPAddress = $IPAddress.IPAddress
} My original suggestion about not listening to the IP was completely nonsense because it answers with 500 which means it is listening. And my script shows the local IPs and not the IP the emulator is listening. So sorry again. My description was a result of the stress and anger about the situation. Our complete development was blocked without any guess what we did wrong and how to solve it. |
Thanks @bogdan-damian-bgd, here's the workaround ready to be copy-pasted into a Github action. |
This issue is resolved in Azure Cosmos DB Emulator v2.14.12. I have created an issue for tool update. |
Deployed, please test it! If something is broken feel free to reach us again. |
Tried to use the latest version, and it works again! |
I am still getting the same issue, and I used the commands from this thread. I checked I am using the latest version of Cosmos DB Emulator, but still get the same error. Here is the script I used to setup Cosmos DB Emulator, and the output from it.
From the application, I am getting |
If I hardcode |
I downgraded to 2.14.4, this solved the problem. |
This fixed my issue too. Thank you! |
Description
Since yesterday our tests which use Azure CosmosDB Emulator on the Agent doesn't run any more.
It seems like the Emulator isn't listening on localhost any more.
In the history of the agent description I see that you upgraded the emulator to a new version.
This broke our complete build and deploy pipeline and we are unable to deploy for almost a day.
Platforms affected
Runner images affected
Image version and build link
Image: windows-2022
Version: 20230129.1
Included Software: https://github.com/actions/runner-images/blob/win22/20230129.1/images/win/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20230129.1
Is it regression?
windows-2022, 20 hours ago.
Expected behavior
Azure CosmosDB-Emulator is listening to localhost.
Actual behavior
Azure CosmosDB-Emulator listenes only to a fixed IP-Address, in my case: 172.25.144.1
Repro steps
Run a pipeline which executes:
This should output the localhost as the listening IP-Address.
The text was updated successfully, but these errors were encountered: