[ 
https://issues.apache.org/jira/browse/NIFI-15520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann updated NIFI-15520:
------------------------------------
    Issue Type: Task  (was: Bug)

> NiFi 2.x Ignores NIFI_PID_DIR and Does Not Create a PID File
> ------------------------------------------------------------
>
>                 Key: NIFI-15520
>                 URL: https://issues.apache.org/jira/browse/NIFI-15520
>             Project: Apache NiFi
>          Issue Type: Task
>          Components: Configuration
>    Affects Versions: 2.7.2
>         Environment:     Apache NiFi Version: 2.7.0 and 2.5.0
>     Operating System: Oracle Linux Server 9.6
>     Java Version: jdk-24.0.2-oracle-x64
>     Node Role: cluster and standalone
>            Reporter: Dirk Hennig
>            Priority: Major
>              Labels: pidfile
>
> h3. Description:
> Starting with NiFi 2.x, it appears that the application no longer creates a 
> PID file, even when the {{NIFI_PID_DIR}} environment variable is correctly 
> configured, and the designated location is writable. This behavior differs 
> from earlier versions of NiFi (1.x series), where the PID file creation was 
> consistent and reliable.
> This issue affects process management and deployment automation, as external 
> tools and service managers rely on the PID file for monitoring and 
> controlling the NiFi process. Several users have reported this issue in 
> discussion forums and community threads, but it is not clear whether this is 
> a deliberate change, a regression, or a bug.
> The pid file is not created with default value for NIFI_PID_DIR or when set 
> fixed.
> h3. Steps to Reproduce:
>  # Set the {{NIFI_PID_DIR}} variable in the NiFi startup scripts or via the 
> environment.
>  # Ensure the configured location is writable and has the necessary 
> permissions.
>  # Start NiFi using the usual commands (e.g., {{nifi.sh start}} or 
> {{{}./bin/nifi start{}}}).
>  # Check the specified {{NIFI_PID_DIR}} for the presence of the PID file.
> h3. Actual Result:
> No PID file is created in the {{{}NIFI_PID_DIR{}}}, despite the correct 
> configuration and writable location.
> h3. Expected Result:
> A PID file is created in the configured {{{}NIFI_PID_DIR{}}}, as was the 
> behavior in previous versions of NiFi (1.x). Example: $NIFI_HOME/run/nifi.pid
> h3. Impact:
> The absence of the PID file affects:
>  * Process management and control for service monitoring tools.
>  * Automation scripts relying on the PID file for detecting the NiFi instance.
>  * Service managers like {{{}systemd{}}}, which may rely on the PID file for 
> lifecycle management when not explicitly configured otherwise.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to