Skip to content
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

feat(cluster): impove error message when bootstrap channel fails #12760

Merged
merged 1 commit into from
May 15, 2023

Conversation

deepthidevaki
Copy link
Contributor

@deepthidevaki deepthidevaki commented May 15, 2023

Description

A cluster was reporting following error:

RaftServer{raft-partition-partition-3} - ConfigureRequest{...} to 0 failed: java.util.concurrent.CompletionException: java.net.ConnectException: Failed to connect channel for address zeebe-0.zeebe-broker-service.a7151101-b5c5-4415-8970-684b97779c02-zeebe.svc.cluster.local:26502

This has no information to help debug. This PR adds the resolved IP and error to this message.

Related issues

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Other teams:
If the change impacts another team an issue has been created for this team, explaining what they need to do to support this change.

Please refer to our review guidelines.

@deepthidevaki deepthidevaki added backport stable/8.2 Backport a pull request to 8.2.x backport stable/8.0 labels May 15, 2023
@deepthidevaki deepthidevaki marked this pull request as ready for review May 15, 2023 08:32
Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @deepthidevaki :)

Comment on lines +728 to +730
String.format(
"Failed to connect channel for address %s (resolved: %s) : %s",
address, address.address(), onConnect.cause())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets follow our error guidelines :) https://github.com/camunda/zeebe/wiki/Error-Guidelines

Suggested change
String.format(
"Failed to connect channel for address %s (resolved: %s) : %s",
address, address.address(), onConnect.cause())));
String.format(
"Expected to create channel to %s (resolved: %s), but failed with : %s",
address, address.address(), onConnect.cause())));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it unnecessarily verbose. When we say "Failed to connect channel" It is already clear that it is expected to connect channel. Right? Besides the error guidelines doesn't require to use the exact same format.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer a consistent format, even if it is a bit more verbose it is always clear what is expected and what happened with additional context. As far as I know, we agreed on that a while ago. If you disagree, feel free to bring it up in a team discussion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW go ahead to merge it anyway, nothing what should block you (I already accepted)

@deepthidevaki
Copy link
Contributor Author

bors merge

zeebe-bors-camunda bot added a commit that referenced this pull request May 15, 2023
12760: feat(cluster): impove error message when bootstrap channel fails r=deepthidevaki a=deepthidevaki

## Description

A cluster was reporting following error:
```
RaftServer{raft-partition-partition-3} - ConfigureRequest{...} to 0 failed: java.util.concurrent.CompletionException: java.net.ConnectException: Failed to connect channel for address zeebe-0.zeebe-broker-service.a7151101-b5c5-4415-8970-684b97779c02-zeebe.svc.cluster.local:26502
```
This has no information to help debug. This PR adds the resolved IP and error to this message.

## Related issues



Co-authored-by: zeebe-bors-camunda[bot] <101703512+zeebe-bors-camunda[bot]@users.noreply.github.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@deepthidevaki
Copy link
Contributor Author

bors merge

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit 5280440 into main May 15, 2023
34 of 35 checks passed
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the dd-improve-netty-connection-error branch May 15, 2023 13:48
@backport-action
Copy link
Collaborator

Backport failed for stable/8.0, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/8.0
git worktree add -d .worktree/backport-12760-to-stable/8.0 origin/stable/8.0
cd .worktree/backport-12760-to-stable/8.0
git checkout -b backport-12760-to-stable/8.0
ancref=$(git merge-base 6929e1c28d25aac8493b0f09650ddb8d17e0344f 5d8f9d314b68b79f74323da0f4a1a9d8db08b13b)
git cherry-pick -x $ancref..5d8f9d314b68b79f74323da0f4a1a9d8db08b13b

@backport-action
Copy link
Collaborator

Backport failed for stable/8.1, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/8.1
git worktree add -d .worktree/backport-12760-to-stable/8.1 origin/stable/8.1
cd .worktree/backport-12760-to-stable/8.1
git checkout -b backport-12760-to-stable/8.1
ancref=$(git merge-base 6929e1c28d25aac8493b0f09650ddb8d17e0344f 5d8f9d314b68b79f74323da0f4a1a9d8db08b13b)
git cherry-pick -x $ancref..5d8f9d314b68b79f74323da0f4a1a9d8db08b13b

@backport-action
Copy link
Collaborator

Backport failed for stable/8.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/8.2
git worktree add -d .worktree/backport-12760-to-stable/8.2 origin/stable/8.2
cd .worktree/backport-12760-to-stable/8.2
git checkout -b backport-12760-to-stable/8.2
ancref=$(git merge-base 6929e1c28d25aac8493b0f09650ddb8d17e0344f 5d8f9d314b68b79f74323da0f4a1a9d8db08b13b)
git cherry-pick -x $ancref..5d8f9d314b68b79f74323da0f4a1a9d8db08b13b

zeebe-bors-camunda bot added a commit that referenced this pull request May 16, 2023
12781: [Backport stable/8.2] feat(cluster): improve error message when bootstrap channel fails r=Zelldon a=deepthidevaki

Backport of #12760 

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 17, 2023
12782: [Backport stable/8.0] [Backport stable/8.2] feat(cluster): improve error message when bootstrap channel fails r=deepthidevaki a=backport-action

# Description
Backport of #12781 to `stable/8.0`.

relates to #12760

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 17, 2023
12783: [Backport stable/8.1] [Backport stable/8.2] feat(cluster): improve error message when bootstrap channel fails r=deepthidevaki a=backport-action

# Description
Backport of #12781 to `stable/8.1`.

relates to #12760

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 17, 2023
12782: [Backport stable/8.0] feat(cluster): improve error message when bootstrap channel fails r=deepthidevaki a=backport-action

# Description
Backport of #12781 to `stable/8.0`.

relates to #12760

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 17, 2023
12783: [Backport stable/8.1] [Backport stable/8.2] feat(cluster): improve error message when bootstrap channel fails r=deepthidevaki a=backport-action

# Description
Backport of #12781 to `stable/8.1`.

relates to #12760

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 17, 2023
12782: [Backport stable/8.0] feat(cluster): improve error message when bootstrap channel fails r=deepthidevaki a=backport-action

# Description
Backport of #12781 to `stable/8.0`.

relates to #12760

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 17, 2023
12783: [Backport stable/8.1] feat(cluster): improve error message when bootstrap channel fails r=deepthidevaki a=backport-action

# Description
Backport of #12781 to `stable/8.1`.

relates to #12760

Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
@lenaschoenburg lenaschoenburg added version:8.1.13 Marks an issue as being completely or in parts released in 8.1.13 version:8.2.6 Marks an issue as being completely or in parts released in 8.2.6 labels Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.2 Backport a pull request to 8.2.x version:8.1.13 Marks an issue as being completely or in parts released in 8.1.13 version:8.2.6 Marks an issue as being completely or in parts released in 8.2.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants