English
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:
- Is the server running? Check your provider's control panel and start the server if it is off.
- 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.
- Is the FlashPanel key still on the server? It is stored in
/root/.ssh/authorized_keysand/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. - Is the
authorized_keysfile valid? Remove any lines that are not public keys (for example a private key pasted by mistake). - 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_keysIf 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 20SSH 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.
Open the console (VNC/Web Console) in your server provider's control panel and log in as
root.Reopen the SSH port (replace
22with your current SSH port if you changed it):bashufw allow 22If your provider has its own firewall (security group, cloud firewall), open the port there too.
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:
- Open the server's System Users page and click the pencil icon on the user's row (
rootis at the top of the list). - Enter a new password or click the key icon to generate one.
- 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 reloadThis 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.
Open Terminal on the server's overview page and run:
bashsudo apt update --allow-releaseinfo-changeRun 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.
Open Terminal on the server's overview page and run:
bashsudo dpkg --configure -a sudo apt-get update sudo apt-get --fix-broken installThe last command lists the packages it will install or remove, then asks for confirmation. Read the list carefully before typing
Y.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.
Open Terminal on the server's overview page and check:
bashgetent hosts deb.nodesource.com resolvectl statusIf the first command prints no IP address, the server's DNS is broken.
Restart the name resolution service and check again:
bashsudo systemctl restart systemd-resolved getent hosts deb.nodesource.comIf it still fails, use public DNS servers. Open
/etc/systemd/resolved.conf, find the#DNS=line under[Resolve]and change it to:iniDNS=1.1.1.1 8.8.8.8Then run
sudo systemctl restart systemd-resolved. If/etc/resolv.confis not a link tosystemd-resolved(ls -l /etc/resolv.confshows no->), edit thenameserverlines in that file directly.If you use your provider's firewall (security group, cloud firewall), allow outgoing traffic on port
53(UDP and TCP).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 systemThe 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.
Open Terminal on the server's overview page and check:
bashfindmnt -no OPTIONS / sudo dmesg | grep -iE 'I/O error|EXT4-fs error|remount' | tail -n 20If the first line starts with
ro, the disk is read-only.Back up important data (source code, databases) to another machine right away while it is still readable, for example over SFTP.
Reboot the server from your provider's control panel. Ubuntu usually checks and repairs the file system during boot.
If the disk is still read-only after the reboot, or
dmesgreportsI/O error, contact your server provider: this is usually a fault in their disk or storage system. The provider can runfsckfrom 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.iniFlashPanel 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:
Open Terminal on the server's overview page and check the default shell of
root:bashgetent passwd root | cut -d: -f7If the result is not
/bin/bash, it needs to be changed.Change the default shell of
rootback tobash:bashsudo chsh -s /bin/bash rootRun 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
Open Terminal on the server's overview page and read why Redis stopped:
bashsudo systemctl status redis-server sudo journalctl -u redis-server -n 50 --no-pagerFix it based on the message:
Can't open the log file: No such file or directory: the log folder is missing. Recreate it:bashsudo mkdir -p /var/log/redis sudo chown redis:redis /var/log/redis sudo chmod 755 /var/log/redisAddress already in use: another program is using port6379. Find it withsudo lsof -i :6379and stop it. If you would rather move Redis to another port, changeportin the Redis configuration (Config button on the Applications page) and update every application that connects to Redis.
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.