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

Unable to Load Module on M1 Mac #15

Closed
irv075 opened this issue Jul 8, 2022 · 2 comments
Closed

Unable to Load Module on M1 Mac #15

irv075 opened this issue Jul 8, 2022 · 2 comments

Comments

@irv075
Copy link

irv075 commented Jul 8, 2022

Using a docker image of nginx 1.21.3 on a Mac with an M1 chip we are unable to load the module. Error message:

nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_curity_http_oauth_proxy_module.so" failed (/etc/nginx/modules/ngx_curity_http_oauth_proxy_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:7

The module itself is mounted to the correct location, so I assume it is a dependency that cannot be found.

Tried with amzn, amzn2 and Ubuntu modules. We've also previously tried an Alpine image with the Alpine module, but we've had issues with other Alpine images on M1 before so kind of expected that to fail.

Does the module need to be compiled specifically for machines with the M1 chip?

@gary-archer
Copy link
Collaborator

gary-archer commented Jul 11, 2022

I suspect this is not specific to an M1 chip since it is all just Linux behavior. It may be related to the path you are copying the module to, which is different depending on the Linux distro. Hopefully the deployment resources will help you to structure your Docker deployment and resolve your issue:

According to this deployment testing we did at Curity, these are the locations for each of the distros:

  • amzn: /usr/local/nginx/modules
  • amzn2: /etc/nginx/modules
  • ubuntu: /usr/lib/nginx/modules

Try downloading the file at this URL and then saving it to the ./build folder:

https://github.com/curityio/nginx_oauth_proxy_module/releases/download/1.0.0/amzn2.ngx_curity_http_oauth_proxy_module_1.21.3.so

Then run this command to deploy NGINX and the module:

./resources/deployment/deploy.sh amazon2

Then run this command to test all module operations:

./resources/deployment/test.sh

@irv075
Copy link
Author

irv075 commented Jul 11, 2022

Thanks Gary, I'll get one of the team with a Mac to give this a go 👍🏻

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