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

Error occurred during parameter parsing #15

Closed
Adarsh505-cloud opened this issue Apr 5, 2023 · 8 comments
Closed

Error occurred during parameter parsing #15

Adarsh505-cloud opened this issue Apr 5, 2023 · 8 comments

Comments

@Adarsh505-cloud
Copy link

Hi,

I am getting the following error while trying to launch a product, I have followed all the steps mentioned in the documentation.

Error occurred during parameter parsing: RequestId: feaf0bad-fb24-4dee-8dbf-0d624b7eb800 Error: Runtime exited with error: exit status 1

While checking the lambda function "ServiceCatalogTerraformOSParameterParser" logs I saw the following error.

/var/task/terraform_open_source_parameter_parser: /lib64/libc.so.6: version ``GLIBC_2.32' not found (required by /var/task/terraform_open_source_parameter_parser)

Could you please let me know how can I fix this issue.

Thank you.

@smaly-amazon
Copy link
Contributor

smaly-amazon commented Apr 5, 2023

Thanks for reporting this issue.

So far we have not been able to reproduce the issue. There is probably some difference between your machine and mine as far as libraries and other environment factors go.

I suggest you try the following.

  1. Please run go version to see what version you have. The latest version is 1.20. If you are not on this version, could you try upgrading and then repeating the deployment steps for the Terraform Reference Engine?

  1. If upgrading go doesn't resolve the issue, there may be a problem with how the go lambda is being built in your environment.

See this issue related to your error message: aws/aws-lambda-go#340

You can try running these commands to get the required libraries built and deployed into the go lambda.

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 sam build

sam deploy --s3-bucket terraform-engine-bootstrap-<account>-<region> --stack-name SAM-TRE --capabilities CAPABILITY_NAMED_IAM

Please let us know if either of these suggestions resolves the issue, so we can update the deployment steps as needed.

@Adarsh505-cloud
Copy link
Author

HI,

I have checked the go version and confirmed that we are using the latest version.

I have also tried the second commands and now I am getting a different error while trying to launch the product.

Error occurred during parameter parsing: fork/exec /var/task/terraform_open_source_parameter_parser: no such file or directory

Lambda "ServiceCatalogTerraformOSParameterParser" log

{
  "errorMessage": "fork/exec /var/task/terraform_open_source_parameter_parser: no such file or directory",
  "errorType": "PathError"
}

@smaly-amazon
Copy link
Contributor

Hello,

I'm sorry those suggestions did not help.

Would you please provide the following, which will help us reproduce the problem?

  1. Your operating system and version
  2. The output of the go env command.
    Thanks.

@Adarsh505-cloud
Copy link
Author

Hi,

Sorry for the delay in response.

I am using Ubuntu 22.04, please see the out put of the go env commad.

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2278423851=/tmp/go-build -gno-record-gcc-switches"

Please let me know if you any suggestions.

@bruno-rossini
Copy link

I had the same problem as @Adarsh505-cloud when trying to launch a product:
"Error occurred during parameter parsing: RequestId: 0f8db7e0-b8ca-4a50-b46d-f29109392135 Error: Runtime exited with error: exit status 1"

Executed these commands to get my lambda updated as suggested:

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 sam build

sam deploy --s3-bucket terraform-engine-bootstrap-<account>-<region> --stack-name SAM-TRE --capabilities CAPABILITY_NAMED_IAM

And now it´s working. Tks!

@Adarsh505-cloud
Copy link
Author

bruno-rossini

Could you please let me know the operating system and version you are using.

Also please let me know whether the installation was done manually or automatic installation method?

@smaly-amazon
Copy link
Contributor

Hi Adarsh505-cloud,

We have seen other occasions where the same error has occurred that you saw after setting CGO_ENABLED=0. The cause was an invalid zip file being uploaded for the ParameterParser lambda. The solution in those cases was to delete the SAM_TRE stack and recreate it.

Could you please try deleting the SAM_TRE stack?

Then try running these commands:

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 sam build

sam deploy --s3-bucket terraform-engine-bootstrap-<account>-<region> --stack-name SAM-TRE --capabilities CAPABILITY_NAMED_IAM

We will work on updating the automated deploy script and the manual installation instructions so this issue doesn't happen in the future.

I did try installing the engine from Ubuntu 22.04 but was not able to reproduce the problem. I apologize for the inconvenience with this issue.

@Adarsh505-cloud
Copy link
Author

Hello, smaly-amazon

I appreciate your support.

After deleting the SAM TRE stack and installing it again, I still had the issue, but after using the above command, the everything is now functioning as expected.

Also, I believe I discovered a jd: command not found error while the automated script running. If necessary, please give jd installation instructions. Issue has been fixed after installing jd using the steps below.

$ sudo yum makecache
$ sudo yum install jq

Thank you so much for your help.

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

3 participants