usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.6k stars 613 forks source link

Cyberpanel Installer hangs on "SWAP set..." and breaks the host networking. #711

Open neevalex opened 3 years ago

neevalex commented 3 years ago

Setup

swissmade.host VPS 4gb \ 2cores Ubuntu 18.04 fresh install.

Process

apt update apt upgrade sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh) (no matter what install options do i choose result stays the same.)

After some time installer hangs on Swap step, like this: https://i.gyazo.com/e1958286278314bd6dc76248e3f11164.jpg

Fetching files from https://github.com/usmannasir/cyberpanel.git...

Cloning into 'cyberpanel'...
remote: Enumerating objects: 25928, done.
remote: Counting objects: 100% (2002/2002), done.
remote: Compressing objects: 100% (714/714), done.
remote: Total 25928 (delta 1294), reused 1878 (delta 1205), pack-reused 23926
Receiving objects: 100% (25928/25928), 362.16 MiB | 22.03 MiB/s, done.
Resolving deltas: 100% (16575/16575), done.
Checking out files: 100% (4323/4323), done.

CyberPanel source code downloaded...

Branch 'v2.1.1' set up to track remote branch 'v2.1.1' from 'origin'.
Switched to a new branch 'v2.1.1'
/root
Setting up swapspace version 1, size = 2 GiB (2140139520 bytes)
no label, UUID=43ff57fb-787e-4221-b6c4-23f7f5d3172c
/cyberpanel.swap swap swap sw 0 0
vm.swappiness = 10

SWAP set...

I have waited for an hour, and checked top, it does not seems to be doing anything

Network

By some strange reason after i run this script the host are no longer sending any outgoing connections. ie. i can ssh to the server without any issues, but any outgoing stuff like ping/apt update/wget etc does not work. (getting timeouts) the network settings looks fine for me, UFW\any other firewalls are not active, iptables flushed, and there is no host-level firewall or something ( also everything was completely fine before the install ). Also it'snot the nameservers since i can not even ping the 8.8.8.8 etc.

Any ideas, suggestions?

qtwrk commented 3 years ago

is it OpenVZ or LXC server ?

neevalex commented 3 years ago

is it OpenVZ or LXC server ? Not sure how to determine this but it seems to use VMware virtualization. Hope this will help you.

dmidecode -s system-product-name VMware Virtual Platform

systemd-detect-virt vmware

sudo lshw -class system

holidays                    
    description: Computer
    product: VMware Virtual Platform
    vendor: VMware, Inc.
    version: None
    serial: VMware-42 3f 96 a9 c8 fc 2f 1c-3f 1d 40 b4 45 67 f7 ce
    width: 64 bits
    capabilities: smbios-2.4 dmi-2.4 smp vsyscall32
    configuration: administrator_password=enabled boot=normal frontpanel_password=unknown keyboard_password=unknown power-on_password=disabled uuid=423F96A9-C8FC-2F1C-3F1D-40B44567F7CE
  *-remoteaccess UNCLAIMED
       vendor: Intel
       physical id: 1
       capabilities: inbound
qtwrk commented 3 years ago

try

curl --silent -o cyberpanel.sh https://cyberpanel.sh/?dl
bash -x cyberpanel.sh

see what was last command it ran

neevalex commented 3 years ago

bash -x cyberpanel.sh

root@holidays:~# bash -x cyberpanel.sh

