Bug 1116819 - Jenkins build for app reports "InvalidByteSequenceError"
Summary: Jenkins build for app reports "InvalidByteSequenceError"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1114948
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-07 11:30 UTC by Brenton Leanhardt
Modified: 2014-10-02 13:59 UTC (History)
10 users (show)

Fixed In Version: openshift-origin-cartridge-jenkins-client-1.19.3.5-1.el6op
Doc Type: Bug Fix
Doc Text:
Previously, the Jenkins client cartridge did not define a character encoding for builds. As a result, builds reported "InvalidByteSequenceError" failures in some cases, although the build was actually successful. This bug fix updates the Jenkins client cartridge to define a default character set of UTF-8, and the error message no longer appears during builds.
Clone Of: 1114948
Environment:
Last Closed: 2014-10-02 13:59:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1353 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.7 bug fix and enhancement update 2014-10-02 17:59:00 UTC

Description Brenton Leanhardt 2014-07-07 11:30:14 UTC
+++ This bug was initially created as a clone of Bug #1114948 +++

Description of problem:
Create app and add the jenkins client to the app, do jenkins build.

It will report the build failed with following error but the jenkins build actually running well in the background.

remote: Executing Jenkins build.
remote:
remote: You can track your build at https://jenkins-bmengdev.dev.rhcloud.com/job/perl1-build
remote:
remote: Waiting for build to schedule....../opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `encode': "\xE2" on US-ASCII (Encoding::InvalidByteSequenceError
remote:         from /opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `initialize'
remote:         from /opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `new'
remote:         from /opt/rh/ruby193/root/usr/share/ruby/json/common.rb:155:in `parse'
remote:         from /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client//bin/jenkins_build:24:in `get_jobs_info'
remote:         from /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client//bin/jenkins_build:38:in `get_build_num'
remote:         from /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client//bin/jenkins_build:80:in `<main>'
remote: !!!!!!!!
remote: Deployment Halted!
remote: If the build failed before the deploy step, your previous
remote: build is still running.  Otherwise, your application may be
remote: partially deployed or inaccessible.
remote: Fix the build and try again.
remote: !!!!!!!!
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute: 'control post-receive' for /var/lib/openshift/53b2c0fee6ed66d678000036/jenkins-client
remote:
remote: For more details about the problem, try running the command again with the '--trace' option.
To ssh://53b2c0fee6ed66d678000036.rhcloud.com/~/git/perl1.git/
   08ab80a..4b731f0  master -> master


Manually check the build_info at the same time will get the following result:
...
    "inQueue": true,
    "keepDependencies": false,
    "lastBuild": null,
    "lastCompletedBuild": null,
    "lastFailedBuild": null,
    "lastStableBuild": null,
    "lastSuccessfulBuild": null,
    "lastUnstableBuild": null,
    "lastUnsuccessfulBuild": null,
    "name": "perl1-build",
...

Version-Release number of selected component (if applicable):
devenv_4925

How reproducible:
not pretty sure but often on the 1st time build

Steps to Reproduce:
1. Create app with jenkins client added
2. Do jenkins build
3.

Actual results:
It will report fail with error in description. But the build successfully actually.

Expected results:
Should not show such error.

Additional info:
There is nothing unusual found in the jenkins log.

--- Additional comment from Ben Parees on 2014-07-01 16:53:08 EDT ---

https://github.com/openshift/origin-server/pull/5563

I was not able to reproduce this, but i've added some code that may address the invalid byte sequences, please give it a shot. 

Thanks

--- Additional comment from Meng Bo on 2014-07-02 03:07:49 EDT ---

With several tries on devenv_4932, I did not meet the issue.

Move the bug to verified.

Comment 1 Johnny Liu 2014-09-17 13:08:50 UTC
I encontered this issue today twice, could you help merge the PR into ose-2.1.z?

Comment 7 Johnny Liu 2014-09-18 08:31:10 UTC
Verified this bug with openshift-origin-cartridge-jenkins-client-1.19.3.5-1.el6op.noarch, and PASS.

The following line is added into jenkins-client/bin/jenkins_build
Encoding.default_external = "utf-8"

And when doing jenkins build, the above error is not seen any more.

Comment 9 errata-xmlrpc 2014-10-02 13:59:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1353.html


Note You need to log in before you can comment on or make changes to this bug.