Не запустился nginx при старте OpnenVZ контейнера

Gena Makhomed gmm на csdoc.com
Чт Дек 24 22:03:21 UTC 2015


Здравствуйте!

Не запустился nginx при старте OpenVZ контейнера.

Из-за "Starting LSB: Bring up/down networking..."

Возможно этот баг не специфичен для OpenVZ.

Как решить проблему?

Пакет с официального сайта:

# rpm -q nginx
nginx-1.9.9-1.el7.ngx.x86_64

# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

# uname -a
Linux hroniky-com 2.6.32-042stab112.15 #1 SMP Tue Oct 20 17:22:56 MSK 
2015 x86_64 x86_64 x86_64 GNU/Linux

# cat /var/log/messages

Dec 24 18:55:14 hroniky-com systemd: Starting Sockets.
Dec 24 18:55:14 hroniky-com systemd: Reached target Basic System.
Dec 24 18:55:14 hroniky-com systemd: Starting Basic System.
Dec 24 18:55:14 hroniky-com systemd: Started D-Bus System Message Bus.
Dec 24 18:55:14 hroniky-com systemd: Starting D-Bus System Message Bus...
Dec 24 18:55:14 hroniky-com systemd: Starting Permit User Sessions...
Dec 24 18:55:14 hroniky-com systemd: Starting Postfix Mail Transport 
Agent...
Dec 24 18:55:14 hroniky-com systemd: Started OpenSSH Server Key Generation.
Dec 24 18:55:14 hroniky-com systemd: Starting /etc/rc.d/rc.local 
Compatibility...
Dec 24 18:55:15 hroniky-com systemd: Starting nginx - high performance 
web server...
Dec 24 18:55:18 hroniky-com systemd: Starting System Logging Service...
Dec 24 18:55:18 hroniky-com systemd: Starting LSB: Bring up/down 
networking...
Dec 24 18:55:18 hroniky-com nginx: nginx: the configuration file 
/etc/nginx/nginx.conf syntax is ok
Dec 24 18:55:18 hroniky-com nginx: nginx: [emerg] bind() to 
172.23.23.161:80 failed (99: Cannot assign requested address)
Dec 24 18:55:18 hroniky-com nginx: nginx: configuration file 
/etc/nginx/nginx.conf test failed
Dec 24 18:55:18 hroniky-com systemd: Starting The PHP FastCGI Process 
Manager...
Dec 24 18:55:18 hroniky-com systemd: Started OpenSSH server daemon.
Dec 24 18:55:18 hroniky-com systemd: Starting OpenSSH server daemon...
Dec 24 18:55:18 hroniky-com systemd: Starting Login Service...
Dec 24 18:55:18 hroniky-com systemd: Starting Dump dmesg to 
/var/log/dmesg...
Dec 24 18:55:18 hroniky-com systemd: Started Permit User Sessions.
Dec 24 18:55:18 hroniky-com systemd: Started /etc/rc.d/rc.local 
Compatibility.
Dec 24 18:55:18 hroniky-com systemd: nginx.service: control process 
exited, code=exited status=1
Dec 24 18:55:18 hroniky-com systemd: Failed to start nginx - high 
performance web server.
Dec 24 18:55:18 hroniky-com systemd: Unit nginx.service entered failed 
state.
Dec 24 18:55:18 hroniky-com systemd: nginx.service failed.


# cat /etc/systemd/system/multi-user.target.wants/nginx.service
[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target

-- 
Best regards,
  Gena



Подробная информация о списке рассылки nginx-ru