[Users] "Starting LSB: Bring up/down networking..."

Gena Makhomed gmm at csdoc.com
Mon Dec 28 03:08:03 PST 2015


On 25.12.2015 13:21, Gena Makhomed wrote:

> Sorry, this bug is not related to OpenVZ.

Sorry, I am wrong, and looks like this bug related to OpenVZ.

Second container with CentOS 7.2 + nginx 1.9.9 from official repo
and some result - nginx is down after reboot and errors in log.

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
and nginx failed because network interface is not available:

# cat /var/log/messages

Dec 27 19:08:38 stage-ideil-com systemd: Starting nginx - high 
performance web server...
Dec 27 19:08:39 stage-ideil-com systemd: Starting System Logging Service...
Dec 27 19:08:39 stage-ideil-com systemd: Starting LSB: Bring up/down 
networking...
Dec 27 19:08:39 stage-ideil-com systemd: Starting Postfix Mail Transport 
Agent...
[...]
Dec 27 19:09:24 stage-ideil-com systemd: nginx.service: control process 
exited, code=exited status=1
Dec 27 19:09:24 stage-ideil-com systemd: Failed to start nginx - high 
performance web server.
Dec 27 19:09:24 stage-ideil-com systemd: Unit nginx.service entered 
failed state.
Dec 27 19:09:24 stage-ideil-com systemd: nginx.service failed.
Dec 27 19:09:24 stage-ideil-com systemd-sysctl: Failed to write '16' to 
'/proc/sys/kernel/sysrq': Permission denied
Dec 27 19:09:24 stage-ideil-com systemd-sysctl: Failed to write '1' to 
'/proc/sys/kernel/core_uses_pid': Permission denied
 >Dec 27 19:09:24 stage-ideil-com systemd: Started LSB: Bring up/down 
networking.
 >Dec 27 19:09:24 stage-ideil-com systemd: Reached target Network is Online.
 >Dec 27 19:09:24 stage-ideil-com systemd: Starting Network is Online.
Dec 27 19:09:24 stage-ideil-com systemd: Started The PHP FastCGI Process 
Manager.
 >Dec 27 19:09:24 stage-ideil-com nginx: nginx: the configuration file 
/etc/nginx/nginx.conf syntax is ok
 >Dec 27 19:09:24 stage-ideil-com nginx: nginx: [emerg] bind() to 
172.22.22.202:80 failed (99: Cannot assign requested address)
 >Dec 27 19:09:24 stage-ideil-com nginx: nginx: configuration file 
/etc/nginx/nginx.conf test failed
 >Dec 27 19:09:24 stage-ideil-com network: Bringing up loopback 
interface:  [  OK  ]
 >Dec 27 19:09:25 stage-ideil-com network: Bringing up interface venet0: 
  arping: Device venet0 not available.
 >Dec 27 19:09:25 stage-ideil-com network: [  OK  ]

after manually "systemd start nginx" all works fine.
also all works fine in other containers, not CentOS 7.2

# 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


More information about the Users mailing list