Apache nifi 设置Nifi.Web.http.host后无法访问Nifi Web UI

Apache nifi 设置Nifi.Web.http.host后无法访问Nifi Web UI,apache-nifi,hortonworks-data-platform,ambari,hortonworks-dataflow,Apache Nifi,Hortonworks Data Platform,Ambari,Hortonworks Dataflow,我对Nifi Web UI有一个问题。当我设置nifi.web.http.host=luan-ht01时,我无法通过公共IP访问浏览器上的nifi web UI,例如:。我只能通过主机名访问Nifi Web。 你有什么解决办法吗? 非常感谢。一个快速解决方法是为您的本地主机IP地址创建一个“别名”,将其命名为您的域(当然,只是为了在本地环境中进行测试): 在基于GNU/Linux的系统上,只需编辑(使用sudo权限)您的/etc/hosts文件,并为localhost添加另一行类似的内容: /e

我对Nifi Web UI有一个问题。当我设置nifi.web.http.host=luan-ht01时,我无法通过公共IP访问浏览器上的nifi web UI,例如:。我只能通过主机名访问Nifi Web。 你有什么解决办法吗?
非常感谢。

一个快速解决方法是为您的本地主机IP地址创建一个“别名”,将其命名为您的域(当然,只是为了在本地环境中进行测试):

在基于GNU/Linux的系统上,只需编辑(使用
sudo
权限)您的
/etc/hosts
文件,并为localhost添加另一行类似的内容:

/etc/主持人

在Windows系统中,主机文件(通常)位于:

c:\Windows\System32\Drivers\etc\hosts
这样,您现在就可以将浏览器指向
http://luan-ht01:8080/nifi
,希望能找回您的web UI


享受;)

您的体验是预期的行为——当您显式设置主机名时,NiFi将响应该主机名的地址。您可以将该属性值留空,让NiFi在所有可用主机上响应(即
localhost
127.0.0.1
,等等)。在启动期间,
$NIFI_HOME/logs/NIFI app.log
文件将显示如下列表,列出所有侦听主机

2378   │ 2019-06-18 14:25:20,738 INFO [main] org.apache.nifi.web.server.JettyServer NiFi has started. The UI is available at the following URLs:
2379   │ 2019-06-18 14:25:20,738 INFO [main] org.apache.nifi.web.server.JettyServer https://node1.nifi:9441/nifi
2381   │ 2019-06-18 14:25:20,740 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap
2382   │ 2019-06-18 14:25:20,740 INFO [main] org.apache.nifi.NiFi Controller initialization took 93674324706 nanoseconds (93 seconds).

非常感谢你。我解决了我的问题。我设置了nifi.web.http.host=“ip地址”。非常感谢。我更改了我的主机文件。
2378   │ 2019-06-18 14:25:20,738 INFO [main] org.apache.nifi.web.server.JettyServer NiFi has started. The UI is available at the following URLs:
2379   │ 2019-06-18 14:25:20,738 INFO [main] org.apache.nifi.web.server.JettyServer https://node1.nifi:9441/nifi
2381   │ 2019-06-18 14:25:20,740 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap
2382   │ 2019-06-18 14:25:20,740 INFO [main] org.apache.nifi.NiFi Controller initialization took 93674324706 nanoseconds (93 seconds).