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

brokerServiceUrl do not support mutli hosts in ipv6 environment #8092

Closed
wangjialing218 opened this issue Sep 21, 2020 · 3 comments · Fixed by #8120
Closed

brokerServiceUrl do not support mutli hosts in ipv6 environment #8092

wangjialing218 opened this issue Sep 21, 2020 · 3 comments · Fixed by #8120
Assignees
Labels
help wanted release/2.6.2 type/bug The PR fixed a bug or issue reported a bug
Milestone

Comments

@wangjialing218
Copy link
Contributor

Describe the bug
Set brokerServiceUrl in client.conf with mutli ipv6 host address like pulsar://[fec0:0:0:ffff::1]:6650,[fec0:0:0:ffff::2]:6650, when client connect to brokers it got such exception:
java.lang.IllegalArgumentException: Illegal character in port number at index 32: pulsar://[fec0:0:0:ffff::1]:6650,[fec0:0:0:ffff::2]:6650 at java.net.URI.create(URI.java:852) ~[na:1.8.0_131]

To Reproduce
Steps to reproduce the behavior:

  1. Start mutli brokers in ipv6 environment
  2. Set brokerServiceUrl in client.conf with mutli ipv6 host address and connect to brokers.

Expected behavior
Client can connect to brokers

Additional context
It seems ipv6 URI do not support mutli hosts split by comma. Is there any workaround to specify mutli ipv6 hosts in brokerServiceUrl ? or some code need changed in pulsar-client?

@codelipenghui
Copy link
Contributor

Are you interested in pushing a PR for fixing this issue?

@wangjialing218
Copy link
Contributor Author

I will work on fixing this issue.

@codelipenghui
Copy link
Contributor

Great, thanks @wangjialing218

codelipenghui pushed a commit that referenced this issue Sep 30, 2020
### Motivation
Fixes #8092

### Modifications

split url string by comma before create URI object when handling multi ipv6 hosts

### Verifying this change

This change added tests and can be verified as follows:

  - add testMultiIpv6Uri() in ServiceURI
lbenc135 pushed a commit to lbenc135/pulsar that referenced this issue Oct 3, 2020
### Motivation
Fixes apache#8092

### Modifications

split url string by comma before create URI object when handling multi ipv6 hosts

### Verifying this change

This change added tests and can be verified as follows:

  - add testMultiIpv6Uri() in ServiceURI
wolfstudy pushed a commit that referenced this issue Oct 30, 2020
### Motivation
Fixes #8092

### Modifications

split url string by comma before create URI object when handling multi ipv6 hosts

### Verifying this change

This change added tests and can be verified as follows:

  - add testMultiIpv6Uri() in ServiceURI

(cherry picked from commit c2a8283)
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this issue Nov 13, 2020
### Motivation
Fixes apache#8092

### Modifications

split url string by comma before create URI object when handling multi ipv6 hosts

### Verifying this change

This change added tests and can be verified as follows:

  - add testMultiIpv6Uri() in ServiceURI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted release/2.6.2 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants