Skip to content

[fix][client] Unwrap completion exception for Lookup Services - #17717

Merged
codelipenghui merged 2 commits into
apache:masterfrom
codelipenghui:penghui/lookup-service-unwrap-completion-exception
Sep 20, 2022
Merged

[fix][client] Unwrap completion exception for Lookup Services#17717
codelipenghui merged 2 commits into
apache:masterfrom
codelipenghui:penghui/lookup-service-unwrap-completion-exception

Conversation

@codelipenghui

Copy link
Copy Markdown
Contributor

Motivation

The error messages look a little bit wired while I try to use pulsar-client to run some tests.

PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException

During the broker shutdown, the error logs like following

2022-09-19T11:37:56,215+0800 [pulsar-client-io-1-1] WARN  org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to localhost/<unresolved>:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:6650
2022-09-19T11:37:56,215+0800 [pulsar-client-io-1-1] WARN  org.apache.pulsar.client.impl.ConnectionHandler - [persistent://public/default/test] [reader-23bc11015c] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:6650
2022-09-19T11:37:56,215+0800 [pulsar-client-io-1-1] WARN  org.apache.pulsar.client.impl.ConnectionHandler - [persistent://public/default/test] [reader-23bc11015c] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:6650 -- Will try again in 0.736 s
2022-09-19T11:37:56,952+0800 [pulsar-timer-6-1] INFO  org.apache.pulsar.client.impl.ConnectionHandler - [persistent://public/default/test] [reader-23bc11015c] Reconnecting after connection was closed
2022-09-19T11:37:56,953+0800 [pulsar-client-io-1-1] WARN  org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to localhost/<unresolved>:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:6650
2022-09-19T11:37:56,953+0800 [pulsar-client-io-1-1] WARN  org.apache.pulsar.client.impl.ConnectionHandler - [persistent://public/default/test] [reader-23bc11015c] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:6650
2022-09-19T11:37:56,953+0800 [pulsar-client-io-1-1] WARN  org.apache.pulsar.client.impl.ConnectionHandler - [persistent://public/default/test] [reader-23bc11015c] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:6650 -- Will try again in 1.583 s

Modifications

Make the Lookup Services handle the completion exception property.

Documentation

  • doc-not-needed
    (Please explain why)

Matching PR in forked repository

PR in forked repository: codelipenghui#12

@codelipenghui codelipenghui self-assigned this Sep 19, 2022
@codelipenghui codelipenghui added this to the 2.12.0 milestone Sep 19, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 19, 2022
@codelipenghui codelipenghui added type/bug The PR fixed a bug or issue reported a bug area/client and removed doc-not-needed Your PR changes do not impact docs labels Sep 19, 2022
@codelipenghui codelipenghui changed the title [fix][broker] Unwrap completion exception for Lookup Services [fix][client] Unwrap completion exception for Lookup Services Sep 19, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 19, 2022
@codelipenghui
codelipenghui merged commit 320300c into apache:master Sep 20, 2022
@Technoboy- Technoboy- modified the milestones: 2.12.0, 2.11.0 Sep 20, 2022
congbobo184 pushed a commit that referenced this pull request Nov 14, 2022
@congbobo184 congbobo184 added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Nov 14, 2022
@codelipenghui
codelipenghui deleted the penghui/lookup-service-unwrap-completion-exception branch November 26, 2022 06:40
liangyepianzhou pushed a commit that referenced this pull request Dec 6, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Dec 6, 2022
congbobo184 pushed a commit that referenced this pull request Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants