Nginx Website Failed After 7.10.0 Update

We have tried to reproduce the problem, and failed thus far, but we’re still trying. If you’re unhappy with Virtualmin and the decades we’ve put into building it for you (for free) and the support we provide here (for free), you’re welcome to not use it.

5 Likes

I am also having issues after the update. Nginx will not restart.

“Failed to start Nginx : Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xeu nginx.service” for details.”

 start job for unit nginx.service has begun execution.
░░
░░ The job identifier is 143.
Mar 31 01:02:17 host5 nginx[892]: nginx: [emerg] bind() to [2604:180:f4::30d]:443 failed (99: Unknown error)
Mar 31 01:02:17 host5 nginx[892]: nginx: configuration file /etc/nginx/nginx.conf test failed
Mar 31 01:02:17 host5 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStartPre= process belonging to unit nginx.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
Mar 31 01:02:17 host5 systemd[1]: nginx.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit nginx.service has entered the ‘failed’ state with result ‘exit-code’.
Mar 31 01:02:17 host5 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
░░ Subject: A start job for unit nginx.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit nginx.service has finished with a failure.
░░
░░ The job identifier is 143 and the job result is failed.
Mar 31 02:58:19 host5 systemd[1]: Starting A high performance web server and a reverse proxy server...
░░ Subject: A start job for unit nginx.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░

nginx -t output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

One line in /var/log/nginx/error.log:

2024/03/30 11:32:26 [emerg] 931#931: bind() to [2604:180:f4::30d]:443 failed (99: Unknown error)

Well, my Nginx is broken, but I have nothing but gratitude for Virtualmin! I’m always amazed how much complexity is handled seamlessly with the script. Problems are exceptions rather than the rule.

Joe - I would be happy to give you access to my server if it would help you find the issue.

I don’t see how that could be related to a Virtualmin update.

Is there anything in the nginx log?

I posted one entry from the error.log above. Since then there is more:

2024/03/31 17:36:16 [emerg] 6308#6308: open() "/usr/share/nginx/abstractionengineering.com.conf" failed (2: No such file or directory)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:42:44 [emerg] 8061#8061: still could not bind()
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 17:49:36 [emerg] 9682#9682: still could not bind()
2024/03/31 18:15:45 [emerg] 870#870: bind() to [2604:180:f4::30d]:443 failed (99: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:16:40 [emerg] 1790#1790: still could not bind()
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to 0.0.0.0:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: bind() to [::]:80 failed (98: Unknown error)
2024/03/31 18:17:01 [emerg] 2057#2057: still could not bind()

You can see at the top that it is complaining that there is no conf in /usr/share/nginx.

Why is it expecting to the the conf there, rather than /etc/nginx/sites-available?

No changes were made to any of the sites or configs, other than installing the updates.

You have a different problem than OP.

I think you should make a new topic with this details. But, obviously this is wrong:

Config files don’t go in /usr/share (and Virtualmin certainly doesn’t put them there, unless configured to do so).

Thanks, I’ll start a new thread

I received this error too but unable to get any meaningful info currently. I’ll try to debug it this evening but anyway I would be happy to give @Joe or @Ilia my server access.

That looks like a completely different problem. There was nothing reported about Nginx not starting (or starting and then exiting with an error in the OP)

I would concentrate on what you are asking nginx (your webserver) to do. have you got a website that you are asking it to serve up or have you not reached that point yet?

For my error that relates to…

.. Nginx website failed! : virtualmin-nginx::feature_setup failed : virtualmin-nginx::feature_add_web_webmail_redirect failed : flush_file_lines called on non-loaded file /etc/nginx/conf.d//domain*******.dev.conf ../web-lib-funcs.pl (line 3867)
 ../web-lib-funcs.pl (line 4208)
 ../web-lib-funcs.pl (line 4208)

I do yum downgrade wbm-virtualmin-nginx to downgrade from 2.35-1 to 2.32-1. this solves my issue. I don’t even need to downgrade virtualmin.

Yes, it is a different issue, so I started a new thread. I have 10 sites that have been up for a few years.

When updating, you may encounter errors!

For example:
Recently when updating Nginx through Virtualmin’s updater, the entire website became inaccessible.
After researching, I learned that the nginx configuration for each website needs to be changed, specifically:

listen 139.180.xxx.xxx:443 ssl http2;

Change into:

listen 139.180.xxx.xxx:443 ssl;
http2 enabled;

So be careful when updating, you may feel extreme pain with this action! :slight_smile:

the problem persist on here, I’m on the latest virtualmin with all the update.
when I add an new virtual server I get

.. Nginx website failed! : virtualmin-nginx::feature_setup failed : virtualmin-nginx::feature_add_web_webmail_redirect failed : flush_file_lines called on non-loaded file /etc/nginx/sites-available/domain.com.conf 

I think this is another one of those:

Did you restart nginx? the error looks like a configuration error (not loaded)

It is NOT a new issue; it’s the same one as the OP.

BTW, I just installed a fresh Virtualmin on a fresh Debian 12 install on a new VPS. Everything is new, and on the first virtual server creation, I get this same error.

Update: The only workaround I could find is, after I create a virtual server and get this error, I go to the Nginx server configuration module on the Webmin side and delete the newly created virtual host. Now, I can go back to ‘Edit Virtual Server’ on the Virtualmin side and activate ‘Nginx website enabled.’ This time it’s created without an issue.

Again, this is on a fresh Virtualmin install. This should be fixed with an update.

Infinite thanks to the team behind Virtualmin.

for me that sounds like an error in the sites-available .conf (or more specifically the one for that domain) if you use the editor and select the “test new configuration before saving” on the file (simply add a blank line as a test) does it save without errors.

I am assuming the server is running ok.

  • there are quite a few .conf files on nginx - for some reason it appears to be not loading the new VS domain in this case.

I have tested on my VM (different OS - Ubuntu 24) and it works fine so perhaps a Debian 12 issue.

“test new configuration before saving” on the file (simply add a blank line as a test) does it save without errors.

It saves without errors.

It’s not specific to a domain. I tested adding a random, non-existing new virtual host, and it produces the same error.

The server is running flawlessly besides this.

update : Still trying to solve this, with no success.

When the problem arises, it indicates the error is in web-lib-funcs.pl (line 3882). Now I tried to install a new Virtualmin on CentOS 7 to compare, to see if it’s specific to Debian 12. So on a FRESH CentOS 7 VPS, the install script almost failed:

[16/18] Configuring Webmin                                              [  ✔  ]
[17/18] Configuring Postfix                                             [  ✔  ]
[18/18] Configuring Virtualmin                                          ▒▒▒▒▒▒▒[27/Apr/2024:09:44:39 +0000] Failed to open /etc/usermin/file/config for writing : No such file or directory web-lib-funcs.pl (line 10455)
Error
-----
Failed to open /etc/usermin/file/config for writing : No such file or directory web-lib-funcs.pl (line 10455)
-----
▣▣▣ Cleaning up

[SUCCESS] Installation Complete!

I’m still experiencing an issue with the web-lib-funcs.pl file.

Any ideas, folks?

I can provide SSH/Webmin access to my server if needed.

that is looking like there is something different happening (needs someone who knows what is going on in that file)

What do you mean “still”? This is a completely different error in a completely different module. Nothing to do with nginx at all.

Please don’t hijack topics, open your own about new issues.

https://forum.virtualmin.com/guidelines