Closed joaom182 closed 8 months ago
Interesting, I haven't seen any issues like this. Have you tried pushing to another environment? Have you tried pushing manually through git aws.push
from your local machine?
I will try this..
Using git aws.push localy works fine... using eb deploy works too..
After is run git aws.push
wercker step throw another error
Checking if eb exists and can connect.
Warning. File "config" has incorrect access permission and can be accessed by other users.
The current branch "(no" is not associated with an Elastic Beanstalk environment. Call "eb branch" to set up a new environment for this branch.
Proceeding with default settings.
URL : squid-api-env.elasticbeanstalk.com
Status : Ready
Health : Green
Pushing to AWS eb servers.
/pipeline/build/.git/AWSDevTools/aws/dev_tools.rb:105:in `signed_uri': Unable to find AWS Secret Key. Please run git aws.config to add it. (RuntimeError)
from .git/AWSDevTools/aws.elasticbeanstalk.push:86:in `<main>'
failed: Unable to push to Amazon Elastic Beanstalk
If you set 'debug' to true (in the step settings in wercker.xml) then it will dump the contents of the config file out to the deployment log. Can you turn that on and post the full contents of the EB deployment step (obfuscating sensitive data of course)?
wercker.xml
or wercker.yml
?
wercker.yml
, sorry. Same place as app_name: My Application
The result after I put debug: true
cd $WERCKER_SOURCE_DIR
$ export WERCKER_STEP_ROOT="/wercker/steps/mrono/elastic-beanstalk-deploy/1.0.0"
$ export WERCKER_STEP_ID="9aec9b9d-cdfa-451c-b7cf-dc50f1cdf262"
$ export WERCKER_STEP_NAME="elastic-beanstalk-deploy"
$ export WERCKER_REPORT_NUMBERS_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/numbers.ini"
$ export WERCKER_REPORT_MESSAGE_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/message.txt"
$ export WERCKER_REPORT_ARTIFACTS_DIR="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/artifacts"
$ mkdir -p $WERCKER_REPORT_ARTIFACTS_DIR
$ export WERCKER_STEP_TEMP="/tmp/$WERCKER_STEP_ID"
$ source '/wercker/wercker-build-essentials/init.sh'
$ mkdir -p $WERCKER_STEP_TEMP
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_KEY="$AMAZON_KEY"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_SECRET="$AMAZON_SECRET_KEY"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_APP_NAME="$AMAZON_APP_NAME"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_ENV_NAME="$AMAZON_ENV_NAME"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_REGION="sa-east-1"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_DEBUG="true"
$ source "$WERCKER_STEP_ROOT/run.sh"
Debug mode turned on, this can dump potentially dangerous information to log files.
Change back to the source dir.
Setting up credentials.
Dumping Credential file.
AWSAccessKeyId= <MY KEY ID>
AWSSecretKey= <MY SECRET KEY>
Setting up config file.
Dumping config file.
[global]
ApplicationName=squid-api
DevToolsEndpoint=git.elasticbeanstalk.sa-east-1.amazonaws.com
EnvironmentName=squid-api-env
Region=sa-east-1
AwsCredentialFile=c:/Users/joao.mainka\.elasticbeanstalk\aws_credential_file
[global]
ApplicationName=squid-api
DevToolsEndpoint=git.elasticbeanstalk.sa-east-1.amazonaws.com
Region=sa-east-1
ServiceEndpoint=https://elasticbeanstalk.sa-east-1.amazonaws.com
AwsCredentialFile=/home/ubuntu/.elasticbeanstalk/aws_credential_file
EnvironmentName=squid-api-env
[branches]
dev=squid-api-env
[branch:dev]
ApplicationVersionName=dev
EnvironmentName=squid-api-env
InstanceProfileName=aws-elasticbeanstalk-ec2-role
Checking if eb exists and can connect.
Warning. File "config" has incorrect access permission and can be accessed by other users.
The current branch "(no" is not associated with an Elastic Beanstalk environment. Call "eb branch" to set up a new environment for this branch.
Proceeding with default settings.
URL : squid-api-env.elasticbeanstalk.com
Status : Ready
Health : Green
Pushing to AWS eb servers.
/pipeline/build/.git/AWSDevTools/aws/dev_tools.rb:105:in `signed_uri': Unable to find AWS Secret Key. Please run git aws.config to add it. (RuntimeError)
from .git/AWSDevTools/aws.elasticbeanstalk.push:86:in `<main>'
failed: Unable to push to Amazon Elastic Beanstalk
I suspect this line is incorrect
AwsCredentialFile=c:/Users/joao.mainka\.elasticbeanstalk\aws_credential_file
The credentials file must be at project folder?
@joaom182 I suspect the config file exists in your repo already, that is how that line is making it into the config. Does the file .elasticbeanstalk/config
exist in your committed repo file (it should be ignored by git)
I removed the folder .elasticbeanstalk
of source control. And now is back the initial error, see the log.
cd $WERCKER_SOURCE_DIR
$ export WERCKER_STEP_ROOT="/wercker/steps/mrono/elastic-beanstalk-deploy/1.0.0"
$ export WERCKER_STEP_ID="ca536f0c-3577-4b13-900d-92f3e554dc7c"
$ export WERCKER_STEP_NAME="elastic-beanstalk-deploy"
$ export WERCKER_REPORT_NUMBERS_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/numbers.ini"
$ export WERCKER_REPORT_MESSAGE_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/message.txt"
$ export WERCKER_REPORT_ARTIFACTS_DIR="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/artifacts"
$ mkdir -p $WERCKER_REPORT_ARTIFACTS_DIR
$ export WERCKER_STEP_TEMP="/tmp/$WERCKER_STEP_ID"
$ source '/wercker/wercker-build-essentials/init.sh'
$ mkdir -p $WERCKER_STEP_TEMP
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_KEY="$AMAZON_KEY"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_SECRET="$AMAZON_SECRET_KEY"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_APP_NAME="$AMAZON_APP_NAME"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_ENV_NAME="$AMAZON_ENV_NAME"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_REGION="sa-east-1"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_DEBUG="true"
$ source "$WERCKER_STEP_ROOT/run.sh"
Debug mode turned on, this can dump potentially dangerous information to log files.
Change back to the source dir.
Setting up credentials.
Dumping Credential file.
AWSAccessKeyId=****
AWSSecretKey=*****
Setting up config file.
Dumping config file.
[global]
ApplicationName=squid-api
DevToolsEndpoint=git.elasticbeanstalk.sa-east-1.amazonaws.com
Region=sa-east-1
ServiceEndpoint=https://elasticbeanstalk.sa-east-1.amazonaws.com
AwsCredentialFile=/home/ubuntu/.elasticbeanstalk/aws_credential_file
EnvironmentName=squid-api-env
[branches]
dev=squid-api-env
[branch:dev]
ApplicationVersionName=dev
EnvironmentName=squid-api-env
InstanceProfileName=aws-elasticbeanstalk-ec2-role
Checking if eb exists and can connect.
Warning. File "config" has incorrect access permission and can be accessed by other users.
The current branch "(no" is not associated with an Elastic Beanstalk environment. Call "eb branch" to set up a new environment for this branch.
Proceeding with default settings.
URL : squid-api-env.elasticbeanstalk.com
Status : Ready
Health : Green
Pushing to AWS eb servers.
remote: processing .................................ote: error: Encountered corrupt pack file: Git command exited with status code 128: error: unable to find 42cbe3c57c843848bbc883dc0875943cc49ba172ote: fatal: object of unexpected typeote:
remote:
To https://AKIAJFCDPL6KDAVBYVWQ:20150408T171129Zc71997fed087f0462ed1794691c4d2fcd3fc25e0afc03fd4bfedf2c1ba3d5bf7@git.elasticbeanstalk.sa-east-1.amazonaws.com/v1/repos/73717569642d617069/commitid/31383565393364323766313634326663396361396132346530376430343661643136353637616537/environment/73717569642d6170692d656e76
! [remote rejected] HEAD -> master (hook declined)
error: failed to push some refs to 'https://AKIAJFCDPL6KDAVBYVWQ:20150408T171129Zc71997fed087f0462ed1794691c4d2fcd3fc25e0afc03fd4bfedf2c1ba3d5bf7@git.elasticbeanstalk.sa-east-1.amazonaws.com/v1/repos/73717569642d617069/commitid/31383565393364323766313634326663396361396132346530376430343661643136353637616537/environment/73717569642d6170692d656e76'
failed: Unable to push to Amazon Elastic Beanstalk
At
Encountered corrupt pack file: Git command exited with status code 128: error: unable to find 42cbe3c57c843848bbc883dc0875943cc49ba172ote: fatal: object of unexpected typeote:
@joaom182 Does the same wercker app work with another EB app?
I've tried deleting and creating a new application in ElasticBeanstalk, but did not work.
@joaom182 Aside from looking at the specific repository, wercker app, and EB instance myself I am not sure where to go from here as I am unable to duplicate this issue. Please let me know if you are interested.
I'm currently doing the deploy manually, but it's a shame we can not identify the problem. I think the problem is in the repository.
I researched about the error 'Encountered corrupt pack file', but I'm not sure if this is a problem of git or deployment script.
What version of the EB cli are you running locally, since you said it worked there
EB CLI 3.2.2 (Python 2.7.9)
Hmm, the deployment step is running 2.6.0. Do you mind running the aws.push using that version to see if it duplicates the issue on your machine? It's located at https://aws.amazon.com/code/6752709412171743
I recommend copying the repo folder and removing the .elasticbeanstalk folder
Hello,
A few time ago this step works perfectly, but now is throwing the following errors
Any idea?