Synchronization Timeout to AWS-S3 in Jenkins Remote Host Shell Execution

Asked 2 years ago, Updated 2 years ago, 81 views

As the title suggests, when running the remote host shell from Jenkins,
Using the AWS CLI, we run a script to synchronize with S3.

There is no problem with the script alone, but I have been able to confirm the synchronization with AWS.
If you go through Jenkins (Hook trigger), the timeout will occur as follows:

 fatal error: HTTPSConnectionPool (host='xxx.amazonaws.com', port=443): Max retries exceeded with url:/xxx?prefix=&encoding-type=url (Causeed by ConnectTimeoutError(<botocore.awsrequest.AWSHnection10;Connect64tection,AWSHnection10>object

The same was true of shell boot on the local host, not on the remote host.

Note:

Set the #credentials path
export AWS_SHARED_CREDENTIALS_FILE=${cwd}/credentials/credentials
# Configuring the config Path
export AWS_CONFIG_FILE=${cwd}/credentials/config
# sync execution
aws3sync--profile${aws_stage}--delete--exact-timestamps${sync_src}${sync_dest}

I look forward to your kind cooperation.

jenkins aws-cli

2022-09-30 11:18

1 Answers

I was able to solve myself.Thank you @take88 for all your advice.

The reason was not accessible by proxy because the environment variable was not reflected via remote access (SSH).

This post is @Nazonokusa's comment.


2022-09-30 11:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.