Bobcares

Directadmin Debug Mode | A Complete Guide

by | Nov 9, 2024

In this article, we’ll see more details on DirectAdmin debug mode. At Bobcares, with our DirectAdmin Support Services, we can handle your issues.

Overview
  1. An Introduction to DirectAdmin Debug Modes
  2. Ideal Scenarios for Using Debug Mode
  3. How to Enable It?
  4. Checking Logs
  5. How to Disable It?
  6. Conclusion

An Introduction to DirectAdmin Debug Modes

When it comes to managing web hosting tasks, DirectAdmin’s debug mode can be a lifesaver. Normally, DirectAdmin logs only the most essential information to keep things running smoothly. However, in debug mode, it provides a much deeper look, producing verbose logs that detail error messages, database queries, file operations, and other internal processes.

directadmin debug mode

Why Enable DirectAdmin Debug Mode?

It is the go-to solution when:

  • A feature or service isn’t working as expected.
  • Commands fail without clear error messages.
  • Performance issues or unexpected behaviors arise.
  • Troubleshooting database problems or errors with websites, emails, etc.

Ideal Scenarios for Using Debug Mode

The debug mode isn’t for everyday use. It should be activated only when troubleshooting specific issues. Key scenarios include:

  • License check failures: Helps diagnose why a license isn’t validated.
  • Service errors: Useful for pinpointing issues with services like Apache, PHP, or MySQL.
  • Panel interface problems: Assists in diagnosing errors within the DirectAdmin control panel.
  • Configuration issues: Helps resolve system configuration, permission, or software conflicts.

Once we’ve resolved the issue, it’s best to disable debug mode to prevent excessive logging, which could consume unnecessary disk space.

How to Enable It?

Activating DirectAdmin’s debug mode provides enhanced visibility into system operations. Let’s walk through the steps:

1. Running DirectAdmin in Debug Mode

To get detailed output, follow these steps:

i. Open a terminal and navigate to the DirectAdmin directory:

cd /usr/local/directadmin

ii. Stop the DirectAdmin service:

killall -9 directadmin

iii. Run in debug mode at level 2000 for extensive logging:

./directadmin b2000

We’ll see an output showing connections and actions taken within DirectAdmin.

iv. For API script debugging, we can filter the logs by adding:

./directadmin b2000 | grep [string]

v. To exit this mode, press Ctrl + C, then reset DirectAdmin:

./directadmin d

2. Configuring Debug Mode through DirectAdmin’s Config File

Another way to enable debug mode is by editing the DirectAdmin configuration file:

i. Open the configuration file:

nano /usr/local/directadmin/conf/directadmin.conf

ii. Add or modify the debug setting:

debug=1

Debug levels vary:

  • debug=0: Default, no debugging.
  • debug=1: Basic debugging.
  • debug=2: More detailed debugging.
  • debug=2000: Full debug mode for in-depth analysis (recommended for developers or advanced troubleshooting).

iii. Save changes and restart DirectAdmin to apply:

service directadmin restart

3. Enabling Specific Debugging Options for Services

DirectAdmin allows debugging of individual services:

  • MySQL Debugging: To troubleshoot database issues, increase the logging level in the MySQL configuration.
  • Exim Debugging (Email): For email issues, enable debugging in /etc/exim.conf.

Checking Logs

When debug mode is active, DirectAdmin will produce more detailed logs, helping us pinpoint issues more effectively. Key logs include:

  • DirectAdmin Logs:
tail -f /var/log/directadmin/error.log
  • Web Server Logs (for Apache/Nginx errors):
Apache: /var/log/httpd/error_log
Nginx: /var/log/nginx/error.log
Service-Specific Logs (e.g., Exim, Dovecot, ProFTPD): Found in /var/log/.

Reviewing these logs reveals where processes fail and what adjustments are needed.

How to Disable It?

After troubleshooting, it’s essential to turn off debug mode:

i. Open the directadmin.conf file:

nano /usr/local/directadmin/conf/directadmin.conf

ii. Change the debug setting back to debug=0.

iii. Restart DirectAdmin:

service directadmin restart

Disabling debug mode reduces log generation, conserving disk space and ensuring DirectAdmin operates in its default, efficient state.

[Need to know more? Get in touch with us if you have any further inquiries.]

Conclusion

DirectAdmin’s debug mode is a powerful feature for troubleshooting and enhancing control over system processes. By knowing when and how to enable and disable this mode, we can efficiently solve issues and maintain optimal system performance. Remember, debug mode is the ally for troubleshooting – activate it purposefully, and turn it off once issues are resolved!

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF