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

nginx-mod-http-passenger CentOS unable to update with yum #2364

Closed
jannahilferty opened this issue Jun 21, 2021 · 21 comments
Closed

nginx-mod-http-passenger CentOS unable to update with yum #2364

jannahilferty opened this issue Jun 21, 2021 · 21 comments

Comments

@jannahilferty
Copy link

Issue report

Fill in as much as possible so that we can understand, find and fix the problem.

Are you sure this is a bug in Passenger?
Yes

Please try with the newest version of Passenger to avoid issues that have already been fixed
The issue in question is caused by the newest version of Passenger

Question 1: What is the problem?

  • When trying to run a yum update, I get the following error:
    Error: Package: nginx-mod-http-passenger-6.0.9-1.el7.x86_64 (passenger) Requires: nginx = 1:1.16.1 Installed: 1:nginx-1.20.1-2.el7.x86_64 (@epel) nginx = 1:1.20.1-2.el7

  • What is the expected behavior?
    I expected to be able to update passenger and nginx with yum update.

  • How can we reproduce it? Please try to provide a sample application (or Virtual Machine) demonstrating the issue. Otherwise, if we can't reproduce it, we might have to ask you a number of followup questions or run certain commands to try and figure out the problem.
    With CentOS 7 and passenger and nginx installed from yum repos, try updating to the latest version (2.0.9) - this installs the preferred version of nginx (1.20) but the package "nginx-mod-http-passenger-6.0.9-1.el7.x86_64" still requires nginx 1.16.1 which is now unable to be installed after updating nginx.

This same issue happened last year with 6.0.5 in this ticket: #2284 however the resolution steps from last time do not seem to help. I have tried removing passenger and nginx, then reinstalling the repo and passenger, nginx, and nginx-mod-http-passenger with no luck.

Be as detailed as possible in your descriptions, include any logs and stack traces (don't just cut/paste the error, provide some logging before that too).

(if you are requesting a feature instead of reporting an issue, describe here what you have in mind and how it would help you)

Your answer:

Question 2: Passenger version and integration mode:

Your answer:
Installed from yum repository on CentOS 7:
nginx x86_64 1:1.20.1-2.el7 epel
passenger x86_64 6.0.9-1.el7 passenger
Installing for dependencies:
nginx-filesystem noarch 1:1.20.1-2.el7 epel

Question 3: OS or Linux distro, platform (including version):

  • For example: Debian 8, x86_64 or OS X 10.10 Yosemite, x86_64

Your answer: CentOS Linux release 7.9.2009 (Core)

Question 4: Passenger installation method:

Your answer:
[ ] RubyGems + Gemfile
[ ] RubyGems, no Gemfile
[ ] Phusion APT repo
[x] Phusion YUM repo
[ ] OS X Homebrew
[ ] source tarball
[ ] Other, please specify:

Question 5: Your app's programming language (including any version managers) and framework (including versions):

  • For example: Ruby 2.3.0, RVM, Rails 5.0.0; Node.js 4.0.0 with Express 4.13.4

Your answer: Ruby 2.7.2, Rails 6.0.3.7

Question 6: Are you using a PaaS and/or containerization? If so which one?

  • For example: Heroku, Amazon Container Services, Docker 1.9 with an image based on passenger-docker

Your answer:
No

Question 7: Anything else about your setup that we should know?

Your answer:
No


We strive for quality and appreciate you taking the time to submit a report! Please note that if you want guaranteed response times and priority issue support we encourage you to join our enterprise customer base. They also provide us with the means to continue our high level of open source support!

@jannahilferty jannahilferty changed the title nginx-mod CentOS unable to update with yum nginx-mod-http-passenger CentOS unable to update with yum Jun 21, 2021
@fields
Copy link

fields commented Jun 22, 2021

I am seeing this issue on a fresh install as well, and the install is failing:

#26 6.119 Error: Package: nginx-mod-http-passenger-6.0.9-1.el7.x86_64 (passenger)
#26 6.119            Requires: nginx = 1:1.16.1
#26 6.119            Available: 1:nginx-1.20.1-2.el7.x86_64 (epel)
#26 6.119                nginx = 1:1.20.1-2.el7

@kamrannabi
Copy link

Currently also seeing this issue on CentOS 7.9, with use of puppet-nginx in passenger install mode. Adding the nginx repo to yum finds the correct version but looks like passenger cannot install correctly with error unknown directive "passenger_root" in /etc/nginx/conf.d/passenger.conf:1 in the nginx logs.

@fields
Copy link

fields commented Jun 22, 2021

Is there any sort of workaround for this?

@jannahilferty
Copy link
Author

Is there any sort of workaround for this?

Because I uninstalled nginx/passenger and then tried to reinstall in troubleshooting, I left myself in an unrecoverable state and could only get my site back online by snapshotting/creating an AMI from another server which had not had these packages uninstalled or updated at any point, and creating a new server with that AMI for the affected environment.

@javierbertoli
Copy link

I tried a similar solution to the one proposed by @kamrannabi for the Saltstack's formula.

Using phusionpassenger's repository to install nginx-mod-http-passenger and adding the official nginx repository to get the compatible nginx's version I get the formula installing all the required packages:

[kitchen@9669cb7afeb8 ~]$ rpm -qa|egrep "passe|nginx"
nginx-1.16.1-1.el7.ngx.x86_64
passenger-6.0.9-1.el7.x86_64
nginx-mod-http-passenger-6.0.9-1.el7.x86_64

and the load_module line is added in /etc/nginx/nginx.conf

load_module /usr/lib64/nginx/modules/ngx_http_passenger_module.so;

But nginx fails to start. A check of the config returns the following error

[root@9669cb7afeb8 ~]# nginx -t
nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_passenger_module.so" is not binary compatible in /etc/nginx/nginx.conf:8
nginx: configuration file /etc/nginx/nginx.conf test failed

@kamrannabi
Copy link

Installing via the source tarball looks to possibly work.

@CamJN
Copy link
Contributor

CamJN commented Jun 22, 2021

I just tested this, it looks like epel replaced nginx 1.16.1 with nginx 1.20.1. We'll have to make a new release to fix this. Sorry for the trouble. @kamrannabi is right that the source tarball method should work, as well as the rubygem method. We'll get on making that new release asap.

@fields
Copy link

fields commented Jun 30, 2021

@CamJN thanks, do you have any ETA on when the new build will be available?

myii pushed a commit to myii/ssf-formula that referenced this issue Jul 2, 2021
# [1.283.0](v1.282.0...v1.283.0) (2021-07-02)

### Bug Fixes

* **rst-lint:** fix violations ([2ef7b8c](2ef7b8c))

### Features

* **gemfile.lock:** update `kitchen-docker` revision ([338ed9a](338ed9a))
* **nginx:** disable failing instance until upstream issue resolved ([f638761](f638761)), closes [/github.com/phusion/passenger/issues/2364#issuecomment-866313663](https://github.com//github.com/phusion/passenger/issues/2364/issues/issuecomment-866313663)
* **pre-commit:** add `rst-lint` ([25ce78a](25ce78a))
* **saltimages:** update with latest changes from `salt-image-builder` ([d8310d3](d8310d3))
* **saltimages:** update with latest changes from `salt-image-builder` ([f00ec52](f00ec52))
* **saltimages:** update with latest changes from `salt-image-builder` ([f76e21a](f76e21a))
* **suricata:** disable failing instances ([2bd30f3](2bd30f3))
@fields
Copy link

fields commented Jul 13, 2021

Hi - any update on when this will be ready? I have an automated build process that depends on this, and I'd rather not rebuild it to use the rubygems install if I don't have to.

Thanks!

@CamJN
Copy link
Contributor

CamJN commented Jul 13, 2021

Sorry for the delay, the update is pretty much ready and should be rolling out this week.

@fields
Copy link

fields commented Jul 14, 2021

@CamJN awesome. Thank you!

@CamJN
Copy link
Contributor

CamJN commented Jul 14, 2021

done

@fields
Copy link

fields commented Jul 15, 2021

@CamJN I built a fresh image with this, and it built successfully, but I am still getting this error when starting nginx:

nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/passenger.conf:8

This was installed with:

RUN curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
RUN yum install -y nginx-mod-http-passenger || yum-config-manager --enable cr && yum install -y nginx-mod-http-passenger

Is that still correct?

nginx does not appear to have been compiled with passenger, but I've lost track of whether it's still supposed to be or the module is supposed to be loaded dynamically:

# nginx -V
nginx version: nginx/1.20.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.1.1g FIPS  21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-compat --with-debug --with-file-aio --with-google_perftools_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'

@fields
Copy link

fields commented Jul 16, 2021

Is this still in scope for this ticket or should I open a new one?

@jannahilferty
Copy link
Author

@fields I was able to confirm I am able to update nginx and passenger with yum successfully now, so this may be a new issue. This is the "nginx -V" output for me, just for reference:

nginx version: nginx/1.20.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.1.1g FIPS  21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-compat --with-debug --with-file-aio --with-google_perftools_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'```

@CamJN
Copy link
Contributor

CamJN commented Jul 16, 2021

@fields the config file with the load_module line for the passenger module isn't being included into your nginx config. Can you verify if it exists? Just grep for load_module in your Nginx config directory.

@fields
Copy link

fields commented Jul 16, 2021

I do not have that anywhere. Where is this supposed to come from?

# egrep -ri load_module /etc/nginx/*
#

@CamJN
Copy link
Contributor

CamJN commented Jul 16, 2021

In /etc/nginx/nginx.conf:

include /usr/share/nginx/modules/*.conf;

In /usr/share/nginx/modules/mod-http-passenger.conf:

load_module "/usr/lib64/nginx/modules/ngx_http_passenger_module.so";

myii added a commit to myii/ssf-formula that referenced this issue Jul 17, 2021
This reverts commit f638761.

Issue now resolved and confirmed by testing with Kitchen locally:

* phusion/passenger#2364
@fields
Copy link

fields commented Jul 18, 2021

This is something I'm supposed to add by hand as part of the installation process?

@CamJN
Copy link
Contributor

CamJN commented Jul 18, 2021

No, those files are supposed to be installed by the rpm. If they're missing the installation went wrong. You should review your rpm logs.

@fields
Copy link

fields commented Jul 19, 2021

Oh, I see the problem - the module install edits the existing nginx.conf in-line, but I have a build process that overwrites that with a custom one. This seems to be working now. Thanks for helping track this down!

# nginx
2021/07/19 16:00:31 [notice] 145#145: using the "epoll" event method
[ N 2021-07-19 16:00:31.8294 146/T1 age/Wat/WatchdogMain.cpp:1373 ]: Starting Passenger watchdog...
[ N 2021-07-19 16:00:31.8439 149/T1 age/Cor/CoreMain.cpp:1340 ]: Starting Passenger core...
[ N 2021-07-19 16:00:31.8441 149/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2021-07-19 16:00:31.8666 149/T1 age/Cor/CoreMain.cpp:1015 ]: Passenger core online, PID 149
2021/07/19 16:00:31 [notice] 145#145: nginx/1.20.1
2021/07/19 16:00:31 [notice] 145#145: built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
2021/07/19 16:00:31 [notice] 145#145: OS: Linux 5.10.25-linuxkit
2021/07/19 16:00:31 [notice] 145#145: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2021/07/19 16:00:31 [notice] 145#145: start worker processes
2021/07/19 16:00:31 [notice] 145#145: start worker process 165

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

No branches or pull requests

6 participants