Jenkins 2.1:错误:步骤'后期构建任务'中止@ java.nio.charset.MalformedInputException:输入长度= 1

时间:2018-01-26 00:58:52

标签: jenkins jenkins-plugins

最近升级Jenkins和插件后,Post Build任务随机中止,异常如下所示。造成它的原因是什么以及如何解决?

软件版本:

Jenkins ver。 2.103; Hudson Post构建任务v1.8

错误消息(打印到Jenkins控制台):

15:29:38 ERROR: Step ‘Post build task’ aborted due to exception: 
15:29:38 java.nio.charset.MalformedInputException: Input length = 1
15:29:38    at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
15:29:38    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
15:29:38    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
15:29:38    at java.io.InputStreamReader.read(InputStreamReader.java:184)
15:29:38    at java.io.BufferedReader.fill(BufferedReader.java:161)
15:29:38    at java.io.BufferedReader.read1(BufferedReader.java:212)
15:29:38    at java.io.BufferedReader.read(BufferedReader.java:286)
15:29:38    at hudson.Util.loadFile(Util.java:199)
15:29:38    at hudson.model.Run.getLog(Run.java:1953)
15:29:38    at hudson.plugins.postbuildtask.PostbuildTask.perform(PostbuildTask.java:99)
15:29:38    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
15:29:38    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
15:29:38    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps    (AbstractBuild.java:690)
15:29:38    at hudson.model.Build$BuildExecution.post2(Build.java:186)
15:29:38    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
15:29:38    at hudson.model.Run.execute(Run.java:1752)
15:29:38    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
15:29:38    at hudson.model.ResourceController.execute(ResourceController.java:97)
15:29:38    at hudson.model.Executor.run(Executor.java:429)

2 个答案:

答案 0 :(得分:0)

我认为这与JENKINS-49112有关。

问题是Jenkins在运行时读取控制台输出时无法处理charset。恢复突破性更改,问题将在2.104中解决。

答案 1 :(得分:0)

就我而言,Jenkins 试图解析包含 ä

的 .yml 文件

删除就解决了。