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

The provisioning script return error messages #17

Open
aec2016 opened this issue Dec 6, 2019 · 2 comments
Open

The provisioning script return error messages #17

aec2016 opened this issue Dec 6, 2019 · 2 comments

Comments

@aec2016
Copy link

aec2016 commented Dec 6, 2019

Hi all,

When I followed the guide, all things go smooth until the provisioning script, which gives the following error output:

➜ sudo -u www-data php files/converter/librelambda/cli/provision.php \
➜ --keyid=AKI****************4 \
➜ --secret=kI3m8d*******************Z \
➜ --region=cn-north-1 \
➜ --set-config
== Creating resource S3 Bucket ==
Created resource bucket, at location 

== Uploading LibreOffice archive to resource S3 bucket ==
== Uploading Lambda archive to resource S3 bucket ==
Default exception handler: error/1: The input bucket does not exist. Debug: 
Error code: 1: The input bucket does not exist.
$a contents: 
* line 115 of /files/converter/librelambda/cli/provision.php: moodle_exception thrown

!!! error/1: The input bucket does not exist. !!!
!! 
Error code: 1: The input bucket does not exist.
$a contents:  !!
!! Stack trace: * line 115 of /files/converter/librelambda/cli/provision.php: moodle_exception thrown
 !!

And Moodle version is 3.7.3, with the latest librelambda version published on official Moodle website. Also I am using AWS Region cn-north-1(Beijing).

It seems that the S3 bucket hasn't been created? Any help will be appreciated!

@mattporritt
Copy link

Hi @aec2016 ,
From the output of this script I can see the input bucket has not been created. And we know that the provisioning script does indeed work.
The only suggestions I have for you are:

  • Check that the user associated with the API key and secret has admin privileges in your AWS account
  • I'd try setting up the stack in another AWS region. I know there are some differences with the AWS China regions and this could be the reason.
  • Finally, I have seen before that VPN's and organisation networks can block communication from the script to the AWS API. I'd check that you can use the regular AWS CLI tool to create a test S3 bucket to try and rule out network filtering issues.

Cheers,
Matt P

@aec2016
Copy link
Author

aec2016 commented Jan 3, 2020

Hi @mattporritt
Thanks a lot for your suggestions. I moved the test enviroment to AWS China since my local test network does not have an external IP, which might cause potiential problems as you mentioned in the third suggestions.

This time I am able to create a S3 resouce bucket in AWS China regions using provision script. However, the corresponding configurations were not automatically filled in with the parameter "--set-config" in the plugin setting page. I tried to fill in the settings page manually with created S3 bucket name. Then I ran the test.php in cli to see if the conversion works, I got the following error output:

➜ sudo -u www-data php files/converter/librelambda/cli/test.php \
--keyid=AKIAQUBZ******B3IMG2 \
--secret=qVVk****IdFSJ/Z2****GanQ/lXdg3I/Az****GC \
--region=cn-north-1 \
--input-bucket=df4fbaec5cdee176af5986edb78a54ce-input \
--output-bucket=df4fbaec5cdee176af5986edb78a54ce-output \
--file='/var/www/html/moodle2019/files/converter/librelambda/tests/fixtures/testsubmission.odt'
== Uploading test file ==
!!! error/1: The input bucket does not exist. !!!

So I tried to run provision script again:

sudo -u www-data php files/converter/librelambda/cli/provision.php \
--keyid=AKIAQUBZ******B3IMG2 \
--secret=qVVk****IdFSJ/Z2****GanQ/lXdg3I/Az****GC \
--region=cn-north-1 \
--set-config
== Creating resource S3 Bucket ==
!!! error/1: Bucket exists !!!

It says the Bucket already exists. The created S3 bucket content is only two zip files as following:
截屏2020-01-0310 39 35

I am not sure if the provision.php script works fine or just partly done? Many thanks for your help in advance!

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

No branches or pull requests

2 participants