usmannasir / cyberpanel

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

[MAJOR BUG] Installer exits itself after "Swap set" on certain VPS providers and its fix provided by me here. #844

Closed dhiraj969371 closed 2 years ago

dhiraj969371 commented 2 years ago

Describe the bug Installer exits after showing "Swap set"

To Reproduce What steps did you take when the issue occurred?

  1. Get a Root Server from Netcup.eu.
  2. Install Ubuntu 20.04 LTS
  3. Try to install Cyberpanel.

Expected behavior Should continue to install.

Operating system: Ubuntu 20.04 LTS

CyberPanel version: 2.1.2

Additional context I have been having this error since I bought from Netcup.eu 3 months ago.

FIX HERE Change line 1204 from "cyberpanel.sh" file in the git from "sleep 3" to "sleep 30" and run it. It will be successfully installed after that.

This may also fix issue numbers #810 #781 #711 and many from the forums of cyberpanel.

qtwrk commented 2 years ago

welcome to submit a PR , I have few VPS' on NetCup as well though , and it all works fine on me , wether centos/ubuntu/alam/rocky

dhiraj969371 commented 2 years ago

Do you have Root Server or VPS? Because I think this occurs only on specific types of servers/vms. I have RS 2000 G9.5

qtwrk commented 2 years ago

https://i.imgur.com/JM6dVsn.png

this is what I have , but I have tried on RS2000 before and it works

and as far as I know about netcup , their OS images are same across vps or root server

dhiraj969371 commented 2 years ago

I can give you SSH if you want. You can see it for yourself. I will do it tomorrow tho if you want to access it because I am up late right now.

dhiraj969371 commented 2 years ago

I am creating this issue because I have experienced it myself and I just gave up on Ubuntu and got on AlmaLinux but Alma has some bugs. So today I saw all the code and saw the comment under the sleep command "Talking break or installer fails" something like that. So I increased the time of sleep and it worked after I ran the script.

alfinauzikri commented 2 years ago

When the installation is stuck on "Swap set". Try stopping the installation script and try pinging google.com.

If the result is like this: ping: google.com: Temporary failure in name resolution

It looks like the server provider or ISP you are using, is doing 3rd party DNS blocking.

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

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.

dhiraj969371 commented 2 years ago

When the installation is stuck on "Swap set". Try stopping the installation script and try pinging google.com.

If the result is like this: ping: google.com: Temporary failure in name resolution

It looks like the server provider or ISP you are using, is doing 3rd party DNS blocking.

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 : #849

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.

I would recommend you to increase the sleep time to 10 or 30 seconds as well, because I think that's the problem here. The problem is occurring when the code modifies the "resolve.conf" file before systemd-networkd has even restarted fully on some VPS providers and hence the installer breaks (I don't know why though). Your PR just checks the network before continuing the installation. I fixed mine by increasing the sleep time to 30. Also my issue was that the installer just exited itself and others are getting stuck.

usmannasir commented 2 years ago

Pull request related to this is also merged.

rupward commented 1 year ago

For me this fix only partially reverts the dns settings. When changing the dns settings originally the systemd-resolved is both masked and disabled, however reverting the original resolve.conf file, it only restarts systemd and leaves it masked and disabled which left my system unable to resovle anything.
Reverting may also need to: systemctl unmask systemd-resolved systemctl enable systemd-resolved (in my scenario I only installed CyberPanel, not PowerDNS etc)