[ 
https://issues.apache.org/jira/browse/NIFI-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875469#comment-15875469
 ] 

ASF GitHub Bot commented on NIFI-3505:
--------------------------------------

Github user ijokarumawak commented on the issue:

    https://github.com/apache/nifi/pull/1523
  
    I tested this PR on Ubuntu to confirm below:
    1. 'exec' works as NIFI-2689 expected.
    2. Don't break NIFI-3294, nifi-env.sh being used properly with 'run.as' 
configuration.
    3. 'restart' and other execution mode works properly.
    
    To demonstrate how 'exec' changes process tree, I run `nifi.sh run` 
with/without `exec` command in nifi.sh:
    
    ```bash
    # Without exec
    2934 pts/0    Ss     0:00  |       \_ -bash (login as 'ubuntu' user and use 
sudo to run the shell as root)
    8424 pts/0    S+     0:00  |           \_ sudo 
/opt/nifi-1.2.0-SNAPSHOT/bin/nifi.sh run
    8425 pts/0    S+     0:00  |               \_ /bin/sh 
/opt/nifi-1.2.0-SNAPSHOT/bin/nifi.sh run
    8439 pts/0    Sl+    0:00  |                   \_ /usr/bin/java -cp 
/opt/nifi-1.2.0-SNAPSHOT/conf:/opt/nifi-1.2.0-SNAPS
    8452 pts/0    Sl+    0:09  |                       \_ java -classpath 
/opt/nifi-1.2.0-SNAPSHOT/./conf:/opt/nifi-1.2.0-S
    
    # With exec
    2934 pts/0    Ss     0:00  |       \_ -bash
    8306 pts/0    S+     0:00  |           \_ sudo 
/opt/nifi-1.2.0-SNAPSHOT/bin/nifi.sh run
    8307 pts/0    Sl+    0:00  |               \_ /usr/bin/java -cp 
/opt/nifi-1.2.0-SNAPSHOT/conf:/opt/nifi-1.2.0-SNAPSHOT/
    8333 pts/0    Sl+    0:12  |                   \_ java -classpath 
/opt/nifi-1.2.0-SNAPSHOT/./conf:/opt/nifi-1.2.0-SNAPS
    ```
    
    ```bash
    # Without execk
    2934 pts/0    Ss     0:00  |       \_ -bash
    7799 pts/0    S+     0:00  |           \_ sudo 
/opt/nifi-1.2.0-SNAPSHOT/bin/nifi.sh run
    7800 pts/0    S+     0:00  |               \_ /bin/sh 
/opt/nifi-1.2.0-SNAPSHOT/bin/nifi.sh run
    7815 pts/0    S+     0:00  |                   \_ sudo -u nifi sh -c 
SCRIPT_DIR='/opt/nifi-1.2.0-SNAPSHOT/bin' && . '/o
    7816 pts/0    S+     0:00  |                       \_ sh -c 
SCRIPT_DIR='/opt/nifi-1.2.0-SNAPSHOT/bin' && . '/opt/nifi-1
    7818 pts/0    Sl+    0:00  |                           \_ /usr/bin/java -cp 
/opt/nifi-1.2.0-SNAPSHOT/conf:/opt/nifi-1.2
    7831 pts/0    Sl+    0:10  |                               \_ java 
-classpath /opt/nifi-1.2.0-SNAPSHOT/./conf:/opt/nifi
    
    # With exec
    2934 pts/0    Ss     0:00  |       \_ -bash
    7922 pts/0    S+     0:00  |           \_ sudo 
/opt/nifi-1.2.0-SNAPSHOT/bin/nifi.sh run
    7923 pts/0    S+     0:00  |               \_ sudo -u nifi sh -c 
SCRIPT_DIR='/opt/nifi-1.2.0-SNAPSHOT/bin' && . '/opt/n
    7938 pts/0    S+     0:00  |                   \_ sh -c 
SCRIPT_DIR='/opt/nifi-1.2.0-SNAPSHOT/bin' && . '/opt/nifi-1.2.0
    7940 pts/0    Sl+    0:00  |                       \_ /usr/bin/java -cp 
/opt/nifi-1.2.0-SNAPSHOT/conf:/opt/nifi-1.2.0-S
    7953 pts/0    Sl+    0:04  |                           \_ java -classpath 
/opt/nifi-1.2.0-SNAPSHOT/./conf:/opt/nifi-1.2
    ```


> nifi.sh restart doesn't restart properly
> ----------------------------------------
>
>                 Key: NIFI-3505
>                 URL: https://issues.apache.org/jira/browse/NIFI-3505
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Tools and Build
>    Affects Versions: 1.2.0
>            Reporter: Koji Kawamura
>            Assignee: Koji Kawamura
>
> When I run "nifi.sh restart" using the latest master as of Feb 20, it behaves 
> differently compared to how it used to.
> * If NiFi is not running, "nifi.sh restart" used to start new nifi process, 
> but currently it doesn't.
> * If NiFi is running, "nifi.sh restart" used to shutdown existing nifi 
> process, and start new one. But it just shutdown existing one, and don't 
> start new one.
> It's caused by recent changes to nifi.sh. NIFI-2689 added 'exec' command.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to