Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.apache.nifi.registry.flow.FlowRegistryClientNode;
import org.apache.nifi.registry.flow.mapping.VersionedComponentStateLookup;
import org.apache.nifi.reporting.BulletinRepository;
import org.apache.nifi.reporting.ComponentType;
import org.apache.nifi.reporting.Severity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -281,13 +282,12 @@ public void enableControllerServices(final Collection<ControllerServiceNode> ser

future.get(30, TimeUnit.SECONDS);
logger.debug("{} enabled with state [{}]", controllerServiceNode, controllerServiceNode.getState());
} catch (final ControllerServiceNotValidException e) {
logger.warn("Failed to enable service {} because it is not currently valid", controllerServiceNode);
} catch (Exception e) {
logger.error("Failed to enable {}", controllerServiceNode, e);
if (this.bulletinRepo != null) {
this.bulletinRepo.addBulletin(BulletinFactory.createBulletin("Controller Service",
Severity.ERROR.name(), "Could not start " + controllerServiceNode + " due to " + e));
this.bulletinRepo.addBulletin(BulletinFactory.createBulletin(controllerServiceNode.getProcessGroupIdentifier(),
controllerServiceNode.getIdentifier(), ComponentType.CONTROLLER_SERVICE, controllerServiceNode.getName(),
"Controller Service", Severity.ERROR.name(), "Could not start " + controllerServiceNode + " due to " + e));
}
}
}
Expand Down Expand Up @@ -369,8 +369,9 @@ private void enableControllerServices(final Collection<ControllerServiceNode> se
}

if (this.bulletinRepo != null) {
this.bulletinRepo.addBulletin(BulletinFactory.createBulletin("Controller Service",
Severity.ERROR.name(), "Could not enable " + controllerServiceNode + " due to " + e));
this.bulletinRepo.addBulletin(BulletinFactory.createBulletin(controllerServiceNode.getProcessGroupIdentifier(),
controllerServiceNode.getIdentifier(), ComponentType.CONTROLLER_SERVICE, controllerServiceNode.getName(),
"Controller Service", Severity.ERROR.name(), "Could not enable " + controllerServiceNode + " due to " + e));
}

break;
Expand All @@ -379,8 +380,9 @@ private void enableControllerServices(final Collection<ControllerServiceNode> se
} catch (Exception e) {
logger.error("Failed to enable {}", controllerServiceNode, e);
if (this.bulletinRepo != null) {
this.bulletinRepo.addBulletin(BulletinFactory.createBulletin("Controller Service",
Severity.ERROR.name(), "Could not start " + controllerServiceNode + " due to " + e));
this.bulletinRepo.addBulletin(BulletinFactory.createBulletin(controllerServiceNode.getProcessGroupIdentifier(),
controllerServiceNode.getIdentifier(), ComponentType.CONTROLLER_SERVICE, controllerServiceNode.getName(),
"Controller Service", Severity.ERROR.name(), "Could not start " + controllerServiceNode + " due to " + e));
}
}
}
Expand Down
Loading