Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible source error #311

Open
Scifire opened this issue Mar 29, 2022 · 3 comments · May be fixed by #323
Open

Ansible source error #311

Scifire opened this issue Mar 29, 2022 · 3 comments · May be fixed by #323

Comments

@Scifire
Copy link

Scifire commented Mar 29, 2022

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?

@SoarinFerret
Copy link

Same issue here. I upgraded my rundeck server to 4.1.0 and this started to happen. Previously running on 3.4.10 and the same inventory file worked fine. Trying to upgrade the plugin did not work - any help would be appreciated!

@sculliga
Copy link

This issue is caused by the account connecting to the Windows node not having administrative rights.
Some more details can be found in #323

@SoarinFerret
Copy link

This does not seem to be the issue on my end. That account is working fine before the upgrade. I restored from backup back to the older version of rundeck, and all my tasks are running again (which definitely require admin permissions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants