Skip to content

Ansible source error #311

Open
Open
@Scifire

Description

@Scifire

Not sure if this is the right place, in case if not please let me know.

We´re using an Ansible Resource Model Source with netbox as inventory.

As soon as I adjust the filter the Windows nodes are added I got an error and Windows nodes are not added to rundeck, but Linux nodes are added.
In the ui following error is shown:
image

In the Rundeck service log following error is shown:

[2022-03-29T16:01:46,511] ERROR resources.ExceptionCatchingResourceModelSource - [ResourceModelSource: 2.source (com.batix.rundeck.plugins.AnsibleResourceModelSourceFactory), project: Coperate_IT_Ansible]
java.lang.UnsupportedOperationException: JsonNull
        at com.google.gson.JsonElement.getAsString(JsonElement.java:192) ~[gson-2.8.6.jar!/:?]
        at com.batix.rundeck.plugins.AnsibleResourceModelSource.getNodes(AnsibleResourceModelSource.java:327) ~[?:?]
        at com.dtolabs.rundeck.core.resources.ExceptionCatchingResourceModelSource.getNodes(ExceptionCatchingResourceModelSource.java:58) [rundeck-core-4.0.0-20220322.jar!/:?]
        at com.dtolabs.rundeck.core.resources.DelegateResourceModelSource.getNodes(DelegateResourceModelSource.java:35) [rundeck-core-4.0.0-20220322.jar!/:?]
        at com.dtolabs.rundeck.core.common.ProjectNodeSupport.getNodeSet(ProjectNodeSupport.java:139) [rundeck-core-4.0.0-20220322.jar!/:?]
        at com.dtolabs.rundeck.core.common.ProjectNodeSupport$ProjectNodesSource.getNodes(ProjectNodeSupport.java:359) [rundeck-core-4.0.0-20220322.jar!/:?]
        at com.dtolabs.rundeck.core.resources.ExceptionCatchingResourceModelSource.getNodes(ExceptionCatchingResourceModelSource.java:58) [rundeck-core-4.0.0-20220322.jar!/:?]
        at com.dtolabs.rundeck.core.resources.ResourceModelSource$getNodes$1.call(Unknown Source) [rundeck-core-4.0.0-20220322.jar!/:?]
        at rundeck.services.nodes.CachedProjectNodes.reloadNodeSet(CachedProjectNodes.groovy:44) [classes!/:?]
        at rundeck.services.nodes.CachedProjectNodes$reloadNodeSet.call(Unknown Source) [classes!/:?]
        at rundeck.services.NodeService$_loadNodes_closure5.doCall(NodeService.groovy:313) [classes!/:?]
        at rundeck.services.NodeService$_loadNodes_closure5.doCall(NodeService.groovy) [classes!/:?]
        at jdk.internal.reflect.GeneratedMethodAccessor2780.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.Closure.call(Closure.java:412) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.Closure.call(Closure.java:406) [groovy-3.0.9.jar!/:3.0.9]
        at com.codahale.metrics.Timer.time(Timer.java:118) [metrics-core-4.2.7.jar!/:4.2.7]
        at org.grails.plugins.metricsweb.MetricService.withTimer(MetricService.groovy:61) [grails-metricsweb-4.0.0-20220322-plain.jar!/:?]
        at jdk.internal.reflect.GeneratedMethodAccessor1614.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrap.invoke(PogoMetaMethodSite.java:182) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:73) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:157) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:112) [groovy-3.0.9.jar!/:3.0.9]
        at rundeck.services.NodeService.loadNodes(NodeService.groovy:325) [classes!/:?]
        at jdk.internal.reflect.GeneratedMethodAccessor1607.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:94) [groovy-3.0.9.jar!/:3.0.9]
        at rundeck.services.NodeService.this$dist$invoke$1(NodeService.groovy) [classes!/:?]
        at rundeck.services.NodeService$3.methodMissing(NodeService.groovy) [classes!/:?]
        at jdk.internal.reflect.GeneratedMethodAccessor1431.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:953) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1347) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1270) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:819) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.GroovyObject.invokeMethod(GroovyObject.java:39) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:408) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:348) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194) [groovy-3.0.9.jar!/:3.0.9]
        at rundeck.services.NodeService$3$_reload_closure1.doCall(NodeService.groovy:147) [classes!/:?]
        at rundeck.services.NodeService$3$_reload_closure1.doCall(NodeService.groovy) [classes!/:?]
        at jdk.internal.reflect.GeneratedMethodAccessor2815.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) [groovy-3.0.9.jar!/:3.0.9]
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.Closure.call(Closure.java:412) [groovy-3.0.9.jar!/:3.0.9]
        at groovy.lang.Closure.call(Closure.java:406) [groovy-3.0.9.jar!/:3.0.9]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:280) [spring-core-5.3.15.jar!/:5.3.15]
        at java.lang.Thread.run(Thread.java:829) [?:?]
[2022-03-29T16:01:46,525] WARN  resources.LoggingResourceModelSourceCache - [ResourceModelSource: 2.source (com.batix.rundeck.plugins.AnsibleResourceModelSourceFactory), project: Coperate_IT_Ansible] Returning cached model data

When I use the same source directly with ansible everything works even on the same host where rundeck is running.

Does anyone have a hint for me what could be the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions