Skip to content

NIFI-4187 Resolved issue where restart failed due to missing sensitiv…#2073

Closed
alopresto wants to merge 1 commit intoapache:masterfrom
alopresto:NIFI-4187
Closed

NIFI-4187 Resolved issue where restart failed due to missing sensitiv…#2073
alopresto wants to merge 1 commit intoapache:masterfrom
alopresto:NIFI-4187

Conversation

@alopresto
Copy link
Copy Markdown
Contributor

…e key file.

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@alopresto
Copy link
Copy Markdown
Contributor Author

alopresto commented Aug 10, 2017

To verify this fix:

  1. modify the conf/bootstrap.conf file to provide a master encryption key (it doesn't matter if any conf/nifi.properties values are encrypted with it, the mere presence will trigger the relevant code)
  2. Start NiFi as normal (i.e. $ ./bin/nifi.sh start)
  3. Verify that NiFi starts (UI, nifi-bootstrap.log, nifi-app.log, etc.)
  4. Identify the NiFi process (not the bootstrap process) and kill it (imitating an OOME or external process killing NiFi)
    1. ps -ef | grep nifi to get the PID
    2. kill -9 <pid>
  5. Verify that NiFi successfully restarts

The logs/nifi-bootstrap.log will look like this:

2017-08-10 16:08:49,675 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: []
2017-08-10 16:08:49,679 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED
2017-08-10 16:08:49,679 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED
2017-08-10 16:08:49,679 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED
2017-08-10 16:08:49,736 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2017-08-10 16:08:49,736 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: /Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT
2017-08-10 16:08:49,736 INFO [main] org.apache.nifi.bootstrap.Command Command: /Users/alopresto/.jenv/versions/1.8/bin/java -classpath /Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./conf:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/javax.servlet-api-3.1.0.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/jcl-over-slf4j-1.7.25.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/jetty-schemas-3.1.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/jul-to-slf4j-1.7.25.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/log4j-over-slf4j-1.7.25.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/logback-classic-1.2.3.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/logback-core-1.2.3.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/nifi-api-1.4.0-SNAPSHOT.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/nifi-framework-api-1.4.0-SNAPSHOT.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/nifi-nar-utils-1.4.0-SNAPSHOT.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/nifi-properties-1.4.0-SNAPSHOT.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/nifi-runtime-1.4.0-SNAPSHOT.jar:/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./lib/slf4j-api-1.7.25.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Djava.security.egd=file:/dev/urandom -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -XX:+UseG1GC -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./conf/nifi.properties -Dnifi.bootstrap.listen.port=52192 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=/Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/logs org.apache.nifi.NiFi -K /Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.4.0-SNAPSHOT-bin/nifi-1.4.0-SNAPSHOT/./conf/sensitive.key
2017-08-10 16:08:49,749 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 90937
2017-08-10 16:08:50,294 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 52193
-------------External command kills NiFi process-------------
2017-08-10 16:11:13,185 WARN [main] org.apache.nifi.bootstrap.RunNiFi Apache NiFi appears to have died. Restarting...
2017-08-10 16:11:13,195 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 91211
2017-08-10 16:11:13,196 INFO [main] org.apache.nifi.bootstrap.RunNiFi Successfully started Apache NiFi with PID 91211
2017-08-10 16:11:13,729 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 52216

Copy link
Copy Markdown
Contributor

@pvillard31 pvillard31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through the verification process suggested in the comment before and after applying the change. Confirmed it's working as expected. Run contrib-check. All good, merging to master, thanks @alopresto

@asfgit asfgit closed this in 760fd75 Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants