[ 
https://issues.apache.org/jira/browse/NIFI-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362661#comment-15362661
 ] 

Brandon DeVries edited comment on NIFI-2160 at 7/5/16 4:25 PM:
---------------------------------------------------------------

[~ozhurakousky], while we do have a number of controller services that follow 
that (anti-)pattern (and that I am in the process of fixing), the controller 
service I'm observing the issue with is not one of them.  However, *it does 
depend on 2 other controller services*.  Looking at the log, I see the message 
"Created Controller Service of type {} with identifier {}" \[1\] first for the 
CS in question, then it's two dependencies.  Following that, I see the message 
"Failed to enable " + controllerServiceNode + " due to " +e\[2\].  The "e" in 
this case is an IllegalStateException(implementation + " cannot be enabled 
because it is not valid: " + getValidationErrors()); \[3\], with the validation 
errors indicating that the two services it depends on are disabled.  Those two 
dependencies do, however, come up enabled themselves.  So the issue appears to 
be at least partially one of ordering, possibly related to the how the sorting 
is being done \[4\].  Let me know if that's enough for you to work with, or if 
there's any other information I can try to get for you.  Thanks.


\[1\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L187

\[2\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L400

\[3\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java#L269

\[4\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L389


was (Author: devriesb):
[~ozhurakousky], while we do have a number of controller services that follow 
that (anti-)pattern (and that I am in the process of fixing), the controller 
service I'm observing the issue with is not one of them.  However, it does 
depend on 2 other controller services.  Looking at the log, I see the message 
"Created Controller Service of type {} with identifier {}" \[1\] first for the 
CS in question, then it's two dependencies.  Following that, I see the message 
"Failed to enable " + controllerServiceNode + " due to " +e\[2\].  The "e" in 
this case is an IllegalStateException(implementation + " cannot be enabled 
because it is not valid: " + getValidationErrors()); \[3\], with the validation 
errors indicating that the two services it depends on are disabled.  Those two 
dependencies do, however, come up enabled themselves.  So the issue appears to 
be at least partially one of ordering, possibly related to the how the sorting 
is being done \[4\].  Let me know if that's enough for you to work with, or if 
there's any other information I can try to get for you.  Thanks.


\[1\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L187

\[2\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L400

\[3\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java#L269

\[4\] 
https://github.com/apache/nifi/blob/d64fe416be6627682c7458ded71ba2ea6e05a899/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L389

> Enabled ControllerServices disabled on restart
> ----------------------------------------------
>
>                 Key: NIFI-2160
>                 URL: https://issues.apache.org/jira/browse/NIFI-2160
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Brandon DeVries
>            Assignee: Oleg Zhurakousky
>            Priority: Critical
>             Fix For: 1.0.0, 0.7.0
>
>
> As a result of the fix for NIFI-2032, *previously enabled ControllerServices 
> become disabled after a restart* if they are not referenced by another 
> component.  However, we use a custom domain specific langauge that can 
> reference a controller service from a query defined as a custom processor's 
> property.  This means that we use a number of controller service that are 
> only used in this way (i.e. are never directly referred to by another 
> component).  Upon restart, these are now disabled causing issues with our 
> flows.
> I have not yet stepped through the new enableControllerServices() \[1\] 
> method to figure out exactly where the issue is coming from, but I wanted to 
> get the ticket out there and on the radar, as this breaks backwards 
> compatibility on a feature we heavily rely on.
> \[1\] 
> https://github.com/apache/nifi/blob/0.x/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L301-336



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to