Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to gracefully stop nifi docker container running 2 nifi.sh run processes ??

How to gracefully stop nifi docker container running 2 nifi.sh run processes ??

We are running nifi inside docker container.

When we check nifi processes under container, we get following 2 process running

gaurav.goyal$ docker exec -it blissful_banach bash 
bash-4.2$ ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD                 
nifi         1     0  0 19:26 ?        00:00:00 /bin/sh bin/nifi.sh run                 
nifi        17     1  0 19:26 ?        00:00:00 /bin/sh bin/nifi.sh run 
Now, When we run docker nifi stop, it will send kill to PID 1, but it does not stop PID 17. 
Thats why we do not get exit status code 0..
Infact we get code 137.

May we know how can we cleanly stop nifi data container including bg and fg processes?
2 REPLIES 2
Highlighted

Re: How to gracefully stop nifi docker container running 2 nifi.sh run processes ??

15-096-Goyal:exanova-templates gaurav.goyal$ docker exec -it blissful_banach bash
bash-4.2$ ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
nifi         1     0  0 19:26 ?        00:00:00 /bin/sh bin/nifi.sh run
nifi        17     1  0 19:26 ?        00:00:00 /bin/sh bin/nifi.sh run


$ docker events --filter "image=ship.cenx.com:5000/nifi" --format 'Action={{.Action}} Status={{.Status}}  Actor={{.Actor}}'
Action=start Status=start  Actor={4e6181e79f75111909b9b172c451574accab0002fc84cf3f1e30fa3b0946823e map[image:ship.cenx.com:5000/nifi:1.1.1-8 name:nifi1 snapshot-datetime:1.1.1-8-SNAPSHOT-20170504.100555 MAINTAINER:CENX built-by:jenkins-Docker-nifi (integration)-75 built-on:http://172.32.1.154:8080/]}
Action=kill Status=kill  Actor={4e6181e79f75111909b9b172c451574accab0002fc84cf3f1e30fa3b0946823e map[MAINTAINER:CENX built-by:jenkins-Docker-nifi (integration)-75 built-on:http://172.32.1.154:8080/ image:ship.cenx.com:5000/nifi:1.1.1-8 name:nifi1 signal:15 snapshot-datetime:1.1.1-8-SNAPSHOT-20170504.100555]}
Action=kill Status=kill  Actor={4e6181e79f75111909b9b172c451574accab0002fc84cf3f1e30fa3b0946823e map[name:nifi1 signal:9 snapshot-datetime:1.1.1-8-SNAPSHOT-20170504.100555 MAINTAINER:CENX built-by:jenkins-Docker-nifi (integration)-75 built-on:http://172.32.1.154:8080/ image:ship.cenx.com:5000/nifi:1.1.1-8]}
Action=die Status=die  Actor={4e6181e79f75111909b9b172c451574accab0002fc84cf3f1e30fa3b0946823e map[snapshot-datetime:1.1.1-8-SNAPSHOT-20170504.100555 MAINTAINER:CENX built-by:jenkins-Docker-nifi (integration)-75 built-on:http://172.32.1.154:8080/ exitCode:137 image:ship.cenx.com:5000/nifi:1.1.1-8 name:nifi1]}
Action=stop Status=stop  Actor={4e6181e79f75111909b9b172c451574accab0002fc84cf3f1e30fa3b0946823e map[MAINTAINER:CENX built-by:jenkins-Docker-nifi (integration)-75 built-on:http://172.32.1.154:8080/ image:ship.cenx.com:5000/nifi:1.1.1-8 name:nifi1 snapshot-datetime:1.1.1-8-SNAPSHOT-20170504.100555]}
Highlighted

Re: How to gracefully stop nifi docker container running 2 nifi.sh run processes ??

Dear Experts,

your review and suggestion please?

Thanks in advance!!!!

Don't have an account?
Coming from Hortonworks? Activate your account here