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

Application won't run after deploy #115

Open
DKorytkin opened this issue Feb 9, 2024 · 0 comments
Open

Application won't run after deploy #115

DKorytkin opened this issue Feb 9, 2024 · 0 comments

Comments

@DKorytkin
Copy link

Problem

I use this repo as an example and follow step by step in README.

But got errors.
Response

{"message": "Internal server error"}

Error

LoadError: /usr/lib64/libnssutil3.so: version `NSSUTIL_3.82' not found (required by /var/task/lib/libnss3.so) - /var/task/vendor/bundle/ruby/3.2.0/gems/pg-1.5.4/lib/pg_ext.so

What I dug:

Docker image with the wrong architecture

The image public.ecr.aws/lambda/ruby:3.2 based on aarch64 but in serverless docs mentioned that the default architecture is x86

Linux dd384be8792b 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

source: https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml

# Processor architecture: 'x86_64' or 'arm64' via Graviton2 (default: x86_64)

The application fails with an error that nokogiri is not installed. Because in the vendor folder, we have nokogiri-1.16.2-aarch64-linux instead of nokogiri-1.16.2-x86_64-linux

Using docker image based on x86_64

I tried to use public.ecr.aws/lambda/ruby:3.2-x86_64
No luck.

LoadError: /usr/lib64/libnssutil3.so: version `NSSUTIL_3.82' not found (required by /var/task/lib/libnss3.so) - /var/task/vendor/bundle/ruby/3.2.0/gems/pg-1.5.4/lib/pg_ext.so

Using docker image based on arm64

Set: architecture: arm64 in serverless.yaml
Use docker image public.ecr.aws/lambda/ruby:3.2-arm64
Same error

LoadError: /usr/lib64/libnssutil3.so: version `NSSUTIL_3.82' not found (required by /var/task/lib/libnss3.so) - /var/task/vendor/bundle/ruby/3.2.0/gems/pg-1.5.4/lib/pg_ext.so
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

1 participant