Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting a ERROR: com.amazonaws.AmazonClientException: Unable to complete transfer: Failed to load com.sun.xml.bind.StackHelper #299

Open
gdubs opened this issue Jun 6, 2022 · 7 comments
Labels

Comments

@gdubs
Copy link

gdubs commented Jun 6, 2022

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Pipeline is running using containerTemplates with 'docker' as one of them. The issue happens intermittently but there's no documentation to show what are the possible causes of it. It happens when uploading a tar file using the following:

            try {
                withAWS(role: jenkinsRole) {
                    awsIdentity()
                    echo "uploading ${newChart}"
                    s3Upload(bucket: 'mybucket/folderkey', file: newChart)
                    echo "uploaded"

                }
             }
            catch (e) {
                error e.toString()
            }

File I'm uploading is a tar file packaged using helm. There will also be multiple packaged files, so looping can happen to to upload multiple packaged files.

Reproduction steps

  1. Setup a role that jenkins will assume
  2. Use declarative pipeline for the script and podTemplate to run the slave agent
  3. Package multiple helm charts and upload
  4. Re package again with different file names and try uploading.
  5. Error will happen intermittently between builds

Expected Results

Uploaded files to bucket

Actual Results

Error on the first tar file upload attempt

Anything else?

No response

@gdubs gdubs added the bug label Jun 6, 2022
@DavidSanchezAlvarez
Copy link

We are experiencing the same exact behaviour when running a pipeline that uploads frontend files to S3, in an identical scenario. The problem repits intermittently. Just running the pipeline few minutes after it runs smoothly.

org.codehaus.groovy.runtime.InvokerInvocationException: com.amazonaws.AmazonClientException: Unable to complete transfer: Failed to load com.sun.xml.bind.StackHelper

@krishna295
Copy link

we are also seeing same issue, anyone has solution?

Caused: com.amazonaws.AmazonClientException: Unable to complete transfer: Failed to load com.sun.xml.bind.StackHelper
18:53:30 at com.amazonaws.services.s3.transfer.internal.AbstractTransfer.unwrapExecutionException(AbstractTransfer.java:286)
18:53:30 at com.amazonaws.services.s3.transfer.internal.AbstractTransfer.rethrowExecutionException(AbstractTransfer.java:265)
18:53:30 at com.amazonaws.services.s3.transfer.internal.AbstractTransfer.waitForCompletion(AbstractTransfer.java:103)
18:53:30 at de.taimos.pipeline.aws.S3UploadStep$RemoteUploader.invoke(S3UploadStep.java:583)
18:53:30 at de.taimos.pipeline.aws.S3UploadStep$RemoteUploader.invoke(S3UploadStep.java:481)
18:53:30 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3502)

@wuillaum
Copy link

We had luck with running Jenkins under Java 8. It looks like this could be Java 11 related?

@asmild
Copy link

asmild commented Nov 30, 2022

Faced this issue with 1.43 version of plugin (jenkins is running with java11)

@rkivisto
Copy link

rkivisto commented Dec 8, 2022

For anyone encountering this issue, it would be helpful if you can confirm that:

  • If you are running your controller with Java 11, ensure the build agents are also using Java 11 to launch the agent.jar
  • Ensure you have https://plugins.jenkins.io/aws-java-sdk-minimal plugin version 1.12.215-339.vdc07efc5320c or newer installed on your controller

The reason I suggest this, is because the error Failed to load com.sun.xml.bind.StackHelper would typically mean we are encountering https://openjdk.org/jeps/320#Java-EE-modules, and this was fixed by PR jenkinsci/aws-java-sdk-plugin#710 (https://issues.jenkins.io/browse/JENKINS-68450) which was first available in https://plugins.jenkins.io/aws-java-sdk-minimal/#releases version 1.12.215-339.vdc07efc5320c.

This plugin currently only pulls in version:

<version>1.11.457</version>

If anyone finds that this solves your issue, please reply or add a 👍

@rkivisto
Copy link

@asmild since you encountered this issue just 12 days ago, did the above solution help?

@allamgr
Copy link

allamgr commented May 23, 2023

@rkivisto we are using:

Java Version: 11.0.15
Amazon Web Services SDK :: Minimal Version1.12.246-349.v96b_b_f7eb_a_c3c

I'm still getting the error, maybe we can just run aws s3 command instead of using the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants