Troubleshooting aaPanel Installation Failure on Debian 11: A Case Study and Solution

aaPanel installation failureDebian 11 server setuppython3-pycryptodome fixaaPanel error log troubleshootingLNMP environment not installing
Published·Modified·

Recently, I attempted to install aaPanel (the international version of Baota Panel) on a foreign server running Debian 11. After successfully installing the panel, I proceeded to set up the LNMP environment. A few minutes later, aaPanel indicated that the LNMP environment was installed successfully. However, when creating a new site, it prompted that the environment was not installed.

Installation Error

Problem Investigation

I repeatedly tried installing different versions of PHP, Nginx, and MySQL from the aaPanel application store. Unfortunately, although the system indicated success, the installation was not actually completed. I checked the /www/server/php directory and found it to be empty.

This led me to suspect a server disk issue.

  1. I used the command df -h to check the server disk usage, which appeared normal.

Disk Usage Check

  1. Could the inode nodes be full? I used the command df -i to check the inode usage, which was also normal.

Inode Usage Check

  1. Was the disk read-only? I attempted to create a file in the / directory, and no error was reported, so this was not the issue.
  2. I then tried the universal solution of a hard reboot, but the problem persisted.

Repairing the Baota Panel

I entered the command bt and selected option 16 to attempt updating and repairing the aaPanel.

Repair Menu

After the update completed, I entered 22 to view the aaPanel error logs:

Error Log Menu

The logs indicated the following error:

[2023-05-24 10:35:35][DEBUG] - Traceback (most recent call last):
  File "class/public.py", line 5965, in rsa_decrypt
    decrypted_data = cipher_private.decrypt(res, None)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/Crypto/Cipher/PKCS1_v1_5.py", line 165, in decrypt
    raise ValueError("Ciphertext with incorrect length.")
ValueError: Ciphertext with incorrect length.

I consulted the AI tool ChatGPT regarding the "incorrect ciphertext length" error. While I didn't fully understand the technical reason, one suggested solution was to check if the required encryption library (such as pycryptodome) was installed in the Python environment. I installed the library using the following command:

sudo apt install python3-pycryptodome

By repairing the Baota Panel and addressing the error log, I installed python3-pycryptodome, which resolved the issue. I then reinstalled the software from the aaPanel application store, and everything worked normally.

Summary

If you encounter a situation where aaPanel / Baota Panel applications fail to install without a direct error message, try the following troubleshooting and repair methods:

  1. Use df -h to check if the disk is full.
  2. Use df -i to check if the inode nodes are full.
  3. Check if the disk is read-only.
  4. Try using the Baota command (bt) and select option 16 to repair the panel.
  5. Try using the Baota command (bt) and select option 22 to view error logs, then find solutions based on the log details.