You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Erik Anderson (JIRA)" <ji...@apache.org> on 2019/02/08 22:15:00 UTC

[jira] [Created] (NIFI-6013) NiFi Docker Environment Variable for enabling debugging of NiFi inside a Docker container

Erik Anderson created NIFI-6013:
-----------------------------------

             Summary: NiFi Docker Environment Variable for enabling debugging of NiFi inside a Docker container
                 Key: NIFI-6013
                 URL: https://issues.apache.org/jira/browse/NIFI-6013
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Docker
            Reporter: Erik Anderson


I have a slight improvement to Environment variables that the NiFI docker system uses to bootstrap its nifi.properties files

There are times, when learning NiFi, that I want to stop and start NiFi with debugging on. If NiFi was running inside a Docker container it was hard.

What I did was I created a new environment variable within the NiFi bootstrapping system it uses to start itself up inside a docker container. I have documented all NiFI environment variables here.

[https://github.com/dprophet/nifi/blob/master/nifi-docker/dockerhub/CONFIGURATION.md]

I just pushed some code for review
https://github.com/dprophet/nifi/commit/ea31ac6bd8f00944166e3e230af2040636c0505c

What I did was introduce a new environment variable

NIFI_DEBUG

And in file
https://github.com/apache/nifi/blob/master/nifi-docker/dockerhub/sh/start.sh

I added

if [[ -n $NIFI_DEBUG ]] ; then
 . "${scripts_dir}/update_logback.sh"
fi

Basically what it does, if the NIFI_DEBUG is set
Example:

NIFI_DEBUG="org.apache.nifi.web.security=TRACE,org.apache.nifi.authorization=DEBUG,org.apache.nifi.web.api.config=TRACE"

It updates the 
${NIFI_HOME}/conf/logback.xml

File to enable the debugging modes of NiFi

This is a very fast mechanism to restart NiFi with debugging turned on. Very developer and workflow friendly.

If of interest I will give a pull request.

What about the documentation I created?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)