nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (NIFI-3294) NiFi will ignore nifi-env properties when running as another user
Date Wed, 15 Feb 2017 02:41:41 GMT


ASF GitHub Bot commented on NIFI-3294:

Github user ijokarumawak commented on the issue:
    I was testing this PR using Amazon Linux.
    Checking if I can refer ${NIFI_HOME} environmental value via Attribute Expression Language,
before and after applying the patch. I set = 'nifi', and execute `bin/ start`
by root user.
    # conf/bootstrap.conf
    NiFi flow is simple as: `GenerateFlowFile` using dynamic attribute as `nifi.home` = `${NIFI_HOME}`,
also I added `lang` = `${LANG}` to make sure that it can refer OS env values via VariableRegistry.
    ## Result: Without this PR
    nifi.home=(Empty string)
    NIFI_HOME was not retrieved as expected.
    ## Result: With this PR
    Although NIFI_HOME was retrieved, the value was not the expected one. It should be `/mnt/nifi-1.2.0-SNAPSHOT`
but it was just `/mnt`.
    I also found that without `` property, doesn't work with this PR. It seems
Command argument is not passed properly to RunNiFi:
    [root@ip-172-31-20-144 nifi-1.2.0-SNAPSHOT-root]# ./bin/ status
    Java home: /usr/lib/jvm/jre
    NiFi home: /mnt/nifi-1.2.0-SNAPSHOT-root
    Bootstrap Config File: /mnt/nifi-1.2.0-SNAPSHOT-root/conf/bootstrap.conf
    java org.apache.nifi.bootstrap.RunNiFi [<-verbose>] <command> [options]
    Valid commands include: ...
    I will keep investigating what's going on but would like to share current status. Please
let me know if you noticed something.

> NiFi will ignore nifi-env properties when running as another user
> -----------------------------------------------------------------
>                 Key: NIFI-3294
>                 URL:
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.0.0, 0.7.0, 0.7.1, 1.1.1, 1.0.1
>         Environment: All non-Windows, non-Cygwin OSes
>            Reporter: Aldrin Piri
>            Assignee: Aldrin Piri
>             Fix For: 0.8.0, 1.2.0
> nifi-env is a script that allows setting of certain properties external to the core run
scripts.  However, when sudo is used, the resulting subshell/child process is a separate environment
that does not have the needed information that was established in nifi-env.  This needs to
be incorporated into the run command such that those properties are preserved.

This message was sent by Atlassian JIRA

View raw message