We’re using
- Jenkins 2.375.2 / 2.361.4
- jdk-11.0.12+7 / jdk-11.0.17+8
- Log Parser Plugin Version 2.3
- All machines are running Linux (RH7)
We had been using Jenkins 2.361.4 and JDK 11.0.12+7. With that combination the console log parser just worked as expected.
We then updated first Jenkins to 2.375.1, later to 2.375.2. Sometimes after that we updated the used JDK from jdk-11.0.12+7 to jdk-11.0.17+8.
After that we saw by chance a few failed console parser runs, the parsed console just contained:
“ERROR: Failed to parse console log
java.nio.charset.MalformedInputException: Input length = 1”
Other jobs/runs had the correct parsed console. We attributed this to some hiccup and continued with the pressing daily tasks.
Then our users started to complain about missing parsed consoles (we rely on this to speed up analysis)
I found the error message in these cases in build.xml of the affected runs:
<hudson.plugins.logparser.LogParserAction plugin=log-parser@2.3.0> <build class="build" reference="../../.."/> <result> <totalErrors>0</totalErrors> <totalWarnings>0</totalWarnings> <totalInfos>0</totalInfos> <totalDebugs>0</totalDebugs> <totalCountsByExtraTag/> <linkedFilesByExtraTag/> <extraTags/> <failedToParseError>java.nio.charset.MalformedInputException: Input length = 1</failedToParseError> </result> </hudson.plugins.logparser.LogParserAction>
Grepping for this, I found a lot of cases – but by far not all jobs.
On a trial-system (a rsynced copy of the current state), I downdated Jenkins (2.375.2 → 2.361.4) and JDK (jdk-11.0.17+8 → jdk-11.0.12+7).
I expected this to solve the problem, because these had been the “obvious” changes. I hoped I can find some explanation in the release note of the causing component.
But to my amazement, the problem was still there. (We log ‘java –version’ to the startup log; the Jenkins version is visible anyway); both had been like expected)
So, I went hunting for the source of the problem. Searching for the error message pointed me to encoding problems for the chars.
The beginning of one example of failing console log looked like this:
“Started by user ^[[8mha:////4I7 …”
It seems these “ha:////” (resembling a URL) are used to “encode” links to users and triggering jobs.
With the “^[“ being a non-ASCII char - but then we found the same char over and over, also on jobs with working parsed console.
The first time the problem appeared, correlates to the (minor) java update listed above. But as said, reverting this, didn’t solved the problem.
Questions:
- Ideas how we can get our parsed console back ?
- Why did undoing jdk and Jenkins core, didn’t revert the problem ? What else do I need to consider ?
- Any ideas, how for further debug ?
Thanks
Martin