Skip to content

Multi App Run - Stop processing and exit when there is error in daprd startup #1257

Description

@pravinpushkar

Expected Behavior

It should provide details of the error, stop processing further apps and exit the process.

Actual Behavior

When there is error in daprd startup, for example loading of components etc then there is no error logs on the console and it console logs gives indication of all successful steps.

⚠  This is a preview feature and subject to change in future releases.
ℹ️  Validating config and starting app "addapp"
ℹ️  Started Dapr with app id "addapp". HTTP Port: 3503. gRPC Port: 61181
ℹ️  Writing log files to directory : /Users/pravin/work/quickstarts/tutorials/distributed-calculator/go/.dapr/logs
ℹ️  Validating config and starting app "subtractapp"
Listening on port 4000!
ℹ️  Started Dapr with app id "subtractapp". HTTP Port: 3502. gRPC Port: 61215
ℹ️  Writing log files to directory : /Users/pravin/work/quickstarts/tutorials/distributed-calculator/node/.dapr/logs
ℹ️  Validating config and starting app "multiplyapp"

This does take extra time because behind the scene below is happening (actual daprd logs in log file)-

time="2023-03-09T15:11:17.224749+05:30" level=fatal msg="process component pubsub error: [INIT_COMPONENT_FAILURE]: initialization error occurred for pubsub (pubsub.kafka/v1): kafka error: missing 'brokers' attribute" app_id=addapp instance=Pravins-MacBook-Pro.local scope=dapr.runtime type=log ver=1.10.2
The daprd process exited with error code: exit status 1
Could not update sidecar metadata for cliPID: PUT http://127.0.0.1:3503/v1.0/metadata/cliPID giving up after 5 attempt(s): Put "http://127.0.0.1:3503/v1.0/metadata/cliPID": dial tcp 127.0.0.1:3503: connect: connection refused
Could not update sidecar metadata for runFile: PUT http://127.0.0.1:3503/v1.0/metadata/runTemplatePath giving up after 5 attempt(s): Put "http://127.0.0.1:3503/v1.0/metadata/runTemplatePath": dial tcp 127.0.0.1:3503: connect: connection refused
Updating metadata for app command: go run app.go
Could not update sidecar metadata for appCommand: PUT http://127.0.0.1:3503/v1.0/metadata/appCommand giving up after 5 attempt(s): Put "http://127.0.0.1:3503/v1.0/metadata/appCommand": dial tcp 127.0.0.1:3503: connect: connection refused
Updating metadata for appPID: 46924
Could not update sidecar metadata for appPID: PUT http://127.0.0.1:3503/v1.0/metadata/appPID giving up after 5 attempt(s): Put "http://127.0.0.1:3503/v1.0/metadata/appPID": dial tcp 127.0.0.1:3503: connect: connection refused
You're up and running! Dapr logs will appear here.

Steps to Reproduce the Problem

Release Note

RELEASE NOTE: FIX Improve console logs of daprd in error scenarios for Multi App Run

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions