New template network/ssh down

We just made aware that the new LXC plan template and some new openvz plans, the network/sshd may fail to start after reboot/stop/start vps, we see it happening only on Centos templates and some debian on new openvz plans.


NOTE:
1. This seems to happen only on OpenVZ template(s) that's used on LXC/new openvz plans, like Cenots 6/7 or debian. All other LXC templates are now made for LXC so should not be this issue.
2. And if you're on LXC with Centos, make sure to also fix allocate pty issue.


So if you notice your IP not ping, and you have not made any changes, first thing to do is to start network by following these steps:

1. Login to our web panel and click NoVNC Console

2. login as root and type

service network restart (for centos) or
/etc/init.d/networking restart (for debian) or
ifdown venet0:0 && ifup venet0:0 or ifdown eth0 && ifup eth0 (for ubuntu)

If you made some changes, we also notice that the firewall/iptables can cause it.

If you cannot ssh, try to restart ssh service via command:

service sshd restart (for centos)
/etc/init.d/ssh restart or service ssh restart (for debian/ubuntu)

NOTE: On Fedora, SSH Server is not installed yet so you need to install it first via command below (need 128MB ram or more) yum install openssh-server

HINT: To make it restart network/sshd automatically after each reboot, try modify /etc/rc.d/rc.local file on Centos and add these lines below to the file service network restart service sshd restart

IMPORTANT: If you're seeing IP conflict issue on your centos templates, to fix it, ou need to disable arping on the network start, below is info for centos 6, other centos version maybe different

"service network restart" calls the script "/etc/sysconfig/network-scripts/ifup-eth". In the script, around line 254, you will see it use the command "arping -c 2 -w 3 -D -I ". As a workaround, you can comment out the line, "arping -c 2 -w 3 -D -I " AND all 3 lines below it. With these 4 lines commented, "service network restart" will work.

[root@CTXXX ~]# service network restart
Restarting network (via systemctl): [ OK ]

這篇文章有幫助嗎?

 列印本文

Also Read

How to setup OpenVPN on Ubuntu 14.04

Please see https://help.ubuntu.com/14.04/serverguide/openvpn.html

How to add Extra IP(s) on Linux

IMPORTANT: There seems to be issues with more than 1 IP on Ubuntu, we've so far only figured out...

Difference between OpenVZ and LXC

OpenVZ OpenVZ is a Linux container solution. It was first released in 2005 by SWSoft, now known...

"Server refused to allocate pty" on New LXC template(s)

NOTE: This seems to happen only on OpenVZ template(s) that's used on LXC, like Cenots 6 32-bit....

How to use Debian 8 OpenVPN

If you selected this New OpenVZ template, you just need to SSH to your assigned IP and login as...