Facing unknown host - network is down error - Cyberpanel on ubuntu 22 installation

Hello,

I have been trying to install Cyberpanel on my new root server from netcup and I am facing an issue which is not getting solved since 4 days.

I have tried and troubleshoot various methods, also took continuous help from Chatgpt, but just it ends up at same place. And therefore, I am now posting here in the hope to get some advice or help. Thank you

Server Specifications are AMD EPYC processor, 8GB Ram, 256GB storage from Netcup ( RS 1000 G11 plan)

Steps to Produce:

  1. Intalled Ubuntu 22 LTS
  2. While installing device was encrypted, just so you know it.
  3. When system is turned ON, encryption key is entered on server console, and then from Putty, we can login to the server via SSH key.
  4. Now on putty, I run sudo apt update and upgrade commands
  5. After that, wget command to download and install Cyberpanel. Also tried with Curl. Both end up at same error.
  6. The installer runs, I enter following choices;
    Install openlitespeed - Yes
    Memcached - Yes
    Redis - Yes
    Remote SQL - No
    Watchdog - No
    And for password, for some reason it does not allow me to enter. Memcached question comes up before I could enter d,r,s. So I assume it auto-generates the password. I assume I could change it later.
    Anyways, the installation continues, and after that cloning part, it gives the error and stops.

Error - Unknown host, network is down.
Screenshot:

Also:

  1. Ping google works
  2. Nslookup for google and cyberpanel.sh works as it returns their IP address
  3. /etc/resolv.conf contains all 3 nameservers like this:
    nameserver 1.1.1.1
    nameserver 8.8.8.8
    nameserver 8.8.4.4

If anybody could advice how to fix this please. Thanks in advance.

hostnamectl set-hostname new-hostname

for example; hostnamectl set-hostname server.myserver.com

Hi max, my hostname is already set. When I run hostnamectl, and I see this:

root@projectfvd:~# hostnamectl
Static hostname: projectfvd
Icon name: computer-vm
Chassis: vm
Virtualization: kvm
Operating System: Ubuntu 22.04.5 LTS
Kernel: Linux 5.15.0-124-generic
Architecture: x86-64
Hardware Vendor: netcup
Hardware Model: KVM Server

Do I still need to run your command?

Check the network settings here and restart the network, then try the installation again.

I am using netplan and systemd-networkd for managing the network, do I still need network manager? nmcli?

I run:
sudo systemctl restart systemd-networkd
ip a
ping -c 4 google works
sudo netplan apply

Ip a outputs my server IP and it is on ens3 type network.
And ping google works.

If your network is working properly, there is no need.

  • The purpose of our first command is to update the server
sudo apt update
sudo apt upgrade -y
  • Let’s remove installed and unnecessary packages (You don’t have to do this step)
    CyberPanel requires a clean install of Ubuntu 22.04. If there are any pre-installed packages like web server, database server, or mail transfer agent available, you will need to remove them.
systemctl stop nginx
systemctl stop dovecot
systemctl stop mysqld
systemctl stop postfix

apt-get remove nginx mysql-server dovecot-core postfix
  • Let’s download and run the CyberPanel installation script:

sh <(curl https://cyberpanel.net/install.sh || wget -O – https://cyberpanel.net/install.sh)

It’s a newly setup server with Ubuntu 22. I cleaned and deleted failed installations of cyberpanel many times. And I try again but still it returns same error. I got the error again.

when I run this code to see error logs- tail -n 100 /var/log/installLogs.txt

I see error that it cannot detect IP, and that’s why maybe it has unknown host error, network down error. See below log.

There may be a problem with the network configuration, there may be a problem with the firewall. If you are renting a server service, contact the support service.

I messaged netcup earlier. And they replied -

"Please note that you have a virtual server with us. We only provide you with the runtime environment. Unfortunately, we cannot provide you with support for individual software configurations and the setup of your system.

Once your system has been set up, we no longer have access to your system for security reasons. The completion of the setup as well as the configuration is therefore your responsibility."

As for firewall, I enabled it and allowed TCP ports for 80, 443, 8090 and 22 for SSH

At line number 204 on cyberpanel.sh file, there is check IP function which tries to get the IP of the server. And I think it is not able to do that and that’s why in my error logs above it shows - 404 cannot detect IP.

 204 Check_Server_IP() {
 205 Server_IP=$(curl --silent --max-time 30 -4 https://cyberpanel.sh/?ip)
 206   if [[ $Server_IP =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
 207     echo -e "Valid IP detected..."
 208   else
 209     echo -e "Can not detect IP, exit..."
 210     Debug_Log2 "Can not detect IP. [404]"
 211     exit
 212   fi
 213

However, in the very beginning of the installation, before even putting in our choices like 1 for litespeed, Y for Memcached and so, at initialization stage, it prints there - Valid Ip detected.

So something during the installation happens, that blocks the script to get the IP and it returns 404 and then > Ping: unknown host >> network is down error >> installation stops or fails.

I tried to modified the script at line 204, I removed that check IP function’s curl command that you see above. Instead, harcoded my server IP there, so the script has it now.

Check_Server_IP() {
  # Hardcode the public IP instead of relying on curl to fetch it
  Server_IP="I entered IP here"
  echo -e "Valid IP detected..."
}

By the way, this suggestion was provided by Chatgpt.

And then the installation didn’t gave unknown host error, and went ahead. However, during that installation happening for 20 minutes, I was looking at the terminal and there were many errors at various parts. At the end of the installation, I checked the logs and there were around 24 errors, and when I opened port 8090 of my server, it returned 503 error.

So, now I was expected to fix all these errors, however I am a beginner in this server level setup of things. And therefore I am still trying to find a way that the installer works fine itself without me needing to hardcode the IP, and then make it run, but then get all these errors and doubts that there might be other things as well that didn’t went well but hadn’t been noticed yet.

My ping to google always works. Nslookup returns IP of any website. MTR test of 500 pings was almost 100% successful. There was no packet loss. Only hop 7 had 3%. But other hops had zero. I also setup firewall and opened all ports needed such as 80, 443, 8090, 22 and so on.

Can anybody relate this problem and drop in advice? Thanks

My server is at netcup, Rs 1000 G11 with 8GB Ram, AMD EPYC 4 cores, 256GB storage.
IP is german.

Wait, is it because Cyberpanel script might be blocking my server IP? Is there a workaround?

I see a similar post here - Error in installation of cyber panel: installLogs.txt - #4 by die2mrw007

Hi, have you gotten it to work yet? I am facing the same issue… I have an RS200 G11 myself…

I installed cloudpanel. I couldn’t find anyway to fix this issue. I tried for a week. Also if you try to install cloudpanel now, it may also fail because after several attempts of installing cyberpanel you might have made some weird changes to your server. So just clean the drive, install ubuntu again and install cloudpanel. At first I had ubunbtu 22. But when I reinstalled for cloudpanel, I installed ubuntu 24. I don’t think that makes a difference but just so you know.

And I am satisfied with cloudpanel performance for now. I know it doesn’t has lightspeed. But whatever it has, it is working very good for now. If I need lightspeed later, I may come to cyberpanel later. But for now, I am at cloudpanel.

Interesting you are using Cloudpanel. Backup restore doesn’t look as easy as Cyberpanel that restores everything at once, files, database and cert.

If your doing your own backup scripts and only web serving, I’d recommend Caddy webserver. It’s not a panel but then given recent events, that’s not a bad thing. It has a great auto SSL system built in and config is easy. I’m using it for half my websites now having moved some over from Cyberpanel. Caddy has been rock solid for a couple of years and no security issues.

You should work on this following this guide.