jenkinsci / generic-webhook-trigger-plugin

Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
https://plugins.jenkins.io/generic-webhook-trigger
410 stars 162 forks source link

Failed to invoke the trigger and get 500 error code #297

Closed ja2081 closed 8 months ago

ja2081 commented 8 months ago

Jenkins and plugins versions report

when triggering the plugin with above curl command, i got 500 error code on response. The syslog shows the error bellow. I have re-installed the plugin which does not help. Please advice. Thanks James

Mar 13, 2024 3:25:53 PM INFO org.jenkinsci.plugins.gwt.jobfinder.JobFinderImpersonater reconfigureCachingIfNecessary Reconfiguring cache, was (enabled: false, minutes: 0) changing to (enabled: true, minutes: 0) Mar 13, 2024 3:25:53 PM WARNING org.eclipse.jetty.server.handler.ContextHandler$Context log Error while serving http://127.0.0.1:8080/generic-webhook-trigger/invoke java.lang.IllegalArgumentException: duration must be positive: 0 NANOSECONDS at com.google.common.base.Preconditions.checkArgument(Preconditions.java:386) at com.google.common.cache.CacheBuilder.refreshAfterWrite(CacheBuilder.java:918) at com.google.common.cache.CacheBuilder.refreshAfterWrite(CacheBuilder.java:879) at org.jenkinsci.plugins.gwt.jobfinder.JobFinderImpersonater.startCaching(JobFinderImpersonater.java:96) at org.jenkinsci.plugins.gwt.jobfinder.JobFinderImpersonater.reconfigureCachingIfNecessary(JobFinderImpersonater.java:82) at org.jenkinsci.plugins.gwt.jobfinder.JobFinderImpersonater.getAllParameterizedJobs(JobFinderImpersonater.java:33) at org.jenkinsci.plugins.gwt.jobfinder.JobFinder.findAllJobsWithTrigger(JobFinder.java:41) at org.jenkinsci.plugins.gwt.GenericWebHookRequestReceiver.doInvoke(GenericWebHookRequestReceiver.java:173) at org.jenkinsci.plugins.gwt.GenericWebHookRequestReceiver.doInvoke(GenericWebHookRequestReceiver.java:95) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397) Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:401) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:558)

tomasbjerre commented 8 months ago

It looks like you enabled the cache and configured it to 0. Should be fixed in 2.0.1.

Open a new issue if this is not working, and supply the information it asks for: https://github.com/jenkinsci/generic-webhook-trigger-plugin/issues/new?assignees=&labels=bug&projects=&template=1-report-problem.yml