[Question][NetUtils] Registered ip
To Reproduce Steps to reproduce the behavior, for example:
- When I use keepalived to bind the virtual ip, the registered ip will be bound to vip
Which version of Dolphin Scheduler: -[1.3.6-latest]
Requirement or improvement
- Specify the interface name and ip when deploying,
To Reproduce Steps to reproduce the behavior, for example:
- When I use keepalived to bind the virtual ip, the registered ip will be bound to vip
- When I have two network planes, service network and storage network, both of which are 172.x.x.x segments, such as [172.1.2.11, 172.1.2.12, 172.1.2.13], [172.60.2.11, 172.60.2.12, 172.60.2.13], NetUtils cannot accurately bind to the ip I want to bind according to the config inner or outer
Which version of Dolphin Scheduler: -[1.3.6-latest]
Requirement or improvement
- Specify the interface name and ip when deploying,
Hi:
- Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
- In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
- If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to [email protected].
Maybe you can try to use this parameter to specify the NIC.
dolphin.scheduler.network.interface.preferred
Currently this parameter is only supported for jvm startup parameter injection.
-Dvip=192.168.168.190 ` package org.apache.dolphinscheduler.common.utils; public class NetUtils {
private static Optional<InetAddress> toValidAddress(InetAddress address) {
String vip = System.getProperty(VIP);
if (address instanceof Inet6Address) {
Inet6Address v6Address = (Inet6Address) address;
if (isPreferIPV6Address()) {
return Optional.ofNullable(normalizeV6Address(v6Address));
}
}
if (isValidV4Address(address)){
if (vip == null){
return Optional.of(address);
}else if(!address.getHostAddress().equals(vip)) {
return Optional.of(address);
}
}
return Optional.empty();
}
} ` I solve this problem by adding VIP parameter and skipping VIP when registering IP
dolphinscheduler-daemon.sh export DOLPHINSCHEDULER_OPTS=" -server -Ddolphin.scheduler.network.interface.preferred=ens33 -Dvip=192.168.168.190 -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m -Xss512k -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+PrintGCDetails -Xloggc:$DOLPHINSCHEDULER_LOG_DIR/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof -XshowSettings:vm $DOLPHINSCHEDULER_OPTS "
This is usually not recommended (although it is also a solution), if the cluster deployment, the parameters are usually set by the operations staff unified. For IP issues, it can't just be the framework that is doing the hard work, the user side needs to do the processing as well.