VirtuBox/nginx-ee

Ubuntu + Plesk 18 fresh install error

Closed this issue ยท 21 comments

Rar9 commented

Hi just install ubuntu with latest plesk.

##################################
Compilation summary
##################################

Detected OS : Ubuntu 18.04.3 LTS
Detected Arch : x86_64

  • Nginx release : 1.17.5

  • OPENSSL : 1.1.1d Stable

  • Dynamic modules YES

  • Pagespeed : beta

  • Naxsi : YES

  • RTMP : NO

  • Plesk : YES

    Installing dependencies [OK]
    Installing gcc-8 [OK]
    Downloading additionals modules [OK]
    Downloading zlib [OK]
    Downloading brotli [OK]
    Downloading naxsi [OK]
    Downloading pagespeed [OK]
    Downloading nginx [OK]
    Applying nginx patches [OK]
    Configuring nginx [FAIL] [..]

    Please look at /tmp/nginx-ee.log

root@server ~ # nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@server ~ # nginx -V
nginx version: nginx/1.16.1

Here the last line of log:

  • ngx_brotli was configured
    configuring additional dynamic modules
    adding module in ../srcache-nginx-module
  • ngx_http_srcache_filter_module was configured
    adding module in ../ngx_http_redis
    ./configure: error: no ../ngx_http_redis/config was found
Rar9 commented

Of before I tried to select opennssl 3 dev but download failed as well...above got a bit further

Also would i need to remove plesk nginx first?

Rar9 commented

sorry but what does this new status mean?
fixed in next release investigating ??

Issue has been fixed in the last release (v3.6.5).

Rar9 commented

Man u are FAST :-)

Unfortunately there seams to be a verison mismatch of ngx_http_passenger_module .......

2019-11-18 16:19:48 (88.2 MB/s) - โ€˜/etc/cron.daily/nginx-eeโ€™ saved [2628/2628]

   Installing Nginx-ee Cronjob            [OK]
   Performing final steps                 [OK]
   Checking nginx configuration           [FAIL]
   Nginx-ee was compiled successfully but there is an error in your nginx configuration

Please look at /tmp/nginx-ee.log or use the command nginx -t to find the issue

Give Nginx-ee a GitHub star : https://github.com/VirtuBox/nginx-ee
root@server ~ # nginx -t
nginx: [emerg] module "/usr/share/nginx/modules/ngx_http_passenger_module.so" version 1016001 instead of 1017005 in /etc/nginx/modules.conf.d/ngx_http_passenger_module.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

Nginx-ee do not include ngx_http_passenger_module. So I do not understand the Nginx error related to passenger module version...
But I'm going to check if I can integrate it easily.

Yes, thanks for the link

Rar9 commented

I really need nginx to compile right, so im hoping for a quick miricle from your side

But do you absolutely need passenger ? Otherwise, just disable it

Rar9 commented

Its a default new fresh plesk install.
i dont even know what passenger does, but it must be there for a reason.

Rar9 commented

I check under upgrades: Passanger module is not enabled :-(
image

yeah because it leave a trace where it tell you like:

/etc/nginx/modules.conf.d/
/usr/share/nginx/modules/

delete the phusion passenger module at both place and it should work nicely after that i had the same problem :)

Rar9 commented

Thanks, will can check....but as said passengers module was never enabled, as sever was installed fresh.

yeah but plesk seem to install it or prepare the server for it

Rar9 commented

So I can delete /etc/nginx/modules.conf.d/ngx_http_passenger_module.conf

/Usr does not have any passage file.

yes, it will not load the module this way.

Rar9 commented

not helping to much...

root@server ~ # nginx -t
nginx: [emerg] module "/usr/share/nginx/modules/ngx_http_passenger_module.so" version 1016001 instead of 1017006 in /etc/nginx/modules.conf.d/ngx_http_passenger_module.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
root@server ~ # rm -rf /usr/share/nginx/modules/ngx_http_passenger_module.so
root@server ~ # rm -rf /etc/nginx/modules.conf.d/ngx_http_passenger_module.conf
root@server ~ # nginx -t
nginx: [emerg] module "ngx_pagespeed" is already loaded in /etc/nginx/modules.conf.d/ngx_pagespeed.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
root@server ~ # rm -rf /etc/nginx/modules.conf.d/ngx_pagespeed.conf
root@server ~ # nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@server ~ # service nginx restart
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
root@server ~ # nginx -v
nginx version: nginx/1.17.6 (VirtuBox Nginx-ee)
root@server ~ # systemctl status nginx.service
โ— nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-11-22 07:57:36 CET; 29s ago
Process: 4851 ExecStartPre=/usr/bin/test ${NGINX_ENABLED} = yes (code=exited, status=1/FAILURE)

