azure-functions-extension icon indicating copy to clipboard operation
azure-functions-extension copied to clipboard

Azure Function Extension to show warning message if app_port is given for non-trigger dapr functions

Open ASHIQUEMD opened this issue 1 year ago • 3 comments

Problem: The console message doesn't clearly inform the user when the app_port is set, but there's no listener (app) on that port. This situation occurs when using a function app with Dapr input/output bindings and without Dapr triggers, specifying an app_port with Dapr. Dapr keeps attempting to connect to the app on the specified port, even if there's no app running on that port.

Expectation: When the user provides an app_port to Dapr, and there's no app running on that port, there should be a log message indicating that Dapr is trying to communicate on that port, but no app is available.

Message in console:

the current message is below:time="2023-09-26T10:24:23.9718899+05:30" level=info msg="internal gRPC server is running on port 65226" app_id=funcorderapp instance= scope=dapr.runtime type=log ver=1.10.6 time="2023-09-26T10:24:23.9718899+05:30" level=info msg="application protocol: http. waiting on port 3003. This will block until the app is listening on that port." app_id=funcname instance= scope=dapr.runtime type=log ver=1.10.6

Here is the sample project: https://github.com/ASHIQUEMD/azure-func-isolated-dapr Dapr cli command to run the app: dapr run --app-id functionapp --app-port 3001 --dapr-http-port 3501 -- func host start

ASHIQUEMD avatar Sep 26 '23 07:09 ASHIQUEMD

Hey @ASHIQUEMD Would you be able to provide an example project, and the commands you're using to run Dapr and the function host?

Phiph avatar Sep 28 '23 19:09 Phiph

@Phiph, I have update issue with project links, please have a look.

ASHIQUEMD avatar Sep 29 '23 09:09 ASHIQUEMD

I've had a look, and I'm don't have any ideas around it at the moment. It appears that's an internal call for DAPR to register and set the app up with its configuration, along with starting the Actor and Workflow Engine.

Do you expect a Warn Message for anyone using the SDK without a API endpoint application with something along the lines of:

Dapr is expecting to communicate with your application, but it does not have a HTTP port. Binding only function apps are not yet supported

Phiph avatar Oct 03 '23 23:10 Phiph