pgyori commented on a change in pull request #4748:
URL: https://github.com/apache/nifi/pull/4748#discussion_r568828167
##########
File path: nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
##########
@@ -763,6 +773,27 @@ private void makeRequest(final String request, final
String arguments, final Fil
}
}
+ private void sendRequest(Socket socket, Integer port, String request,
String arguments, Logger logger) throws IOException {
+ logger.debug("Connecting to NiFi instance");
+ socket.setSoTimeout(60000);
+ socket.connect(new InetSocketAddress("localhost", port));
+ logger.debug("Established connection to NiFi instance.");
+ socket.setSoTimeout(60000);
+
+ logger.debug("Sending " + request + " Command to port {}", port);
+ final OutputStream socketOut = socket.getOutputStream();
+
+ final Properties nifiProps = loadProperties(logger);
+ final String secretKey = nifiProps.getProperty("secret.key");
Review comment:
No. Each running NiFi instance has 1 secret key. We should not rely on
the instance variable, as the bootstrap process can (and in this wait-for-init
feature it IS) started over and over again 'independently' from the running
NiFi instance, so the value of the secret key needs to be loaded from the
property file.
----------------------------------------------------------------
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]