You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by wu...@apache.org on 2021/05/06 09:15:25 UTC

[shardingsphere-elasticjob] branch master updated: Update FAQ (#1888)

This is an automated email from the ASF dual-hosted git repository.

wuweijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git


The following commit(s) were added to refs/heads/master by this push:
     new adcf88c  Update FAQ (#1888)
adcf88c is described below

commit adcf88ce2decc6dce507c93cfa5c2911df2ee7f2
Author: 吴伟杰 <wu...@apache.org>
AuthorDate: Thu May 6 17:15:09 2021 +0800

    Update FAQ (#1888)
---
 docs/content/faq/_index.cn.md | 12 +++++++++++-
 docs/content/faq/_index.en.md | 14 ++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/docs/content/faq/_index.cn.md b/docs/content/faq/_index.cn.md
index ce9b54e..9561e9c 100644
--- a/docs/content/faq/_index.cn.md
+++ b/docs/content/faq/_index.cn.md
@@ -91,7 +91,7 @@ ElasticJob 已将 IP 地址等敏感信息过滤,导出的信息可在公网
 ## 11. 为什么首次启动存在任务调度延迟的情况?
 
 回答:
-ElasticJob 执行任务会获取本机IP,首次可能存在获取IP较慢的情况。尝试设置-Djava.net.preferIPv4Stack=true.
+ElasticJob 执行任务会获取本机IP,首次可能存在获取IP较慢的情况。尝试设置 `-Djava.net.preferIPv4Stack=true`.
 
 
 ## 12. Windows环境下,运行ShardingSphere-ElasticJob-UI,找不到或无法加载主类 org.apache.shardingsphere.elasticjob.lite.ui.Bootstrap,如何解决?
@@ -104,7 +104,9 @@ ElasticJob 执行任务会获取本机IP,首次可能存在获取IP较慢的
 
 打开cmd.exe并执行下面的命令:
 
+```bash
 tar zxvf apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz
+```
 
 ## 13. 运行 Cloud Scheduler 持续输出日志 "Elastic job: IP:PORT has leadership",不能正常运行
 
@@ -115,3 +117,11 @@ Cloud Scheduler 依赖 Mesos 库,启动时需要通过 `-Djava.library.path` 
 例如,Mesos 库位于 `/usr/local/lib`,启动 Cloud Scheduler 前需要设置 `-Djava.library.path=/usr/local/lib`。
 
 Mesos 相关请参考 [Apache Mesos](https://mesos.apache.org/)。
+
+## 14. 在多网卡的情况下无法获取到合适的 IP
+
+回答:
+
+可以通过系统变量 `elasticjob.preferred.network.interface` 指定网卡。
+
+例如指定网卡 eno1:`-Delasticjob.preferred.network.interface=eno1`。
diff --git a/docs/content/faq/_index.en.md b/docs/content/faq/_index.en.md
index cb2df34..befb735 100644
--- a/docs/content/faq/_index.en.md
+++ b/docs/content/faq/_index.en.md
@@ -92,7 +92,7 @@ Shard to be adjusted indicates the state when the job has started but has not ye
 
 Answer:
 
-ElasticJob will obtain the local IP when performing task scheduling, and it may be slow to obtain the IP for the first time. Try to set -Djava.net.preferIPv4Stack=true.
+ElasticJob will obtain the local IP when performing task scheduling, and it may be slow to obtain the IP for the first time. Try to set `-Djava.net.preferIPv4Stack=true`.
 
 
 ## 12. In Windows env, run ShardingSphere-ElasticJob-UI, could not find or load main class org.apache.shardingsphere.elasticjob.lite.ui.Bootstrap. Why?
@@ -103,9 +103,11 @@ Some decompression tools may truncate the file name when decompressing the Shard
 
 Open cmd.exe and execute the following command:
 
+```bash
 tar zxvf apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz
+```
 
-## 13. Unable to startup Cloud Scheduler. Continuously output "Elastic job: IP:PORT has leadership"gg
+## 13. Unable to startup Cloud Scheduler. Continuously output "Elastic job: IP:PORT has leadership"
 
 Answer: 
 
@@ -114,3 +116,11 @@ Cloud Scheduler required Mesos native library. Specify Mesos native library path
 For instance, Mesos native libraries are under `/usr/local/lib`, so the property `-Djava.library.path=/usr/local/lib` need to be set to start the Cloud Scheduler.
 
 About Apache Mesos, please refer to [Apache Mesos](https://mesos.apache.org/).
+
+## 14. Unable to obtain a suitable IP in the case of multiple network interfaces
+
+Answer: 
+
+You may specify interface by system property `elasticjob.preferred.network.interface`.
+
+For example, specify the interface eno1: `-Delasticjob.preferred.network.interface=eno1`.