[ https://issues.apache.org/jira/browse/NIFI-3972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16023606#comment-16023606 ]
ASF GitHub Bot commented on NIFI-3972: -------------------------------------- GitHub user markap14 opened a pull request: https://github.com/apache/nifi/pull/1855 NIFI-3972: Ensure that we wait until service state becomes enabled be… …fore triggering completable future that says that it's enabled 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/markap14/nifi NIFI-3972 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/1855.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 #1855 ---- commit 27ca0d809e3105993396d80b7efb5268f68a263d Author: Mark Payne <marka...@hotmail.com> Date: 2017-05-24T20:15:18Z NIFI-3972: Ensure that we wait until service state becomes enabled before triggering completable future that says that it's enabled ---- > Controller Service failing to enabled because the service it depends on is > not fully enabled on nifi restart > ------------------------------------------------------------------------------------------------------------ > > Key: NIFI-3972 > URL: https://issues.apache.org/jira/browse/NIFI-3972 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Reporter: Mark Payne > Assignee: Mark Payne > > I have a JsonRecordSetWriter controller service. It depends on a Schema > Registry controller service. Both are enabled. Upon restart, the > JsonRecordSetWriter service fails to enable, indicating that the Schema > Registry service is not enabled. When I look at the Controller Service > configuration, though, the Schema Registry service is enabled. So it appears > that the JsonRecordSetWriter was attempting to be enabled before the Schema > Registry Service finishes enabling. > {code} > 2017-05-24 19:46:56,314 ERROR [main] > o.a.n.c.s.StandardControllerServiceProvider Failed to enable > JsonRecordSetWriter[id=0d273e88-9bd7-1dd9-ffff-ffffc1e1a536] > java.lang.IllegalStateException: Cannot invoke method public abstract > java.util.Set > org.apache.nifi.schemaregistry.services.SchemaRegistry.getSuppliedSchemaFields() > on Controller Service with identifier 0660348b-255e-1f3a-ffff-fffffb399783 > because the Controller Service is disabled > at > org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:84) > at com.sun.proxy.$Proxy85.getSuppliedSchemaFields(Unknown Source) > at > org.apache.nifi.schema.access.SchemaNamePropertyStrategy.<init>(SchemaNamePropertyStrategy.java:42) > at > org.apache.nifi.schema.access.SchemaAccessUtils.getSchemaAccessStrategy(SchemaAccessUtils.java:147) > at > org.apache.nifi.serialization.SchemaRegistryService.getSchemaAccessStrategy(SchemaRegistryService.java:149) > at > org.apache.nifi.serialization.SchemaRegistryService.getSuppliedSchemaFields(SchemaRegistryService.java:128) > at > org.apache.nifi.serialization.SchemaRegistryRecordSetWriter.customValidate(SchemaRegistryRecordSetWriter.java:160) > at > org.apache.nifi.components.AbstractConfigurableComponent.validate(AbstractConfigurableComponent.java:126) > at > org.apache.nifi.controller.AbstractConfiguredComponent.validate(AbstractConfiguredComponent.java:326) > at > org.apache.nifi.controller.AbstractConfiguredComponent.isValid(AbstractConfiguredComponent.java:441) > at > org.apache.nifi.controller.service.StandardControllerServiceNode.verifyCanEnable(StandardControllerServiceNode.java:301) > at > org.apache.nifi.controller.service.StandardControllerServiceProvider.enableControllerService(StandardControllerServiceProvider.java:327) > at > org.apache.nifi.controller.service.StandardControllerServiceProvider.enableControllerServiceDependenciesFirst(StandardControllerServiceProvider.java:384) > at > org.apache.nifi.controller.service.StandardControllerServiceProvider.enableControllerServices(StandardControllerServiceProvider.java:350) > at > org.apache.nifi.controller.FlowController.enableControllerServices(FlowController.java:3271) > at > org.apache.nifi.controller.service.ControllerServiceLoader.enableControllerServices(ControllerServiceLoader.java:159) > at > org.apache.nifi.controller.service.ControllerServiceLoader.enableControllerServices(ControllerServiceLoader.java:152) > at > org.apache.nifi.controller.StandardFlowSynchronizer.addProcessGroup(StandardFlowSynchronizer.java:1042) > at > org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:312) > at > org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1554) > at > org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:84) > at > org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:722) > at > org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:452) > at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:800) > at org.apache.nifi.NiFi.<init>(NiFi.java:160) > at org.apache.nifi.NiFi.main(NiFi.java:267) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)