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

fix-4787 #4802

Merged
merged 1 commit into from
Jan 28, 2021
Merged

fix-4787 #4802

merged 1 commit into from
Jan 28, 2021

Conversation

KeRan213539
Copy link
Collaborator

@KeRan213539 KeRan213539 commented Jan 26, 2021

fix #4787
根据冒号拆分 "IP(域名):端口" 格式字符串时,移除 isIPv4 的判断.
因为在k8s环境下,这个时候域名可能还没注册上导致域名解析失败. 并且如果域名指向的是IPV6,也会出问题

@@ -174,9 +171,6 @@ public static String getIPFromString(String str) {
Matcher m = ipv4Pattern.matcher(str);
if (m.find()) {
result = m.group();
if (!isIPv4(result)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里为何也删除了?域名的应该进不来

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这里主要是从数据库url里解析IP地址,ipv4Pattern已经验证了是v4的串了,再验证一次也没意义

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.4.1 k8s 环境下集群启动有问题
3 participants