27
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ゲストCentOS7で外部と通信できない場合NetworkManagerを疑うこと

Last updated at Posted at 2015-05-29

OpenVZゲストにCentOS7を使うとなぜかIPが活性化しない。

ip コマンドでもだめ

ip addr add 192.168.1.4/24 dev venet0
ip route add default via 192.168.1.1

IPは付与されるが他と通信できない。

systemctl restart network してもダメ

# systemctl status network
network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: failed (Result: exit-code) since 金 2015-05-29 13:30:03 JST; 18s ago
  Process: 1028 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

 5月 29 13:30:03 c7.vz network[1028]: RTNETLINK answers: File exists
 5月 29 13:30:03 c7.vz network[1028]: RTNETLINK answers: File exists
 5月 29 13:30:03 c7.vz network[1028]: RTNETLINK answers: File exists
 5月 29 13:30:03 c7.vz network[1028]: RTNETLINK answers: File exists
 5月 29 13:30:03 c7.vz network[1028]: RTNETLINK answers: File exists
 5月 29 13:30:03 c7.vz systemd-sysctl[1179]: Failed to write '16' to '/proc/sys/kernel/sysrq': Permission denied
 5月 29 13:30:03 c7.vz systemd-sysctl[1179]: Failed to write '1' to '/proc/sys/kernel/core_uses_pid': Permission denied
 5月 29 13:30:03 c7.vz systemd[1]: network.service: control process exited, code=exited status=1
 5月 29 13:30:03 c7.vz systemd[1]: Failed to start LSB: Bring up/down networking.
 5月 29 13:30:03 c7.vz systemd[1]: Unit network.service entered failed state.
# /etc/init.d/network restart
Restarting network (via systemctl):  Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
                                  [失敗]

調査

# ifup venet0
エラー: 接続 'System venet0'用のデバイスが見つかりません.
# LANG=C ifup venet0
Error: no device found for connection 'System venet0'.

ググると出てきた。

NetworkManagerが原因
# service NetworkManager stop
# chkconfig NetworkManager off

# /etc/init.d/network restart
Restarting network (via systemctl):                        [  OK  ]

外部と通信できるようになった。

27
26
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
27
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?