You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/06/18 20:55:18 UTC

[GitHub] [dolphinscheduler] lyn916 commented on issue #5644: [Bug][NetUtils] Registered ip

lyn916 commented on issue #5644:
URL: https://github.com/apache/dolphinscheduler/issues/5644#issuecomment-863958952


   -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 an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org