brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-493) Rebind fails when using WinRmCommandSensor
Date Wed, 26 Apr 2017 07:00:15 GMT

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

Aled Sage commented on BROOKLYN-493:
------------------------------------

The fix is simple: add a no-arg constructor to {{org.apache.brooklyn.feed.windows.CmdFeed}}.

We should also add a unit test that rebind works (by using {{RecordingWinRmTool}} so that
it doesn't have to be a live test). Same for {{WindowsPerformanceCounterSensors}}, which doesn't
have a rebind test either (but that one works).

> Rebind fails when using WinRmCommandSensor
> ------------------------------------------
>
>                 Key: BROOKLYN-493
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-493
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>
> With Brooklyn 0.11.0-rc2, I tried deploying the simple blueprint below and then restarting
Brooklyn:
> {noformat}
> location:
>   byon:
>     hosts:
>     - winrm: brooklyn@240.0.0.1:5986
>       osFamily: windows
>       password: pa55w0rd
> services:
> - type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
>   name: machine1
>   brooklyn.config:
>     launch.powershell.command: echo "launching"
>     checkRunning.powershell.command: echo "checking running"
>     
>   brooklyn.initializers:
>   - type: org.apache.brooklyn.core.sensor.windows.WinRmCommandSensor
>     brooklyn.config:
>       name: customCommandSensor
>       period: 10s
>       targetType: String
>       command: echo "myval"
> {noformat}
> However, rebind fails with the exception below:
> {noformat}
> 2017-04-26 07:10:36,326 ERROR 124 o.a.b.l.c.BasicLauncher [FelixStartLevel] Subsystem
for persistence had startup error (continuing with startup): org.apache.brooklyn.util.exceptions.FatalRuntimeException:
Error rebinding to persist
> ed state: Failure rebinding: problem creating FEED dohiyoknx4 of type org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.CmdFeed:
rebind of feed without no-arg constructor unsupported: id=dohiyoknx4; type=class org.
> apache.brooklyn.feed.windows.CmdFeed
> org.apache.brooklyn.util.exceptions.FatalRuntimeException: Error rebinding to persisted
state: Failure rebinding: problem creating FEED dohiyoknx4 of type org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.CmdFeed:

> rebind of feed without no-arg constructor unsupported: id=dohiyoknx4; type=class org.apache.brooklyn.feed.windows.CmdFeed
>         at org.apache.brooklyn.launcher.common.BasicLauncher.startPersistenceWithoutHA(BasicLauncher.java:670)
>         at org.apache.brooklyn.launcher.common.BasicLauncher.startPersistence(BasicLauncher.java:628)
>         at org.apache.brooklyn.launcher.common.BasicLauncher.handlePersistence(BasicLauncher.java:515)
>         at org.apache.brooklyn.launcher.common.BasicLauncher.start(BasicLauncher.java:433)
>         at org.apache.brooklyn.launcher.osgi.OsgiLauncher.start(OsgiLauncher.java:77)
>         at org.apache.brooklyn.launcher.osgi.OsgiLauncher.init(OsgiLauncher.java:101)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_121]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_121]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_121]
>         at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_121]
>         at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:736)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:848)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[17:org.apache.aries.blueprint.core:1.7.1]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.getFactoryObj(BeanRecipe.java:308)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromFactory(BeanRecipe.java:288)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:278)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[17:org.apache.aries.blueprint.core:1.7.1]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[17:org.apache.aries.blueprint.core:1.7.1]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[21:org.apache.aries.util:1.1.1]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[21:org.apache.aries.util:1.1.1]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[21:org.apache.aries.util:1.1.1]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[21:org.apache.aries.util:1.1.1]
>         at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[21:org.apache.aries.util:1.1.1]
>         at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)[org.apache.felix.framework-5.6.1.jar:]
>         at org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730)[org.apache.felix.framework-5.6.1.jar:]
>         at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485)[org.apache.felix.framework-5.6.1.jar:]
>         at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.6.1.jar:]
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)[org.apache.felix.framework-5.6.1.jar:]
>         at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.6.1.jar:]
>         at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.6.1.jar:]
>         at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
> Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Failure rebinding:
problem creating FEED dohiyoknx4 of type org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.CmdFeed:
rebind of feed without no-arg constructor unsupported: id=dohiyoknx4; type=class org.apache.brooklyn.feed.windows.CmdFeed
>         at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:130)
>         at org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl.rebind(RebindManagerImpl.java:515)
>         at org.apache.brooklyn.launcher.common.BasicLauncher.startPersistenceWithoutHA(BasicLauncher.java:666)
>         ... 49 more
> Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
Failure rebinding: problem creating FEED dohiyoknx4 of type org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.CmdFeed:
rebind of feed without no-arg constructor unsupported: id=dohiyoknx4; type=class org.apache.brooklyn.feed.windows.CmdFeed
>         at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_121]
>         at java.util.concurrent.FutureTask.get(FutureTask.java:192)[:1.8.0_121]
>         at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
>         at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:375)
>         at org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl.rebind(RebindManagerImpl.java:513)
>         ... 50 more
> Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Failure rebinding:
problem creating FEED dohiyoknx4 of type org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.CmdFeed:
rebind of feed without no-arg constructor unsupported: id=dohiyoknx4; type=class org.apache.brooklyn.feed.windows.CmdFeed
>         at org.apache.brooklyn.util.exceptions.Exceptions.create(Exceptions.java:467)[141:org.apache.brooklyn.utils-common:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindExceptionHandlerImpl.onDoneImpl(RebindExceptionHandlerImpl.java:498)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindExceptionHandlerImpl.onDone(RebindExceptionHandlerImpl.java:414)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindIteration.run(RebindIteration.java:267)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl.rebindImpl(RebindManagerImpl.java:560)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl$3.call(RebindManagerImpl.java:510)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl$3.call(RebindManagerImpl.java:508)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
>         ... 1 more
> Caused by: java.lang.IllegalStateException: problem creating FEED dohiyoknx4 of type
org.apache.brooklyn.software-winrm:org.apache.brooklyn.feed.windows.CmdFeed
>         at org.apache.brooklyn.core.mgmt.rebind.RebindExceptionHandlerImpl.onCreateFailed(RebindExceptionHandlerImpl.java:265)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindIteration.instantiateAdjuncts(RebindIteration.java:518)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindIteration.doRun(RebindIteration.java:241)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.InitialFullRebindIteration.doRun(InitialFullRebindIteration.java:69)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindIteration.run(RebindIteration.java:265)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         ... 8 more
> Caused by: java.lang.IllegalStateException: rebind of feed without no-arg constructor
unsupported: id=dohiyoknx4; type=class org.apache.brooklyn.feed.windows.CmdFeed
>         at org.apache.brooklyn.core.mgmt.rebind.RebindIteration$BrooklynObjectInstantiator.newFeed(RebindIteration.java:1120)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         at org.apache.brooklyn.core.mgmt.rebind.RebindIteration.instantiateAdjuncts(RebindIteration.java:515)[120:org.apache.brooklyn.core:0.11.0.20170420_1246]
>         ... 11 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message