cyberpanel
cyberpanel copied to clipboard
Installing stuck on Check SWAP
Describe the bug Everything goes very well until that point. I'm installing the latest version v2.1.2
I'm installing on my lubuntu local pc (3gb ram) Please how can I fix this problem
Same problem here!!!
...
Fetching files from https://github.com/usmannasir/cyberpanel.git...
Cloning into 'cyberpanel'...
remote: Enumerating objects: 26714, done.
remote: Counting objects: 100% (2788/2788), done.
remote: Compressing objects: 100% (1032/1032), done.
remote: Total 26714 (delta 1833), reused 2541 (delta 1634), pack-reused 23926
Receiving objects: 100% (26714/26714), 375.96 MiB | 21.75 MiB/s, done.
Resolving deltas: 100% (17114/17114), done.
CyberPanel source code downloaded...
Branch 'v2.1.2' set up to track remote branch 'v2.1.2' from 'origin'.
Switched to a new branch 'v2.1.2'
/root
setenforce: SELinux is disabled
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
no label, UUID=09848cd5-8a42-4141-b3ef-1e147a4b9c7a
/cyberpanel.swap swap swap sw 0 0
vm.swappiness = 10
SWAP set...
It should not be a problem at this point, the SWAP file is created and if you take the commands from the script and run it again yourself, there is no problem here.
I see here much more the problem from the time, where the nameservers are set.
The fact that it could be the SWAP creation results from the fact that this is the last message that is displayed on the terminal.
please try this
wget -O install.sh https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/cyberpanel.sh
bash -x install.sh
then post the last screen where it stuck
I have installed Ubuntu 20.04.3 LTS in the meantime to try it out there. After 5 minutes of waiting at the last output came with your command the following result:
CyberPanel source code downloaded...
+ cd cyberpanel
+ git checkout v2.1.2
Branch 'v2.1.2' set up to track remote branch 'v2.1.2' from 'origin'.
Switched to a new branch 'v2.1.2'
+ Check_Return 'git checkout'
+ [[ 0 != \0 ]]
+ cd -
/root
+ cp -r cyberpanel /usr/local/cyberpanel
+ cd cyberpanel/install
+ Debug_Log2 'Necessary components installed..,5'
+ Check_Server_IP 'Necessary components installed..,5'
+ echo -e '\nNecessary components installed..,5'
+ curl --max-time 20 -d '{"ipAddress": "49.12.126.186", "InstallCyberPanelStatus": "Necessary components installed..,5"}' -H 'Content-Type: application/json' -X POST https://cloud.cyberpanel.net/servers/RecvData
+ Pre_Install_System_Tweak
+ Debug_Log2 'Setting up system tweak...,20'
+ Check_Server_IP 'Setting up system tweak...,20'
+ echo -e '\nSetting up system tweak...,20'
+ curl --max-time 20 -d '{"ipAddress": "49.12.126.186", "InstallCyberPanelStatus": "Setting up system tweak...,20"}' -H 'Content-Type: application/json' -X POST https://cloud.cyberpanel.net/servers/RecvData
++ grep -n 127.0.0.1 /etc/hosts
++ cut -d: -f 1
+ Line_Number=2
++ hostname
+ My_Hostname=Ubuntu-2004-focal-64-minimal
+ [[ -n 2 ]]
+ for Line_Number2 in $Line_Number
++ sed '2q;d' /etc/hosts
+ String='127.0.0.1 localhost.localdomain localhost'
+ [[ 127.0.0.1 localhost.localdomain localhost != *\U\b\u\n\t\u\-\2\0\0\4\-\f\o\c\a\l\-\6\4\-\m\i\n\i\m\a\l* ]]
+ New_String='127.0.0.1 localhost.localdomain localhost Ubuntu-2004-focal-64-minimal'
+ sed -i '2s/.*/127.0.0.1 localhost.localdomain localhost Ubuntu-2004-focal-64-minimal/' /etc/hosts
+ [[ Ubuntu = \C\e\n\t\O\S ]]
+ [[ Ubuntu = \U\b\u\n\t\u ]]
+ [[ 20 = \2\0 ]]
+ sed -i 's|ce-2.3-latest/ubuntu/bionic bionic main|ce-2.3-latest/ubuntu/focal focal main|g' install.py
+ [[ 20 = \1\8 ]]
+ grep -q pid_max /etc/rc.local
+ [[ Ubuntu = \C\e\n\t\O\S ]]
+ [[ -f /etc/rc.local ]]
+ echo '#!/bin/bash'
+ echo 'echo 1000000 > /proc/sys/kernel/pid_max
echo 1 > /sys/kernel/mm/ksm/run'
+ chmod +x /etc/rc.local
+ systemctl enable rc-local
+ systemctl start rc-local
+ grep -q nf_conntrack_max /etc/sysctl.conf
+ echo 'fs.file-max = 65535'
+ sysctl -p
+ echo '* soft nofile 65535
* hard nofile 65535
root soft nofile 65535
root hard nofile 65535
* soft nproc 65535
* hard nproc 65535
root soft nproc 65535
root hard nproc 65535'
++ free -m
++ awk '/^Swap:/ { print $2 }'
+ Total_SWAP=32734
+ Set_SWAP=31580
+ SWAP_File=/cyberpanel.swap
+ '[' '!' -f /cyberpanel.swap ']'
+ [[ 32734 -gt 64314 ]]
+ [[ 32734 -eq 64314 ]]
+ [[ 31580 -gt 2049 ]]
+ Set_SWAP=2048
+ fallocate --length 2048MiB /cyberpanel.swap
+ chmod 600 /cyberpanel.swap
+ mkswap /cyberpanel.swap
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
no label, UUID=ee29ba81-4c07-470d-b91c-e23860f95562
+ swapon /cyberpanel.swap
+ echo -e '/cyberpanel.swap swap swap sw 0 0'
+ sudo tee -a /etc/fstab
/cyberpanel.swap swap swap sw 0 0
+ sysctl vm.swappiness=10
vm.swappiness = 10
+ echo -e 'vm.swappiness = 10'
+ echo -e '\nSWAP set...\n'
SWAP set...
+ [[ Undefined = \T\e\n\c\e\n\t\ \C\l\o\u\d ]]
+ [[ Undefined = \A\l\i\b\a\b\a\ \C\l\o\u\d ]]
+ grep -i -q systemd-resolve /etc/resolv.conf
+ systemctl stop systemd-resolved
+ systemctl disable systemd-resolved
+ systemctl mask systemd-resolved
+ rm -f /etc/resolv.conf
+ [[ Undefined = \T\e\n\c\e\n\t\ \C\l\o\u\d ]]
+ [[ Undefined = \A\l\i\b\a\b\a\ \C\l\o\u\d ]]
+ echo -e 'nameserver 1.1.1.1'
+ echo -e 'nameserver 8.8.8.8'
+ systemctl restart systemd-networkd
+ sleep 3
+ cp /etc/resolv.conf /etc/resolv.conf-tmp
++ grep -n 'f.write('\''nameserver 8.8.8.8'\'')' installCyberPanel.py
++ head -n 1
++ cut -d: -f1
+ Line1=520
+ sed -i '520i\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ subprocess.call\(command, shell=True)' installCyberPanel.py
+ sed -i '520i\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ command = '\''cat /etc/resolv.conf-tmp > /etc/resolv.conf'\''' installCyberPanel.py
+ Main_Installation
+ Debug_Log2 'Starting main installation..,30'
+ Check_Server_IP 'Starting main installation..,30'
I think the 30 at the end does not stand for "wait 30 minutes before continuing ..."
I think the 30 at the end does not stand for "wait 30 minutes before continuing ..."
no , it's just a mark number , like percentage of current progress
you said 5 minutes waiting , which line was it stuck ?
you said 5 minutes waiting , which line was it stuck ?
@qtwrk Maybe I'm misunderstanding your question... my "5 minutes wait" refers to the last line I mentioned above.
Here: Check_Server_IP 'Starting main installation..,30'
And with this comment, nothing has changed in this situation after all this time. Seems to be stuck :pensive:
I'm not able to try it to my pc but my installation stuck here at this point (this is just a example I found on YouTube and in that video everything is okay I have just take a screenshot how it looks in my terminal)
By the way, I restart the system every time after the installation fails, because I can't restart the script after aborting.
So when I stop the script at the point where it gets stuck and then restart it, I get the following error message:
root@Ubuntu-2004-focal-64-minimal ~ # bash -x install.sh
++ set
+ Sudo_Test='BASH=/usr/bin/bash
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="install.sh")
BASH_VERSINFO=([0]="5" [1]="0" [2]="17" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='\''5.0.17(1)-release'\''
DIRSTACK=()
EUID=0
GROUPS=()
HOME=/root
HOSTNAME=Ubuntu-2004-focal-64-minimal
HOSTTYPE=x86_64
IFS=$'\'' \t\n'\''
LANG=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:*.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
MOTD_SHOWN=pam
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=820
PS4='\''+ '\''
PWD=/root
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments:xtrace
SHLVL=2
SSH_CLIENT='\''84.188.161.62 61689 22'\''
SSH_CONNECTION='\''84.188.161.62 61689 49.12.126.186 22'\''
SSH_TTY=/dev/pts/0
TERM=xterm-256color
UID=0
USER=root
XDG_RUNTIME_DIR=/run/user/0
XDG_SESSION_CLASS=user
XDG_SESSION_ID=1
XDG_SESSION_TYPE=tty
_=/usr/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
I think it's because the script destroys my resolv.conf
and consequently no resolving can take place afterwards.
I'm not able to try it to my pc but my installation stuck here at this point (this is just a example I found on YouTube and in that video everything is okay I have just take a screenshot how it looks in my terminal)
This is one and the same spot on mine system. Unfortunately, no matter what operating OS -> I get the same error under both, Ubuntu and AlmaLinux.
Yesss this thing happened to me also after executing the script I'm not unable to ping google,com (before executing everything is okay ping also is okay)
I think it's because the script destroys my
resolv.conf
and consequently no resolving can take place afterwards.
try cat resolv.conf and see what it contains , and also try curl or ping any domain , like google.com
try cat resolv.conf and see what it contains , and also try curl or ping any domain , like google.com
I have done that after I executed the script I'm not able to ping google.com also in resolv.conf the line "nameserver 192.168.0.1" has been gone and this line I have modified manually
try cat resolv.conf and see what it contains , and also try curl or ping any domain , like google.com
As you can see here, it is not the resolv.conf
. The entries are correct (even if localhost is missing here for me)
root@Ubuntu-2004-focal-64-minimal ~ # cat /etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
root@Ubuntu-2004-focal-64-minimal ~ # ping google.com
ping: google.com: Temporary failure in name resolution
root@Ubuntu-2004-focal-64-minimal ~ # ping github.com
ping: github.com: Temporary failure in name resolution
root@Ubuntu-2004-focal-64-minimal ~ # nslookup google.com
;; connection timed out; no servers could be reached
root@Ubuntu-2004-focal-64-minimal ~ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=4.77 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=4.91 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=4.78 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=60 time=4.90 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=60 time=4.88 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=60 time=4.99 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=60 time=4.89 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=60 time=4.91 ms
^C
--- 8.8.8.8 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7013ms
rtt min/avg/max/mdev = 4.774/4.878/4.993/0.068 ms
https://gist.github.com/zoilomora/f7d264cefbb589f3f1b1fc2cea2c844c
try this , re-create the resolv.conf if needed
try this , re-create the resolv.conf if needed
Dosen't work for me. From my viewpoint, this is not the problem. The fact is that the "main installaton" does not start, for whatever reason.
Even if I get it to run again in some way, that I can resolve the different FQDNs again, it doesn't change the fact that the script will break the whole thing again.
where can I get one of this kind of ubuntu ? tested on multipass'ed VM , Vutlr , Linode , Digital Ocean , all of these ubuntu 20 works for me
where can I get one of this kind of ubuntu ? tested on multipass'ed VM , Vutlr , Linode , Digital Ocean , all of these ubuntu 20 works for me
This is the one which I'm using: Ubuntu 20.04.3 LTS
However, I wanted to try the whole thing for @anon-user-com with Ubuntu. The system I actually want to use productively is AlmaLinux 8.5
However, I had there 1:1 the same problem :/
okay , I installed it from ISO on my local VM , now I got
nameserver 127.0.0.53
options edns0 trust-ad
search localdomain
in resolv.conf , then it becomes
nameserver 1.1.1.1
nameserver 8.8.8.8
and resolving still works
try manually disable the systemd-resolv before run the installer , see how it goes.
okay , I installed it from ISO o, now I got
nameserver 127.0.0.53
options edns0 trust-ad
search localdomain
in resolv.conf , then it becomes
nameserver 1.1.1.1
nameserver 8.8.8.8
and resolving still works
try manually disable the systemd-resolv before run the installer , see how it goes.
How is it with AlmaLinux?
I'm not @home to try it, yet. But I am still surprised that it works for you
few days ago I tested with AlmaLinux on Vultr and Netcup server, work fine on me
Dunno what I'm doing wrong... maybe cause of Germany ;)
AlmaLinux 8.5@Hetzner
provider ?
hmmmm? it doesn't have alma ,did you install from iso ?
hmmmm? it doesn't have alma ,did you install from iso ?
@qtwrk Sure there is ^^ but I claim that it is not long so. Nevertheless, I have the same problem with Ubunto. I would have liked to try CentOS 7/8, but it is already EOL. And CentOS 8 Stream is unfortunately not supported by CyberPanel.
In addition, the @anon-user-com has Ubuntu on his private PC and has also the same problem as me.
For info: I have meanwhile... about 7 times the system reinstalled at Hetzner -> always a Clean Install!
I can also imagine that it always works for you, because you install it virtualized. At Hetzner you rent a complete physical server, so the Ethernet card is addressed directly and not virtually. Could this possibly be the problem?
All these assumptions make me wonder more and more, why exactly these settings are changed by this script? A user based selection makes more sense to me ...
I would like to comment out the whole local, but the script downloads the current version of the repo again (for whatever reason).
Everything somehow not so simple... can you think of a good solution spontaneously?
@qtwrk And I just want to say a quick thank you for all the effort and thought you put in :)
okay... can't afford to buy a dedicated server for this, I only see the ISO in heztner cloud server, will give it a try there first...
if I recall correctly , the systemd-resolved doesn't work with PowerDNS that panel comes with , or something that makes me need to disbale systemd-resolved and make it traditional way of resolving domain
I don't think the issue is related to network interface , the thing is how to properly disable the systemd-resolved while retain the domain resolving capability
I have now the following insights, which will be interesting for you both @qtwrk and @anon-user-com:
Installing the latest version v.2.1.2
has not worked after endless attempts with various OS.
Finally I had a look at the changelog here.
I noticed that in version v.2.1.1
a new installer script and a new upgrade script was released.
So I tried to install the previous version v2.0.3
on AlmaLinux 8.5
, which did not mention that new scripts are used. Unfortunately I had there further problems with the installation of LSWS (however I got more far than before!).
Now to install CyberPanel completely, I tried to install the version v.2.1.1
. This actually worked! After I finished the installation successfully, I next did an upgrade to the next version with the command.
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
The upgrade also worked great and didn't give me any more problems.
Now I'm sure you @qtwrk are asking yourself the same question I'm asking myself: What is the difference and how to avoid this in the future if necessary?
@dxniel7402 what's the content of /etc/resolv.conf after you install/upgrade ?
@dxniel7402 what's the content of /etc/resolv.conf after you install/upgrade ?
After installation:
[root@Alma-85-amd64-base ~]# cat /etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
[root@Alma-85-amd64-base ~]#
After upgrade:
###################################################################
CyberPanel Upgraded
###################################################################
[root@Alma-85-amd64-base ~]# cat /etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
[root@Alma-85-amd64-base ~]#
so the installer is working as it should , where disables systemd-resolved and use 1.1.1.1/8.8.8.8
what if you manually disable systemd resolved and use 1.1.1.1/8.8.8.8 before you install ?