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

url too many colons in address #1306

Merged
merged 1 commit into from Jul 8, 2021
Merged

url too many colons in address #1306

merged 1 commit into from Jul 8, 2021

Conversation

XiaoWeiKIN
Copy link
Contributor

当注册中心或者元数据中心address配置为多个例如127.0.0.1:2181,127.0.0.2:2181,127.0.0.2:2181

if strings.Contains(location, ":") {
			s.Ip, s.Port, err = net.SplitHostPort(location)
			if err != nil {
				return &s, perrors.Errorf("net.SplitHostPort(url.Host{%s}), error{%v}", s.Location, err)
			}
			break
		}

net.SplitHostPort(location) 方法解析会报错too many colons in address,所以url中的host和port取第一个即可

Provider starts metadata report error, and the error is {Start MetadataReport failed.: Invalid MetadataReportConfig.}

@codecov-commenter
Copy link

Codecov Report

Merging #1306 (18f344f) into 3.0 (968650f) will decrease coverage by 3.31%.
The diff coverage is 55.21%.

❗ Current head 18f344f differs from pull request most recent head a2f253e. Consider uploading reports for the commit a2f253e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##              3.0    #1306      +/-   ##
==========================================
- Coverage   59.53%   56.22%   -3.32%     
==========================================
  Files         259      273      +14     
  Lines       12737    12781      +44     
==========================================
- Hits         7583     7186     -397     
- Misses       4199     4692     +493     
+ Partials      955      903      -52     
Impacted Files Coverage Δ
cluster/cluster_impl/available_cluster_invoker.go 66.66% <ø> (ø)
cluster/cluster_impl/broadcast_cluster_invoker.go 76.47% <ø> (ø)
cluster/cluster_impl/failfast_cluster_invoker.go 66.66% <ø> (ø)
cluster/cluster_impl/mock_cluster.go 0.00% <0.00%> (ø)
cluster/loadbalance/random.go 100.00% <ø> (ø)
common/extension/auth.go 0.00% <ø> (ø)
common/extension/cluster.go 0.00% <ø> (ø)
common/extension/cluster_interceptor.go 0.00% <0.00%> (ø)
common/extension/config_center.go 0.00% <ø> (ø)
common/extension/config_center_factory.go 0.00% <ø> (ø)
... and 293 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21e9f4e...a2f253e. Read the comment docs.

@LaurenceLiZhixin LaurenceLiZhixin added this to the v3.0.0 milestone Jul 7, 2021
@LaurenceLiZhixin LaurenceLiZhixin merged commit 2e8402e into apache:3.0 Jul 8, 2021
xfstart07 added a commit to xfstart07/dubbo-go that referenced this pull request Dec 12, 2021
@xfstart07 xfstart07 mentioned this pull request Dec 12, 2021
xfstart07 added a commit to xfstart07/dubbo-go that referenced this pull request Dec 16, 2021
xfstart07 added a commit to xfstart07/dubbo-go that referenced this pull request Dec 16, 2021
xfstart07 added a commit to xfstart07/dubbo-go that referenced this pull request Dec 16, 2021
xfstart07 added a commit to xfstart07/dubbo-go that referenced this pull request Dec 16, 2021
AlexStocks pushed a commit that referenced this pull request Dec 18, 2021
AlexStocks pushed a commit that referenced this pull request Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants