Connecting issue from Azure Web App to Zeebe in Azure VM

I have a single-node Zeebe (broker+gateway) 0.23.1 running on Azure VM. I have appropriate ports open in VM’s inbound firewall, and am able to connect to it from a .NET desktop app I have created (using latest .NET Zeebe client) successfully - the desktop app is running on a remote machine, not the same Azure VM. Using same .NET client, I am trying to connect from an Azure Web App (using same code, same URL) to Zeebe on that VM, and it fails:

Connecting to 10.x.x.x:26500: Host 10.x.x.x has TCP Port 26500 open. Host 10.x.x.x has TCP Port 26501 open. Host 10.x.x.x has TCP Port 26502 open.

Error: Status(StatusCode=Unavailable, Detail="failed to connect to all addresses")

So it can see and connect to the ports Zeebe sets up (I am checking it with TcpClient), but can’t get the Zeebe topology. It all works fine on my local machine though.

Has anyone had this issue with Azure Web Apps? Maybe I am missing a port in the VM’s inbound firewall rule (but that won’t explain ability to connect to Zeebe using remote desktop app)? It currently has incoming TCP ports 26500, 26501, 26502, 9600 open. Network host setting in Zeebe broker’s yaml is set to 0.0.0.0.

I know Zeebe .NET client uses Google’s and not Microsoft’s gRPC library, but could it possibly be related to:

https://feedback.azure.com/forums/169385-web-apps/suggestions/40585333-grpc-support-in-azure-app-service

1 Like

That looks like it.

Interesting thanks for sharing

So is there a problem using the Zeebe client from an azure function running on windows o/s?

Again like the OP I have it running locally but when deployed to azure it does not work actually throws a very strange exception message on startup when trying to register the dependency, im using zb-client 1.2.1

Microsoft.Azure.WebJobs.Script.ExternalStartupException : Error configuring services in an external startup class. —> System.IO.FileNotFoundException : Could not load file or assembly ‘System.ComponentModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.

Occurring right when i try and register the client like this :-
return CamundaCloudClientBuilder.Builder()
.UseClientId(“cid”)
.UseClientSecret(“cs”)
.UseContactPoint(“cp”)
.Build();

Any help here would be useful as Ive already spent half a day on this

Upgrade to zb-client 1.3.0 but still no change. here is the error message encountered, naturally it works when I run it locally:-

Status(StatusCode="Unavailable", Detail="Getting metadata from plugin failed with error: Exception occurred in metadata credentials plugin. System.IO.FileNotFoundException: Could not find file 'C:\home\site\wwwroot\.zeebe'.
File name: 'C:\home\site\wwwroot\.zeebe'
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.Directory.CreateDirectory(String path)
   at Zeebe.Client.Impl.Builder.CamundaCloudTokenProvider.RequestAccessTokenAsync()
   at Grpc.Auth.GoogleAuthInterceptors.<>c__DisplayClass2_0.<<FromCredential>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Grpc.Core.Internal.NativeMetadataCredentialsPlugin.GetMetadataAsync(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr)", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1686185668.160000000","description":"Error received from peer xxx.syd-1.zeebe.camunda.io:443","file":"..\..\..\src\core\lib\surface\call.cc","file_line":953,"grpc_message":"Getting metadata from plugin failed with error: Exception occurred in metadata credentials plugin. System.IO.FileNotFoundException: Could not find file 'C:\home\site\wwwroot\.zeebe'.\r\nFile name: 'C:\home\site\wwwroot\.zeebe'\r\n   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)\r\n   at System.IO.Directory.CreateDirectory(String path)\r\n   at Zeebe.Client.Impl.Builder.CamundaCloudTokenProvider.RequestAccessTokenAsync()\r\n   at Grpc.Auth.GoogleAuthInterceptors.<>c__DisplayClass2_0.<<FromCredential>b__0>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n   at Grpc.Core.Internal.NativeMetadataCredentialsPlugin.GetMetadataAsync(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr)","grpc_status":14}")

More details on this one, I deployed the function to a Linux App Service plan and deployed a NET6.0 dotnet-isolated FUNCTIONS_WORKER_RUNTIME and this worked. It seems that it would only work from an application running on a linux O/S and not windows. Hopefully this is some help to others out there experiencing similar issues.