jenkinsci / datadog-plugin

A Jenkins plugin used to forward metrics, events, and service checks to an account at Datadog, automatically.
https://plugins.jenkins.io/datadog/
MIT License
34 stars 48 forks source link

Failed to send log payload for Jenkins workers #365

Open cristianburca opened 1 year ago

cristianburca commented 1 year ago

Describe the bug

We are using ec2 plugin to connect Jenkins workers and this is spot into their log.

INFO: Failed to send log payload: java.lang.NullPointerException: Name is null at java.base/java.lang.Enum.valueOf(Enum.java:238) at org.datadog.jenkins.plugins.datadog.DatadogClient$ClientType.valueOf(DatadogClient.java:39) at org.datadog.jenkins.plugins.datadog.clients.ClientFactory.getClient(ClientFactory.java:86) at org.datadog.jenkins.plugins.datadog.logs.DatadogWriter.write(DatadogWriter.java:80) at org.datadog.jenkins.plugins.datadog.logs.DatadogOutputStream.eol(DatadogOutputStream.java:47) at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:61) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:57) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:75) at org.jenkinsci.plugins.credentialsbinding.masking.SecretPatterns$MaskingOutputStream.eol(SecretPatterns.java:104) at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:61) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:57) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:75) at hudson.plugins.timestamper.pipeline.GlobalDecorator$GlobalDecoratorLineTransformationOutputStream.eol(GlobalDecorator.java:83) at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:61) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:57) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:75) at java.base/java.io.PrintStream.write(PrintStream.java:559) at java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:233) at java.base/sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:312) at java.base/sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104) at java.base/java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:181) at java.base/java.io.PrintStream.newLine(PrintStream.java:625) at java.base/java.io.PrintStream.println(PrintStream.java:883) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2801) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2762) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2757) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getBranches(CliGitAPIImpl.java:3003) at hudson.plugins.git.GitAPI.getBranches(GitAPI.java:219) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:3155) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:170) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:377) at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

Label the issue properly.

To Reproduce Steps to reproduce the behavior:

  1. Go to Jenkins worker linux server
  2. Find remoting directory. Usually in /var/tmp/jenkins/remoting/logs
  3. See error

Expected behavior Same behaviour as Jenkins master where we are able to see everything working as expected.

Screenshots If applicable, add screenshots to help explain your problem.

Environment and Versions (please complete the following information): A clear and precise description of your setup:

Additional context Add any other context about the problem here.