SunJiFengPlus opened a new issue #2921:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/2921


   **Describe the bug**
   problem in ```OSUtils::getHost```,
   ``` java
       try {
         return InetAddress.getLocalHost().getHostAddress();
       } catch (UnknownHostException e) {
         logger.error(e.getMessage(),e);
       }
       return null;
   ```
   
   sometimes ```InetAddress.getLocalHost().getHostAddress();``` return 
127.0.0.1, sometimes return other address, when using other address sending a 
heartbeat to zookeeper, throw ```KeeperException$NoNodeException```. <br>
   
   ---
   
   问题在 ```OSUtils::getHost``` 这个方法中, 
```InetAddress.getLocalHost().getHostAddress(); ```这个方法有时候返回的是 127.0.0.1, 
但是有时候会返回其他IP. 当以其他IP发送心跳时候就会抛 ```KeeperException$NoNodeException```<br>
   
   **To Reproduce**
   i dont kwon how to reproduce, but it really happened on my mac,  i just 
start application, after a while, application throw 
```KeeperException$NoNodeException```.  On debug mode, i find problem in 
```OSUtils::getHost```<br>
   
   ---
   
   不太清楚如何在其他电脑上复现, 但确实发生在我的Mac上, 启动应用后过一会就会抛 
```KeeperException$NoNodeException```. 在Debug的时候我定位到问题出在 ```OSUtils::getHost``` 
<br>
   
   **Which version of Dolphin Scheduler:**
   ```<version>1.2.1-SNAPSHOT</version>```


----------------------------------------------------------------
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:
[email protected]


Reply via email to