-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 2.107
Plugin version 1.14
-
Powered by SuggestiMate
Jenkins logs are full of:
Cannot create control version of class org.jenkinsci.plugins.workflow.steps.CoreStep using {delegate=$InfluxDbPublisher(customData=null,customDataMap=null,customPrefix=jenkins_foo,target=[url=http://localhost:8186, description=telegraf, username=, password=*****, database=events])} java.lang.ClassCastException: jenkinsci.plugins.influxdb.InfluxDbPublisher.target expects class java.lang.String but received class jenkinsci.plugins.influxdb.models.Target at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:394) at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:318) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:259) Caused: java.lang.IllegalArgumentException: Could not instantiate {customData=null, customDataMap=null, customPrefix=jenkins_foo, target=[url=http://localhost:8186, description=telegraf, username=, password=*****, database=events]} for InfluxDbPublisher(target: String, customData?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.lang.Object>, customDataMap?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>, customPrefix?: String) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:264) at org.jenkinsci.plugins.structs.describable.UninstantiatedDescribable.instantiate(UninstantiatedDescribable.java:167) at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:372) at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:318) at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:259)
when trying with this config:
step([$class: 'InfluxDbPublisher', customData: null, customDataMap: null, customPrefix: 'jenkins_foo', target: 'telegraf'])
[JENKINS-49105] Can't send data to influx
aleksisimell Did you manage to reproduce this issue with the information that I provided?
bperel I've been piled up with a lot of other stuff so I haven't had time to actually do anything about this. Your comment was the first to clarify these messages are shown in the Jenkins log, not in the build log, so highly probable I've been looking in the wrong place the whole time (if that's the case, then sorry deiga for letting this hang for quite a while).
I am able to send the data to influx nerveless i see this kind of error in Jenkins log:
INFO: [InfluxDB Plugin] Publishing data to: [url=http://XXX:8086, description=influxDB, username=jenkins, password=*****, database=jenkins]
Apr 18, 2018 12:23:36 PM org.jenkinsci.plugins.structs.describable.DescribableModel uninstantiate2
WARNING: Cannot create control version of class jenkinsci.plugins.influxdb.InfluxDbPublisher using {target=[url=http://XXX:8086, description=influxDB, username=jenkins, password=*****, database=jenkins]}
java.lang.IllegalArgumentException: Could not instantiate {target=[url=http://XXX:8086, description=influxDB, username=jenkins, password=*****, database=jenkins]} for InfluxDbPublisher(target: String, customData?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.lang.Object>, customDataMap?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>, customPrefix?: String, customProjectName?: String): java.lang.ClassCastException: jenkinsci.plugins.influxdb.InfluxDbPublisher.target expects class java.lang.String but received class jenkinsci.plugins.influxdb.models.Target
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:286)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:572)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2_(DescribableModel.java:646)
at org.jenkinsci.plugins.structs.describable.DescribableParameter.uncoerce(DescribableParameter.java:196)
at org.jenkinsci.plugins.structs.describable.DescribableParameter.inspect(DescribableParameter.java:142)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:555)
at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.resolve(ArgumentsAction.java:308)
at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.getResolvedArguments(ArgumentsAction.java:295)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getDelegateType(StepAtomNode.java:134)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.effectiveFunctionName(StepAtomNode.java:111)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getTypeFunctionName(StepAtomNode.java:123)
at org.jenkinsci.plugins.workflow.graph.FlowNode.getDisplayFunctionName(FlowNode.java:261)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.logNodeMessage(WorkflowRun.java:1113)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:142)
at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1092)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1413)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:412)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: jenkinsci.plugins.influxdb.InfluxDbPublisher.target expects class java.lang.String but received class jenkinsci.plugins.influxdb.models.Target
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:416)
at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:340)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:281)
... 25 more
Apr 18, 2018 12:23:36 PM org.jenkinsci.plugins.structs.describable.DescribableModel uninstantiate2
WARNING: Cannot create control version of class org.jenkinsci.plugins.workflow.steps.CoreStep using {delegate=$InfluxDbPublisher(customData=null,customDataMap=null,customPrefix=null,customProjectName=null,target=[url=http://XXXX:8086, description=influxDB, username=jenkins, password=*****, database=jenkins])}
java.lang.IllegalArgumentException: Could not instantiate {delegate=$InfluxDbPublisher(customData=null,customDataMap=null,customPrefix=null,customProjectName=null,target=[url=http://XXX:8086, description=influxDB, username=jenkins, password=*****, database=jenkins])}
java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.lang.Object>, customDataMap?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>, customPrefix?: String, customProjectName?: String): java.lang.ClassCastException: jenkinsci.plugins.influxdb.InfluxDbPublisher.target expects class java.lang.String but received class jenkinsci.plugins.influxdb.models.
MY PLUGIN setup:
post {
success {
script {
currentBuild.result = 'SUCCESS'
if( env.BRANCH_NAME == 'master' ){
step([$class: 'InfluxDbPublisher', customData: null, customDataMap: null, customPrefix: null, target: 'influxDB'])
}
}
}
This is what i see in my influx:
name: jenkins_data
time build_number build_result build_result_ordinal build_status_message build_successful build_time last_stable_build last_successful_build project_build_health project_name project_name_1
1524047016523000000 43 SUCCESS 0 ? true 614961 42 42 100 feature%2Fjenkins_stats_to_influxdb feature%2Fjenkins_stats_to_influxdb
When I tried something like:
step([$class: 'InfluxDbPublisher', customData: test, customDataMap: null, customPrefix: null, target: 'influxDB'])
I tried to add custom_data and didn't work .
Thank you for help.
I have the same issue.
Jenkins version: 2.125
InfluxDB plugin version: 1.15
Jun 19, 2018 4:53:29 PM org.jenkinsci.plugins.structs.describable.DescribableModel uninstantiate2
WARNING: Cannot create control version of class jenkinsci.plugins.influxdb.InfluxDbPublisher using {target=[url=https://metrics.mobbtech.com/, description=Int_Tests_Monitoring, username=jenkins, password=*****, database=jenkins]}
java.lang.IllegalArgumentException: Could not instantiate {target=[url=https://metrics.mobbtech.com/, description=Int_Tests_Monitoring, username=jenkins, password=*****, database=jenkins]} for InfluxDbPublisher(target: String, customData?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.lang.Object>, customDataMap?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>, customDataMapTags?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>, customDataTags?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type java.util.Map<java.lang.String, java.lang.String>, customPrefix?: String, customProjectName?: String): java.lang.ClassCastException: jenkinsci.plugins.influxdb.InfluxDbPublisher.target expects class java.lang.String but received class jenkinsci.plugins.influxdb.models.Target
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:286)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:572)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2_(DescribableModel.java:646)
at org.jenkinsci.plugins.structs.describable.DescribableParameter.uncoerce(DescribableParameter.java:196)
at org.jenkinsci.plugins.structs.describable.DescribableParameter.inspect(DescribableParameter.java:142)
at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:555)
at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.resolve(ArgumentsAction.java:308)
at org.jenkinsci.plugins.workflow.actions.ArgumentsAction.getResolvedArguments(ArgumentsAction.java:295)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getDelegateType(StepAtomNode.java:134)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.effectiveFunctionName(StepAtomNode.java:111)
at org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode.getTypeFunctionName(StepAtomNode.java:123)
at org.jenkinsci.plugins.workflow.graph.FlowNode.getDisplayFunctionName(FlowNode.java:261)
at org.jenkinsci.plugins.workflow.support.actions.LogActionImpl$1.onNewHead(LogActionImpl.java:92)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1438)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.notifyNewHead(CpsThreadGroup.java:400)
at org.jenkinsci.plugins.workflow.cps.FlowHead.setNewHead(FlowHead.java:147)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:195)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
at org.jenkinsci.plugins.workflow.cps.CpsScript.println(CpsScript.java:221)
at org.jenkinsci.plugins.workflow.cps.CpsScript.print(CpsScript.java:216)
at sun.reflect.GeneratedMethodAccessor553.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908)
at org.jenkinsci.plugins.workflow.cps.CpsClosure2.print(CpsClosure2.java:59)
at sun.reflect.GeneratedMethodAccessor476.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908)
at org.jenkinsci.plugins.workflow.cps.CpsClosure2.print(CpsClosure2.java:59)
at sun.reflect.GeneratedMethodAccessor476.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
at sun.reflect.GeneratedMethodAccessor341.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
at com.cloudbees.groovy.cps.Next.step(Next.java:83)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: jenkinsci.plugins.influxdb.InfluxDbPublisher.target expects class java.lang.String but received class jenkinsci.plugins.influxdb.models.Target
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:416)
at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:340)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:281)
... 93 more
I am facing the same issue when running the following versions.
Jenkins - 2.128
Influx Plugin - 1.16
It works fine though when i downgrade Influx Plugin version to 1.12.1 but that is causing another error due to HttpEntity . I need to upgrade to get out of these issues,
I managed to get rid of these log errors by changing the
@DataBoundConstructor
to a parameterless InfluxDbPublisher. Need still to run a few checks if that change actually removed all errors from logs.
aleksisimell We've noticed that the plugin works even though it spams these errors. They are just annyoing in filling up logs
Changing the DataboundConstructor got rid of the error logs. Fix available in next release.
I'm having the same issue here : the Jenkins build info is sent to the Influx DB but not the specified custom data.
Pipeline config :
In the build log, no complaint :
[InfluxDB Plugin] Publishing data to: [url=http://localhost:8086, description=Grafana, username=myusername, password=*****, database=mydatabase]
[InfluxDB Plugin] Custom data found. Writing to InfluxDB...
[InfluxDB Plugin] Completed.
In the database, the custom data is missing :
Jenkins logs are attached (influxdb_log.txt
), with similar "do not know how to categorize attributes" errors.
Jenkins version : 2.89.4
Plugin version : 1.14