1

Topic: dist-upgrade failing with nginx

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 OPENLDAP edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: "Ubuntu" VERSION="20.10 (Groovy Gorilla)"
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I am having an issue with nginx all of a sudden..

I am seeing this when attempting to dist-upgrade:

sudo apt dist-upgrade                                                                                                                               ─╯


Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nginx-core (1.18.0-6ubuntu2.2) ...
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2021-06-08 09:17:44 PDT; 19ms ago
       Docs: man:nginx(8)
    Process: 246781 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jun 08 09:17:44 mail systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 08 09:17:44 mail nginx[246781]: nginx: [emerg] socket() [::]:443 failed (97: Unknown error)
Jun 08 09:17:44 mail nginx[246781]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 08 09:17:44 mail systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 08 09:17:44 mail systemd[1]: nginx.service: Failed with result 'exit-code'.
Jun 08 09:17:44 mail systemd[1]: Failed to start A high performance web server and a reverse proxy server.
dpkg: error processing package nginx-core (--configure):
installed nginx-core package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nginx-full:
nginx-full depends on nginx-core (>= 1.18.0-6ubuntu2.2); however:
  Package nginx-core is not configured yet.
nginx-full depends on nginx-core (<< 1.18.0-6ubuntu2.2.1~); however:
  Package nginx-core is not configured yet.

dpkg: error processing package nginx-full (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-core (<< 1.18.0-6ubuntu2.2.1~) | nginx-full (<< 1.18.0-6ubuntu2.2.1~) | nginx-light (<< 1.18.0-6ubuntu2.2.1~) | nginx-extras (<< 1.18.0-6ubuntu2.2.1~); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
nginx depends on nginNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                                No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                x-core (>= 1.18.0-6ubuntu2.2) | nginx-full (>= 1.18.0-6ubuntu2.2) | nginx-light (>= 1.18.0-6ubuntu2.2) | nginx-extras (>= 1.18.0-6ubuntu2.2); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not configured yet.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
nginx-core
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)





sudo journalctl -f                                                                                                                                  ─╯

Jun 08 09:17:40 mail sudo[246728]:      vic : TTY=pts/1 ; PWD=/home/vic ; USER=root ; COMMAND=/usr/bin/apt dist-upgrade
Jun 08 09:17:40 mail sudo[246728]: pam_unix(sudo:session): session opened for user root by vic(uid=0)
Jun 08 09:17:44 mail systemd[1]: Reloading.
Jun 08 09:17:44 mail systemd[1]: /lib/systemd/system/dbus.service:12: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
Jun 08 09:17:44 mail systemd[1]: Binding to IPv6 address not available since kernel does not support IPv6.
Jun 08 09:17:44 mail systemd[1]: Binding to IPv6 address not available since kernel does not support IPv6.
Jun 08 09:17:44 mail systemd[1]: /lib/systemd/system/clamav-freshclam.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Jun 08 09:17:44 mail systemd[1]: /lib/systemd/system/clamav-daemon.service:12: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Jun 08 09:17:44 mail systemd[1]: /lib/systemd/system/plymouth-start.service:17: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
Jun 08 09:17:44 mail systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 08 09:17:44 mail nginx[246781]: nginx: [emerg] socket() [::]:443 failed (97: Unknown error)
Jun 08 09:17:44 mail nginx[246781]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 08 09:17:44 mail systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 08 09:17:44 mail systemd[1]: nginx.service: Failed with result 'exit-code'.
Jun 08 09:17:44 mail systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Jun 08 09:17:45 mail sudo[246728]: pam_unix(sudo:session): session closed for user root
^C

---------------

systemctl status nginx                                                                                                                              ─╯
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2021-06-08 09:17:44 PDT; 6min ago
       Docs: man:nginx(8)
    Process: 246781 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jun 08 09:17:44 mail systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 08 09:17:44 mail nginx[246781]: nginx: [emerg] socket() [::]:443 failed (97: Unknown error)
Jun 08 09:17:44 mail nginx[246781]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 08 09:17:44 mail systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 08 09:17:44 mail systemd[1]: nginx.service: Failed with result 'exit-code'.
Jun 08 09:17:44 mail systemd[1]: Failed to start A high performance web server and a reverse proxy server.
---

cat /etc/nginx/nginx.conf       

user www-data;
worker_processes 1;
pid /var/run/nginx.pid;

events {
    worker_connections 1024;
}

Would disable ipv6 be causing a conflict?



http {
    include /etc/nginx/conf-enabled/*.conf;
    include /etc/nginx/sites-enabled/*.conf;
}

2

Re: dist-upgrade failing with nginx

Close this.. fixed..