Nov 22 07:57:36 server.asset-trade.de systemd[1]: Starting Startup script for nginx service...
Nov 22 07:57:36 server.asset-trade.de systemd[1]: nginx.service: Control process exited, code=exited status=1
Nov 22 07:57:36 server.asset-trade.de systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 22 07:57:36 server.asset-trade.de systemd[1]: Failed to start Startup script for nginx service.

Remove all files from /etc/nginx/modules.conf.d/

Rar9 commented

Hi Today plesk updated some stuff and i again have newly created file @ /etc/nginx/modules.conf.d/

nginx -t
nginx: [emerg] module "ngx_http_auth_pam_module" is already loaded in /etc/nginx/modules.conf.d/ngx_http_auth_pam_module.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

lrwxrwxrwx 1 root root 60 Jan 2 15:52 ngx_http_auth_pam_module.conf -> /etc/nginx/modules.available.d/ngx_http_auth_pam_module.load
lrwxrwxrwx 1 root root 56 Jan 2 15:52 ngx_http_memc_module.conf -> /etc/nginx/modules.available.d/ngx_http_memc_module.load
lrwxrwxrwx 1 root root 58 Jan 2 15:52 ngx_http_redis2_module.conf -> /etc/nginx/modules.available.d/ngx_http_redis2_module.load
lrwxrwxrwx 1 root root 57 Jan 2 15:52 ngx_http_redis_module.conf -> /etc/nginx/modules.available.d/ngx_http_redis_module.load
lrwxrwxrwx 1 root root 66 Jan 2 15:52 ngx_http_srcache_filter_module.conf -> /etc/nginx/modules.available.d/ngx_http_srcache_filter_module.load
lrwxrwxrwx 1 root root 54 Jan 2 15:52 ngx_ipscrub_module.conf -> /etc/nginx/modules.available.d/ngx_ipscrub_module.load

If i remove Nginx -t says all is good again.

Why is this error actually happeing?

The Webserver Configurations Troubleshooter still complains if i restart apache/nginx

Error: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] module "ngx_http_auth_pam_module" is already loaded in /etc/nginx/modules.conf.d/ngx_http_auth_pam_module.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed. Search in KB

Rar9 commented

Hi I updated today again to 1.1.8 nginx and get the same error

Nginx-ee was compiled successfully but there is an error in your nginx configuration

nginx -t
nginx: [emerg] module "ngx_pagespeed" is already loaded in /etc/nginx/modules.conf.d/ngx_pagespeed.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

rm -rf /etc/nginx/modules.conf.d/ngx_pagespeed.conf
resolved this

Rar9 commented

hello,
I have a problem that after updating to 1.1.8 version , when plesk updated something that i go back to 1.1.17 how can this be?

Then these files i deleted get recreated
]/etc/nginx/modules.conf.d $ ll
total 16
drwxr-xr-x 2 root root 4096 May 13 11:51 ./
drwxr-xr-x 6 root root 4096 May 15 09:28 ../
lrwxrwxrwx 1 root root 60 May 13 11:50 ngx_http_auth_pam_module.conf -> /etc/nginx/modules.available.d/ngx_http_auth_pam_module.load
lrwxrwxrwx 1 root root 56 May 13 11:50 ngx_http_memc_module.conf -> /etc/nginx/modules.available.d/ngx_http_memc_module.load
lrwxrwxrwx 1 root root 58 May 13 11:50 ngx_http_redis2_module.conf -> /etc/nginx/modules.available.d/ngx_http_redis2_module.load
lrwxrwxrwx 1 root root 57 May 13 11:50 ngx_http_redis_module.conf -> /etc/nginx/modules.available.d/ngx_http_redis_module.load
lrwxrwxrwx 1 root root 66 May 13 11:50 ngx_http_srcache_filter_module.conf -> /etc/nginx/modules.available.d/ngx_http_srcache_filter_module.load
lrwxrwxrwx 1 root root 54 May 13 11:50 ngx_ipscrub_module.conf -> /etc/nginx/modules.available.d/ngx_ipscrub_module.load