++ set
+ Sudo_Test='BASH=/bin/bash
BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="cyberpanel.sh")
BASH_VERSINFO=([0]="4" [1]="4" [2]="20" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='\''4.4.20(1)-release'\''
DIRSTACK=()
EUID=0
GROUPS=()
HOME=/root
HOSTNAME=holidays
HOSTTYPE=x86_64
IFS=$'\'' \t\n'\''
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
LESSCLOSE='\''/usr/bin/lesspipe %s %s'\''
LESSOPEN='\''| /usr/bin/lesspipe %s'\''
LOGNAME=root
LS_COLORS='\''rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'\''
MACHTYPE=x86_64-pc-linux-gnu
MAIL=/var/mail/root
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PPID=32610
PS4='\''+ '\''
PWD=/root
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments:xtrace
SHLVL=2
SSH_CLIENT='\''213.111.120.181 53265 22'\''
SSH_CONNECTION='\''213.111.120.181 53265 95.183.50.162 22'\''
SSH_TTY=/dev/pts/1
TERM=xterm
UID=0
USER=root
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_RUNTIME_DIR=/run/user/0
XDG_SESSION_ID=9
_=/bin/bash'
+ echo -e '\nInitializing...\n'

Initializing...

+ [[ '' = *\-\-\d\e\b\u\g* ]]
+ Set_Default_Variables
+ echo -e 'Fetching latest data from CyberPanel server...\n'
Fetching latest data from CyberPanel server...

+ echo -e 'This may take few seconds...'
This may take few seconds...
+ Silent=Off
+ Server_Edition=OLS
+ Admin_Pass=1234567
+ Memcached=Off
+ Redis=Off
+ Postfix_Switch=On
+ PowerDNS_Switch=On
+ PureFTPd_Switch=On
+ Server_IP=
+ Server_Country=Unknow
+ Server_OS=
+ Server_OS_Version=
+ Server_Provider=Undefined
+ Watchdog=On
+ Redis_Hosting=No
++ curl --silent --max-time 30 -4 https://cyberpanel.net/version.txt
+ Temp_Value=
+ Panel_Version=
+ Panel_Build=
+ Branch_Name=v.
+ [[ v. = v*.*.* ]]
+ echo -e '\nUnable to fetch Branch name...'

Unable to fetch Branch name...
+ echo -e '\nPlease try again in few moments, if this error still happens, please contact support'

Please try again in few moments, if this error still happens, please contact support
+ exit
qtwrk commented 3 years ago

it failed to do this one curl --silent --max-time 30 -4 https://cyberpanel.net/version.txt

wait for a moment , try again

neevalex commented 3 years ago

it failed to do this one curl --silent --max-time 30 -4 https://cyberpanel.net/version.txt

wait for a moment , try again

The thing is that networking is still not working. Since it was ruined by initial install script. So i think that curl is not working due to that. all other stuff such as ping\wget does not work too.

Any chance that cb install script could break something?

qtwrk commented 3 years ago

I don't think so

what it shows if you ping google.com or curl it ?

neevalex commented 3 years ago

root@holidays:~# ping google.com ping: google.com: Temporary failure in name resolution

root@holidays:~# ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics ---
24 packets transmitted, 0 received, 100% packet loss, time 23549ms
neevalex commented 3 years ago

Any chance we can connect via telegram\skype whatever. I could share teh host access with you, so you could try it by yourself.

qtwrk commented 3 years ago

https://join.slack.com/t/cyberpanel/shared_invite/zt-634v7xas-aKR8v7rIGA2KKFRfHhk_zw

please use this

alfinauzikri commented 2 years ago

I've done a pull request for an issue related to resolv.conf causing the installation stuck at SWAP Set... or Check SWAP...

Check here : https://github.com/usmannasir/cyberpanel/pull/849

For those of you who experience a similar problem, you can modify the cyberpanel.sh file and add the same code that I just added.

Modify the /etc/resolv.conf file, setting the nameservers to DNS addresses allowed by your ISP.

Then run the cyberpanel installation again.

charliezxy commented 1 month ago

Hi, it's been 2 years on this post. Hope you are well. @alfinauzikrii, do you still work on cyberpanel?

I am getting a similar problem. This post is closest to my problem. I get error - Unknown host, network is down.

I am able to ping google.com successfully.

But still. Maybe you could relate and advice. Thanks!

errors

alfinauzikri commented 4 weeks ago

Hi, it's been 2 years on this post. Hope you are well. @alfinauzikrii, do you still work on cyberpanel?

I am getting a similar problem. This post is closest to my problem. I get error - Unknown host, network is down.

I am able to ping google.com successfully.

But still. Maybe you could relate and advice. Thanks!

errors

Halo @charliezxy, thank you.. hope you're doing well too.

# Check Connectivity
  if ping -q -c 1 -W 1 cyberpanel.sh >/dev/null; then
    echo -e "\nSuccessfully set up nameservers..\n"
    echo -e "\nThe network is up.. :)\n"
    echo -e "\nContinue installation..\n"
  else
    echo -e "\nThe network is down.. :(\n"
    rm -f /etc/resolv.conf
    mv /etc/resolv.conf_bak /etc/resolv.conf
    systemctl restart systemd-networkd >/dev/null 2>&1
    echo -e "\nReturns the nameservers settings to default..\n"
    echo -e "\nContinue installation..\n"
    sleep 3
  fi

There is no problem with the script. But 2 years ago I had a problem like yours. It seems to be a problem with the ISP used by the server that does not allow the use of third-party DNS such as Cloudflare and the like.

This script performs a ping mechanism to the cyberpanel.sh host after updating the DNS to 1.1.1.1. However, it can be seen on the screen that the server failed to resolve DNS using DNS 1.1.1.1.

So in this case, the server returns the DNS back to the default settings.

Hope this answer helps and clears any doubts.