Github user jtstorck commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1508#discussion_r101147915
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
---
@@ -569,17 +572,43 @@ private void configureConnectors(final Server server)
throws ServerConfiguration
logger.info("Configuring Jetty for HTTP on port: " + port);
- // create the connector
- final ServerConnector http = new ServerConnector(server, new
HttpConnectionFactory(httpConfiguration));
+ final List<Connector> serverConnectors = Lists.newArrayList();
- // set host and port
- if
(StringUtils.isNotBlank(props.getProperty(NiFiProperties.WEB_HTTP_HOST))) {
-
http.setHost(props.getProperty(NiFiProperties.WEB_HTTP_HOST));
+ final Map<String, String> httpNetworkInterfaces =
props.getHttpNetworkInterfaces();
+ if (httpNetworkInterfaces.isEmpty()) {
--- End diff --
This needs to be expanded to check that the map is empty, or that there are
no actual values for any of the keys in the map. As it stands, if the
properties for binding to a NIC are absent from the config, this code works...
But if a property exists but is left blank, this if block would get skipped,
it'd go into the else block, and end up not creating any connectors.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---