nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jtstorck <...@git.apache.org>
Subject [GitHub] nifi pull request #1508: NIFI-3355 Allows NiFi to bind to specific network i...
Date Tue, 14 Feb 2017 21:30:02 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message