Below, I'll outline the common issues reported with the OpenAdmin tool and provide solutions to troubleshoot or rectify these problems.
1. OpenAdmin Service Failure
When the OpenAdmin service fails, the first step in troubleshooting should be to examine any error messages recorded in the log files. These logs can offer vital clues about what caused the failure, whether it's a configuration issue, a resource conflict, or something else entirely. Here's how you can proceed:
tail -n 100 /var/log/openpanel/admin/error.log
This command displays the last 100 lines of the log file. Adjust the number or use less to browse through more of the file if needed.
Analyze the error messages and conduct a search on support forums to see if the issue has been previously reported and to find potential solutions.
After applying the necessary fixes based on your log file analysis, attempt to restart the OpenAdmin service. Use the command specific to your system's service manager, such as:
service admin restart
2. OpenAdmin Service Failure Without Error Logging
When the OpenAdmin service fails without logging any errors, you can inspect the service's status to get clues on the failure source. Running the command below will show the status and recent logs of the OpenAdmin service:
service admin status
If you encounter a service failure similar to the following output, it indicates a problem with starting the service, possibly due to a misconfiguration or an already running process:
× admin.service - OpenAdmin
Loaded: loaded (/etc/systemd/system/admin.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-03-15 18:41:02 WIB; 651ms ago
Process: 377672 ExecStart=gunicorn -c /usr/local/admin/service/service.config.py app:app (code=exited, status=1/F>
Main PID: 377672 (code=exited, status=1/FAILURE)
CPU: 223ms
Mar 15 18:41:02 de.openpanel.co systemd[1]: admin.service: Scheduled restart job, restart counter is at 5.
Mar 15 18:41:02 de.openpanel.co systemd[1]: Stopped OpenAdmin.
Mar 15 18:41:02 de.openpanel.co systemd[1]: admin.service: Start request repeated too quickly.
Mar 15 18:41:02 de.openpanel.co systemd[1]: admin.service: Failed with result 'exit-code'.
Mar 15 18:41:02 de.openpanel.co systemd[1]: Failed to start OpenAdmin.
To manually start the process and identify the issue, use:
cd /user/local/admin && gunicorn -c /usr/local/admin/service/service.config.py app:app
If the error "Already running on PID XXX (or pid file 'adminpanel' is stale)" appears, it suggests a process conflict or a stale PID file. Resolve this by terminating the conflicting process:
kill -9 PID_HERE
After addressing the conflict, restart the OpenAdmin service to apply the changes:
service admin restart
Following these steps should successfully restart the OpenAdmin panel, and it will be accessible again:
opencli admin on
This procedure provides a straightforward way to resolve service failures for OpenAdmin by identifying and eliminating process conflicts and ensuring the service is correctly restarted.