Skip to content

Server troubleshooting ​

This page collects common problems when managing a server with FlashPanel and how to fix them. When an operation fails, always start by opening the server's Events page to read the error message.

"Can not connect to server!" error ​

FlashPanel runs every task over SSH as root, including website tasks (they then switch to the website's system user on the server). This error means it could not log in to the server, so the task did not run. Follow the checks in Server disconnected.

Server disconnected ​

FlashPanel manages the server over SSH using the root account and a key unique to the server. While it cannot connect, operations on the server fail until the connection is restored. Check the following in order:

  1. Is the server running? Check your provider's control panel and start the server if it is off.
  2. Is a firewall blocking it? If you restrict SSH by IP (on the server or in the provider's firewall), allow the FlashPanel IP addresses. If you deleted the SSH firewall rule, see the section below.
  3. Is the FlashPanel key still on the server? It is stored in /root/.ssh/authorized_keys and /home/flashpanel/.ssh/authorized_keys. If it was removed or overwritten by the provider (for example after reinstalling the OS or resetting the password), use Grant Root Access to reinstall the key.
  4. Is the authorized_keys file valid? Remove any lines that are not public keys (for example a private key pasted by mistake).
  5. Has the provider cut international traffic? Some providers in Vietnam cut a server's international connectivity when the server or their network is under a DDoS attack. Your website may still load from inside Vietnam, but every connection from abroad, including FlashPanel, is blocked. Contact your provider's support for details and to find out when international traffic will be restored.

If it still fails, log in through the provider's console and fix the permissions of the .ssh folders:

bash
# root user
chown root:root /root
chown -R root:root /root/.ssh
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys

# flashpanel user
chown flashpanel:flashpanel /home/flashpanel
chown -R flashpanel:flashpanel /home/flashpanel/.ssh
chmod 700 /home/flashpanel/.ssh
chmod 600 /home/flashpanel/.ssh/authorized_keys

If none of the steps above help, run the following command as root and send the output to FlashPanel support:

bash
grep 'sshd' /var/log/auth.log | tail -n 20

SSH firewall rule deleted or SSH port changed ​

If the firewall rule for the SSH port was deleted, or you changed the SSH port and the new port is blocked, FlashPanel cannot connect and therefore cannot reopen the port for you.

  1. Open the console (VNC/Web Console) in your server provider's control panel and log in as root.

  2. Reopen the SSH port (replace 22 with your current SSH port if you changed it):

    bash
    ufw allow 22
  3. If your provider has its own firewall (security group, cloud firewall), open the port there too.

See also Firewall and SSH.

Change the root or system user password ​

FlashPanel does not store the server's login passwords, so it cannot tell you the old password. You can set a new password while the server is still connected:

  1. Open the server's System Users page and click the pencil icon on the user's row (root is at the top of the list).
  2. Enter a new password or click the key icon to generate one.
  3. Click Save.

If the server is already disconnected, reset the password with your provider's tools, then see Server disconnected.

TIP

By default the server only allows SSH logins with keys, so passwords are mainly used for sudo and the provider's console. To log in over SSH, use SSH Keys.

Restart PHP-FPM ​

You can restart PHP from the server's Applications page or PHP page (the Restart button).

In a deploy script or terminal, every system user is allowed to reload PHP-FPM with sudo without a password. Replace 8.3 with the website's PHP version:

bash
sudo service php8.3-fpm reload

This is useful at the end of every deployment when OPcache is enabled, so PHP picks up the new code.

Website shows 502 Bad Gateway ​

This is usually caused by PHP-FPM being stopped, the website pointing to an uninstalled PHP version, or a Node.js app/daemon not running. See 502 Bad Gateway error for details.

Nginx fails to start after a configuration change ​

This is usually caused by a website configuration block with invalid syntax. See Nginx fails to start.

Operations stuck or "Could not get lock" error ​

When installing an application or updating the server fails with an APT lock error, see Fix APT Lock. For the dpkg was interrupted error, see this section.

"Repository changed its 'Label' value" error ​

Updating packages fails with an error like:

text
E: Repository 'http://ppa.launchpad.net/ondrej/nginx/ubuntu focal InRelease' changed its 'Label' value from 'PPA for NGINX Stable with HTTP/2' to 'PPA for NGINX Stable'

The maintainer of a package repository (PPA) renamed it. As a safety check, APT stops until you confirm the change.

  1. Open Terminal on the server's overview page and run:

    bash
    sudo apt update --allow-releaseinfo-change
  2. Run the task that failed again.

WARNING

Only accept the change for repositories you trust. The ppa:ondrej/* repositories (PHP, Nginx, Apache) are maintained by Ondřej Surý and are safe. For an unknown repository, check its source first.

"Unmet dependencies" error ​

Installing or updating packages fails with:

text
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

The server has a half-installed package or a package with missing dependencies, usually because an earlier install was interrupted, or a package was installed manually from a .deb file or an incompatible repository. Until this is fixed, APT refuses to install any other package.

  1. Open Terminal on the server's overview page and run:

    bash
    sudo dpkg --configure -a
    sudo apt-get update
    sudo apt-get --fix-broken install
  2. The last command lists the packages it will install or remove, then asks for confirmation. Read the list carefully before typing Y.

  3. Run the task that failed again.

WARNING

If the removal list contains important packages such as nginx, php*, mysql-server, mariadb-server or postgresql*, type n to cancel and send the command output to FlashPanel support. Removing these packages takes your websites offline.

"Could not resolve host" error ​

A task fails with one of these errors:

text
curl: (6) Could not resolve host: deb.nodesource.com
Temporary failure resolving 'archive.ubuntu.com'

The server cannot resolve domain names to IP addresses, so it cannot download packages or source code from the Internet. The problem is the server's own DNS configuration, not the domain being downloaded. Common causes: the provider's DNS servers are down, /etc/resolv.conf was edited incorrectly, the systemd-resolved service is stopped, or a firewall blocks outgoing traffic on port 53.

  1. Open Terminal on the server's overview page and check:

    bash
    getent hosts deb.nodesource.com
    resolvectl status

    If the first command prints no IP address, the server's DNS is broken.

  2. Restart the name resolution service and check again:

    bash
    sudo systemctl restart systemd-resolved
    getent hosts deb.nodesource.com
  3. If it still fails, use public DNS servers. Open /etc/systemd/resolved.conf, find the #DNS= line under [Resolve] and change it to:

    ini
    DNS=1.1.1.1 8.8.8.8

    Then run sudo systemctl restart systemd-resolved. If /etc/resolv.conf is not a link to systemd-resolved (ls -l /etc/resolv.conf shows no ->), edit the nameserver lines in that file directly.

  4. If you use your provider's firewall (security group, cloud firewall), allow outgoing traffic on port 53 (UDP and TCP).

  5. Run the task that failed again.

"Read-only file system" error ​

A task fails with an error like:

text
dpkg: error processing archive ... (--unpack):
 unable to create '/usr/bin/gpgv.dpkg-new' (while processing './usr/bin/gpgv'): Read-only file system

The operating system has switched the disk to read-only mode. Linux does this automatically when it detects file system errors or disk I/O errors, to avoid damaging more data. Your websites can still read data but cannot write anything (uploads, cache, sessions, databases…), and FlashPanel cannot fix this remotely.

  1. Open Terminal on the server's overview page and check:

    bash
    findmnt -no OPTIONS /
    sudo dmesg | grep -iE 'I/O error|EXT4-fs error|remount' | tail -n 20

    If the first line starts with ro, the disk is read-only.

  2. Back up important data (source code, databases) to another machine right away while it is still readable, for example over SFTP.

  3. Reboot the server from your provider's control panel. Ubuntu usually checks and repairs the file system during boot.

  4. If the disk is still read-only after the reboot, or dmesg reports I/O error, contact your server provider: this is usually a fault in their disk or storage system. The provider can run fsck from rescue mode or move the server to another disk.

WARNING

Never run fsck on a disk that is mounted and in use, as it can corrupt data. Only run it from your provider's rescue mode.

Default shell is not bash ​

A task fails with an error starting with zsh: or fish:, for example:

text
zsh:85: no matches found: /usr/local/lsws/lsphp*/etc/php/*/litespeed/php.ini

FlashPanel runs commands on your server with the SSH user's default shell, and all FlashPanel scripts are written for bash. If you changed the default shell to zsh, fish or another shell, scripts break partway through. Change the default shell back to bash:

  1. Open Terminal on the server's overview page and check the default shell of root:

    bash
    getent passwd root | cut -d: -f7

    If the result is not /bin/bash, it needs to be changed.

  2. Change the default shell of root back to bash:

    bash
    sudo chsh -s /bin/bash root
  3. Run the failed task again.

TIP

You can still use zsh when working on the server directly: after logging in over SSH, type zsh to switch to it. Only the default shell needs to be bash.

Redis fails to start ​

  1. Open Terminal on the server's overview page and read why Redis stopped:

    bash
    sudo systemctl status redis-server
    sudo journalctl -u redis-server -n 50 --no-pager
  2. Fix it based on the message:

    • Can't open the log file: No such file or directory: the log folder is missing. Recreate it:

      bash
      sudo mkdir -p /var/log/redis
      sudo chown redis:redis /var/log/redis
      sudo chmod 755 /var/log/redis
    • Address already in use: another program is using port 6379. Find it with sudo lsof -i :6379 and stop it. If you would rather move Redis to another port, change port in the Redis configuration (Config button on the Applications page) and update every application that connects to Redis.

  3. Click Start on the Redis row of the Applications page, or run sudo systemctl restart redis-server. Redis is running again when its status shows Active.

Disk full ​

A full disk makes the database, PHP, and web server fail in unpredictable ways, often with the error No space left on device. Run the Cleanup System utility first, then follow Disk Full to find and remove what is using the space.

Cannot create a server through the provider's API ​

  • Invalid API key or missing permissions: create a new API key following Connect a server provider.
  • Account resource limit reached (for example DigitalOcean's droplet limit): contact the provider to raise the limit, then create the server again.