Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-2063

Install Script Relative Path Mismatch from Init Dir

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, 0.7.0
    • 1.0.0, 0.7.0, 1.0.0-Beta
    • Configuration
    • None
    • Linux/Unix with SysVInit

    Description

      Ryan Hendrickson noticed that installing and running NiFi as a service in 0.7.0-SNAPSHOT is not working right. Running commands like the following:

      $ sudo /opt/nifi/nifi-0.7.0-SNAPSHOT/bin/nifi.sh install
      Service nifi installed
      
      $ sudo service nifi start
      /etc/init.d/nifi: line 28: /etc/init.d/nifi-env.sh: No such file or directory
      

      Results in errors loading nifi-env.sh

      Used-To-Be
      As I understand it, nifi.sh install used to:
      1. copy bin/nifi.sh to /etc/init.d/nifi
      2. Run sed to change NIFI_HOME initializations to the path to nifi.sh, where install was invoked
      3. When service nifi start was run, the NIFI_HOME path was hard-coded in the service script file.

      As-Is
      1. nifi.sh now gets NIFI_HOME from bin/nifi-env.sh, which is stored alongside nifi.sh.
      2. install() still calls sed to update NIFI_HOME=, but the initialization is now in nifi-env.sh, so nothing is replaced.
      3. When service nifi start is called, relative path to SCRIPT_DIR/nifi-env.sh resolves to /etc/init.d/nifi-env.sh, which does not exist.

      To-Be
      A possible solution might be to have sed update SCRIPT_DIR to be hard-coded, and change to that directory to run nifi-env.sh.

      Attachments

        Activity

          People

            YolandaMDavis Yolanda M. Davis
            jameswing James Wing
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: