[
https://issues.apache.org/jira/browse/NIFI-4111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16069066#comment-16069066
]
ASF GitHub Bot commented on NIFI-4111:
--------------------------------------
GitHub user pvillard31 opened a pull request:
https://github.com/apache/nifi/pull/1963
NIFI-4111 - NiFi shutdown
Fixed threads shutdown so that NiFi can shutdown gracefully
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number
you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target
branch (typically master)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] Have you ensured that the full suite of tests is executed via mvn
-Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to
.name (programmatic access) for each of the new properties?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in
which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check travis-ci for build
issues and submit an update to your PR as soon as possible.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pvillard31/nifi NIFI-4111
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/1963.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1963
----
commit 67ba3f5d9889120f223812fb4eb533d4a4214f46
Author: Pierre Villard <[email protected]>
Date: 2017-06-29T22:03:53Z
NIFI-4111 - NiFi shutdown
Fixed threads shutdown so that NiFi can shutdown gracefully
----
> NiFi does not shutdown gracefully
> ---------------------------------
>
> Key: NIFI-4111
> URL: https://issues.apache.org/jira/browse/NIFI-4111
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.3.0
> Reporter: Pierre Villard
> Priority: Minor
>
> I don't know exactly for how long we have this issue but NiFi is not able to
> shutdown gracefully anymore (standalone and cluster setups). It happens even
> if no processor/CS/RT is running in the instance:
> {noformat}
> 2017-06-22 23:47:40,448 INFO [main] org.apache.nifi.bootstrap.Command Apache
> NiFi has accepted the Shutdown Command and is shutting down now
> 2017-06-22 23:47:40,527 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:42,540 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:44,553 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:46,569 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:48,585 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:50,601 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:52,614 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:54,626 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:56,640 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:47:58,655 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:48:00,672 INFO [main] org.apache.nifi.bootstrap.Command Waiting
> for Apache NiFi to finish shutting down...
> 2017-06-22 23:48:00,681 WARN [main] org.apache.nifi.bootstrap.Command NiFi
> has not finished shutting down after 20 seconds. Killing process.
> 2017-06-22 23:48:00,714 INFO [main] org.apache.nifi.bootstrap.Command NiFi
> has finished shutting down.
> {noformat}
> Thanks to [~markap14], the problem seems to be with shutting down the
> following thread:
> {noformat}
> 2017-06-21 16:23:35,159 INFO [NiFi logging handler] org.apache.nifi.StdOut
> "Site-to-Site Worker Thread-1" #87 prio=5 os_prio=31 tid=0x00007f9ec968c000
> nid=0xeb03 waiting on condition [0x0000000137b4e000]
> 2017-06-21 16:23:35,159 INFO [NiFi logging handler] org.apache.nifi.StdOut
> java.lang.Thread.State: TIMED_WAITING (sleeping)
> 2017-06-21 16:23:35,159 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.lang.Thread.sleep(Native Method)
> 2017-06-21 16:23:35,159 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.lang.Thread.sleep(Thread.java:340)
> 2017-06-21 16:23:35,159 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.util.concurrent.TimeUnit.sleep(TimeUnit.java:386)
> 2017-06-21 16:23:35,159 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at
> org.apache.nifi.remote.io.socket.SocketChannelInputStream.read(SocketChannelInputStream.java:120)
> 2017-06-21 16:23:35,159 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at
> org.apache.nifi.stream.io.ByteCountingInputStream.read(ByteCountingInputStream.java:51)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> - locked <0x00000007be373b78> (a
> org.apache.nifi.stream.io.BufferedInputStream)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at
> org.apache.nifi.remote.io.InterruptableInputStream.read(InterruptableInputStream.java:39)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:337)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.io.DataInputStream.readUTF(DataInputStream.java:589)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.io.DataInputStream.readUTF(DataInputStream.java:564)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at
> org.apache.nifi.remote.protocol.RequestType.readRequestType(RequestType.java:36)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at
> org.apache.nifi.remote.protocol.socket.SocketFlowFileServerProtocol.getRequestType(SocketFlowFileServerProtocol.java:147)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at
> org.apache.nifi.remote.SocketRemoteSiteListener$1$1.run(SocketRemoteSiteListener.java:249)
> 2017-06-21 16:23:35,160 INFO [NiFi logging handler] org.apache.nifi.StdOut
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)