Closed dorijan closed 5 years ago
+1 Doesn't appear to be any 18.04 APT repo for Passenger enterprise currently. When I try switch from "xenial" to "bionic" the whole thing breaks, keys don't match, sources don't exist... I just started upgrading our infra from 14.04 to 18.04, and can't progress much further :-(
cc @FooBarWidget @OnixGH
Is there a solution soon? Else I would have to rework my whole nginx+passenger builder :(
We are planning to release 5.3.0 along with Ubuntu 18.04 packages on Wednesday.
I followed the instructions for Passenger + NGINX on Ubuntu 18.04 LTS (with APT) and it failed the first part of step 2 (configuration files not found). The service didn't seem to get installed, as which nginx
returns nothing and there's no 'nginx' folder in /usr/sbin
. Any ideas?
nginx is a separate package now, you'll have to apt install -y nginx
, it's been a topic of debate whether to add this to the docs.
Thanks, @CamJN, I'd suggest adding it to the docs because I thought I remembered reading somewhere that they'd be packaged together, but it's obviously the NGINX module rather than NGINX itself.
So now it is possible to have Passenger nginx module? I thought that nginx do not support modules like Apache?
So now it is possible to have Passenger nginx module?
Yes, since Passenger 5.0.28.
@FooBarWidget @OnixGH I followed the enterprise install guide (https://www.phusionpassenger.com/library/install/nginx/install/enterprise/bionic/), but when I get to step 3, and run the "apt-get update" command, I get the following:
root@host:/var/lib/apt# apt-get update
Hit:1 http://asia-east1.gce.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://asia-east1.gce.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://asia-east1.gce.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:4 https://apt.datadoghq.com stable InRelease
Hit:5 https://apt.datadoghq.com stable Release
Hit:7 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:8 http://archive.canonical.com/ubuntu bionic InRelease
Ign:9 https://www.phusionpassenger.com/enterprise_apt bionic InRelease
Hit:10 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Hit:11 https://nginx.org/packages/mainline/ubuntu bionic InRelease
Get:12 https://www.phusionpassenger.com/enterprise_apt bionic Release [22.7 kB]
Get:13 https://www.phusionpassenger.com/enterprise_apt bionic Release.gpg [819 B]
Ign:13 https://www.phusionpassenger.com/enterprise_apt bionic Release.gpg
Reading package lists... Done
W: GPG error: https://www.phusionpassenger.com/enterprise_apt bionic Release: The following signatures were invalid: 16378A33A6EF16762922526E561F9B9CAC40B2F7
E: The repository 'https://www.phusionpassenger.com/enterprise_apt bionic Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Usage of apt_auth.conf(5) should be preferred over embedding login information directly in the sources.list(5) entry for 'https://www.phusionpassenger.com/enterprise_apt'
No amount of googling for a solution has fixed this.
Any ideas?
@KieranP on Enterprise it's best to file a support ticket, so we can make sure you get a timely response and situation updates.
In any case we are aware of this particular issue and working on it!
In my case Ubuntu 18.04 ignores /etc/nginx/modules-enabled/ I added single line in file /etc/nginx/nginx.conf
load_module /usr/lib/nginx/modules/ngx_http_passenger_module.so;
In my case Ubuntu 18.04 ignores /etc/nginx/modules-enabled/ I added single line in file /etc/nginx/nginx.conf
load_module /usr/lib/nginx/modules/ngx_http_passenger_module.so;
@aivils T H A N K Y O U !!! I can't count how many hours it took me to configure it.
How are you generating ngx_http_passenger_module.so
?
I get the following error when trying to load that module:
$ sudo nginx -t
nginx: [emerg] dlopen() "/usr/lib/nginx/modules/ngx_http_passenger_module.so" failed (/usr/lib/nginx/modules/ngx_http_passenger_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:4
nginx: configuration file /etc/nginx/nginx.conf test failed
@DaniG2k
install libnginx-mod-http-passenger
and do
if [ ! -f /etc/nginx/modules-enabled/50-mod-http-passenger.conf ]; then sudo ln -s /usr/share/nginx/modules-available/mod-http-passenger.load /etc/nginx/modules-enabled/50-mod-http-passenger.conf ; fi
@synek317 thanks!
I am wondering why the Phusion Passenger docs don't mention adding
load_module /usr/lib/nginx/modules/ngx_http_passenger_module.so;
to /etc/nginx/nginx.conf
as it doesn't seem to work without that directive... 🤔
We don't mention adding that line because in our testing nginx on Ubuntu 18.04 does include the config files from the modules-enabled directory. We do specify to make sure that the passenger conf file is located in that dir, using the command @synek317 mentions.
As to why some users see Nginx on Ubuntu 18.04 ignore /etc/nginx/modules-enabled/ that I don't know, as the nginx available from apt clearly includes that dir (line 4 of /etc/nginx/nginx.conf).
@CamJN I upgraded from an old version of Ubuntu (14? 16? can't remember now) which might explain why? You must've tested on a clean 18 install.
Indeed, if the base nginx config wasn't updated (I believe apt puts the new config files in place with a .dpkg-dist suffix by default) that very well could explain it.
After spending some hours I fixit installing nginx-extras packages:
sudo apt-get install -y nginx-extras
In my case Ubuntu 18.04 ignores /etc/nginx/modules-enabled/ I added single line in file /etc/nginx/nginx.conf
load_module /usr/lib/nginx/modules/ngx_http_passenger_module.so;
@aivils T H A N K Y O U !!! I can't count how many hours it took me to configure it.
@DaniG2k
install
libnginx-mod-http-passenger
and doif [ ! -f /etc/nginx/modules-enabled/50-mod-http-passenger.conf ]; then sudo ln -s /usr/share/nginx/modules-available/mod-http-passenger.load /etc/nginx/modules-enabled/50-mod-http-passenger.conf ; fi
@synek317 This actually works!
Hey folks, I ran into exact same issue with Nginx after I upgraded Ubuntu from 16.04 to 18.04. Since I am not updating production server directly (that would be a suicide), I am testing on image backup instead. After I had this issue I terminated to temp instance that I upgraded to ubuntu 18 with Ngnix problem, and wanted to get a clean upgrade instead. Now I am back to my original instance ubuntu 16.04. But since I see few potential solutions here, I was wondering if there is anything I can do on Nginx level before I can even start ubuntu upgrade in hopes to prevent the Nginx problem and I don’t need to change things around after ubuntu upgrade is done. Basically, I am looking for a clean ubuntu upgrade including Nginx. Thank you.
@MoroccoIT your issue is that we changed approaches to our nginx package when ubuntu started shipping a version of nginx compatible with dynamic modules; that requires that the module be loaded. Ubuntu provides a working config with their nginx package but apt can't safely overwrite your existing nginx config when you upgrade, so that is going to be a manual step.
More broadly, when you upgrade a package you should always look at any config changes that were included but not applied, and apply them yourself if necessary. You can read about how to change apt's behaviour here: https://askubuntu.com/a/104912
For the record, I had to apt-get install libnginx-mod-http-passenger-enterprise
in order to upgrade my passenger to enterprise and get rid of this error:
nginx: [emerg] open() "/etc/nginx/modules-enabled/50-mod-http-passenger.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:7
@gr8bit i'm experiencing the same issues, but I am not an enterprise user, did you make the update because you are an enterprise user?
Same here but with Ubuntu 20.04, every check seems to be OK but when I restart nginx y get
[emerg] unknown directive "passenger_root" in ...
@DaniG2k
install
libnginx-mod-http-passenger
and doif [ ! -f /etc/nginx/modules-enabled/50-mod-http-passenger.conf ]; then sudo ln -s /usr/share/nginx/modules-available/mod-http-passenger.load /etc/nginx/modules-enabled/50-mod-http-passenger.conf ; fi
Thanks, this solution helped me solve this problem.
Same here but with Ubuntu 20.04, every check seems to be OK but when I restart nginx y get
[emerg] unknown directive "passenger_root" in ...
how do you fixed this error?
Hi, I am trying to install Passenger + Nginx on ubuntu 18.04, and it seems it install successfully, but it does not work, I got error directive "passenger_enabled" in /etc/nginx/sites-enabled/default
Whole debug info is here