Francis Daly
July 02, 2020 09:06AM
On Wed, Jul 01, 2020 at 08:55:13AM +0200, evald ibrahimi wrote:

Hi there,

I don't have answers for you; but possibly you'll be able to provide
more information that will help someone to help you.

> I'm using nginx 1.19.0 with ModSec on Centos 7. The other day it
> happened twice that nginx was stopped. No idea what could cause the
> issue but i found on the error.log the following:

If unexpected things happen repeatedly, it can be useful to see if there
is a pattern that causes them to happen.

From your normal logs, was there anything usual that happened shortly
before things stopped, that did not happen at other times?

> 2020/06/29 17:23:39 [alert] 1890#1890: sendmsg() failed (9: Bad file descriptor)

That (I think) usually means that something has gone wrong already --
a file or socket that nginx thinks it should have access to, is not
accessible. (That might be a "real" file that has changed; or it might
be due to a coding bug.)

> 2020/06/29 17:24:28 [alert] 1890#1890: fork() failed while spawning
> "worker process" (12: Cannot allocate memory)

That means that your operating system was unwilling to give nginx the
extra memory it asked for. It might be a resource problem on your system,
or it might be a consequence of the previous problem.

> 2020/06/29 18:10:35 [notice] 2461#2461: ModSecurity-nginx v1.0.1
> (rules loaded inline/local/remote: 0/19826/0)

That possibly means that nginx has just started.

> 2020/06/29 18:10:35 [emerg] 2461#2461: bind() to 0.0.0.0:443 failed
> (98: Address already in use)
> 2020/06/29 18:10:35 [emerg] 2461#2461: bind() to 0.0.0.0:80 failed
> (98: Address already in use)

And they mean that nginx can't start fully, because something else is
already running where nginx wants to. (Possibly a previous nginx which
has not fully shut down.)


"nginx -V" is usually very helpful for people to see what versions of what
code you are using. Often third-party modules written for one version of
nginx and used with another version of nginx, can lead to subtle problems.

ModSecurity-nginx is, I think, not a stock-nginx module. What other
modules are you using?


Often the nginx config can help identify a problem too; it is not clear
to me if that will help in this case.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Found Nginx 1.19.0 stopped but no idea what happened

Evald80 July 01, 2020 02:56AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Evald80 July 02, 2020 08:28AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Francis Daly July 02, 2020 09:06AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

J.R. July 02, 2020 09:56AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Evald80 July 02, 2020 12:17PM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Evald80 July 06, 2020 04:17AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Francis Daly July 07, 2020 11:54AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Evald80 July 08, 2020 06:10AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Francis Daly July 09, 2020 01:04PM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Evald80 July 13, 2020 03:19AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Evald80 July 15, 2020 07:56AM

Re: Found Nginx 1.19.0 stopped but no idea what happened

Evald80 August 03, 2020 05:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready