You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Zhiyi Ni (Jira)" <ji...@apache.org> on 2023/08/08 07:24:00 UTC

[jira] [Updated] (NIFI-11919) "SocketException: Connection reset" occurs when a processor hasn't been used for a long time and is then specified as RUN_ONCE

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

Zhiyi Ni updated NIFI-11919:
----------------------------
    Description: 
The GetMongo processor is in the STOP state. I expect to manually notify the processor to run-once after processing some custom operations by calling the REST API.

But when I call the following API or manually specify the processor on the WEB UI to execute once, it will have the following error.
{code:java}
PUT https://<nifi-host>:<nifi-port>/nifi-api/processors/{id}/run-status
with body:
{
    "revision": {
	    "version": 15
	},
    "state": "RUN_ONCE",
    "disconnectedNodeAcknowledged": true
} {code}


{panel:title=The bulletin displayed on the processor}
17:34:44 CST - nifi01:9443 -  ERROR 
GetMongo[id=80fe390e-65f3-1697-ba11-5d61e3a6692e] Processing halted: yielding [1 sec]: com.mongodb.MongoSocketWriteException: Exception sending message
\- Caused by: java.net.SocketException: Connection reset
However, when the run-status is specified again through the REST API or WEB UI, it can be executed normally again.
{panel}


 

It seems that the NiFi service is trying to use an old connection (causing a high probability of connection failure, and then an error occurs). However, is it more reasonable to *automatically re-establish the connection* between the two when I specify to start execution?

*It should detect that the client/connection is stale and re-establish it automatically.*

  was:
The GetMongo processor is in the STOP state. I expect to manually notify the processor to run-once after processing some custom operations by calling the REST API.

But when I call the following API or manually specify the processor on the WEB UI to execute once, it will have the following error.
{code:java}
PUT https://<nifi-host>:<nifi-port>/nifi-api/processors/{id}/run-status
with body:
{
    "revision": {
	    "version": 15
	},
    "state": "RUN_ONCE",
    "disconnectedNodeAcknowledged": true
} {code}


{panel:title=The bulletin displayed on the processor}
17:34:44 CST - nifi01:9443 -  ERROR 
GetMongo[id=80fe390e-65f3-1697-ba11-5d61e3a6692e] Processing halted: yielding [1 sec]: com.mongodb.MongoSocketWriteException: Exception sending message
- Caused by: java.net.SocketException: Connection reset
However, when the run-status is specified again through the REST API or WEB UI, it can be executed normally again.
{panel}


 

It seems that the NiFi service is trying to use an old connection (causing a high probability of connection failure, and then an error occurs). However, is it more reasonable to *automatically re-establish the connection* between the two when I specify to start execution?

*It should detect that the client/connection is stale and re-establish it automatically.*


> "SocketException: Connection reset" occurs when a processor hasn't been used for a long time and is then specified as RUN_ONCE
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-11919
>                 URL: https://issues.apache.org/jira/browse/NIFI-11919
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Zhiyi Ni
>            Priority: Major
>
> The GetMongo processor is in the STOP state. I expect to manually notify the processor to run-once after processing some custom operations by calling the REST API.
> But when I call the following API or manually specify the processor on the WEB UI to execute once, it will have the following error.
> {code:java}
> PUT https://<nifi-host>:<nifi-port>/nifi-api/processors/{id}/run-status
> with body:
> {
>     "revision": {
> 	    "version": 15
> 	},
>     "state": "RUN_ONCE",
>     "disconnectedNodeAcknowledged": true
> } {code}
> {panel:title=The bulletin displayed on the processor}
> 17:34:44 CST - nifi01:9443 -  ERROR 
> GetMongo[id=80fe390e-65f3-1697-ba11-5d61e3a6692e] Processing halted: yielding [1 sec]: com.mongodb.MongoSocketWriteException: Exception sending message
> \- Caused by: java.net.SocketException: Connection reset
> However, when the run-status is specified again through the REST API or WEB UI, it can be executed normally again.
> {panel}
>  
> It seems that the NiFi service is trying to use an old connection (causing a high probability of connection failure, and then an error occurs). However, is it more reasonable to *automatically re-establish the connection* between the two when I specify to start execution?
> *It should detect that the client/connection is stale and re-establish it automatically.*



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