32.2.5 Enabling Debug Mode and Core Dumps

If the log files do not contain enough information to identify the cause of a problem, run Access Gateway Service in the debug mode. Use the debug mode only when you try to isolate a problem because running Access Gateway Service in the debug mode can have the following effects:

  • Debug mode increases the size of log files quickly. The size can increase enough to consume all available disk space and crash the system. When running in the debug mode, monitor the available disk space and the size of the log files.

  • In a highly loaded system, debug mode can lead to request or connection timeout and can slow down the response time.

IMPORTANT:Enabling logging in the debug mode enables most of the log levels, which might not be required for troubleshooting. Hence, during high load period, perform the following steps to reduce the impact on Access Gateway’s performance:

  1. Click Devices > Access Gateways > Edit > Advanced Options.

  2. Add the following options:

    LogLevel error
    LogLevel novell_ag_module:debug
    LogLevel ssl:warn mpm_worker:warn core:warn
    LogLevel proxy:warn proxy_balancer:warn proxy_ajp:warn proxy_http:warn
  3. Click OK.

Adding these options enable only error, debug, and warn levels for specific components.

Debug mode enables core dumps, X-Mag headers in LAN traces, and increases log levels by enabling advanced option in Access Gateway configuration. For example LogLevel debug. This sets apache log level to debug in the error_log file.

Perform the following steps to obtain the system core dump:

  1. Disable the limit for the maximum size of a core dump file. Add LimitCORE=infinity in /etc/systemd/system/novell-apache2.service.

    [Service]
    Type=oneshot 
    EnvironmentFile=/etc/opt/novell/apache2/conf/.arg_file
    Environment="LD_LIBRARY_PATH=/opt/novell/ssllib:/opt/novell/openssl/lib"
    ExecStart=/opt/novell/apache2/sbin/httpd $ARGL
    ExecStop=/opt/novell/apache2/sbin/httpd -k stop
    ExecReload=/opt/novell/apache2/sbin/httpd -k graceful
    RemainAfterExit=yes
    TasksMax=28000
    LimitCORE=infinity
  2. Configure a location for storing core dumps. You can create the core directory under /local. Run the following command to create a directory in Access Gateway:

    install -m 1777 -d /var/local/dumps

    echo "/var/local/dumps/core.%e.%p"> /proc/sys/kernel/core_pattern

  3. Add a line “kernel.suid_dumpable=2” to the /etc/sysctl.conf configuration file.

  4. Add the CoreDumpDirectory /var/local/dumps advanced option in Access Gateway.

  5. Run the following commands:

    systemctl daemon-reload

    systemctl restart novell-apache2.service

  6. Apply changes to Access Gateway.

If a crash occurs, the core file is created in /local/apache2-gdb-dump/core.

For some crashes, the /local/debug000.log file is created. For more information, see TID 7011804.

This section describes the following tasks:

Starting Apache in Debug Mode

Use the following commands to start debug mode:

Linux: /etc/init.d/novell-apache2 stop OR rcnovell-apache2 stop

/etc/init.d/novell-apache2 start debug OR rcnovell-apache2 start debug

Windows: Use the following steps to enable debug mode:

  1. Create a tmp directory at the root of C:

  2. Stop Apache:

    1. Click Control Panel > Administrative Tools > Services.

    2. Right-click the Apache 2.4 service, then select Stop.

  3. Start Apache:

    1. Right-click the service, then click Properties.

    2. In the Start parameters box, specify

      -D allowServerDebug

    3. Click Start.

Examining the Debug Information

  1. Examine the Apache error log file or copy it so you can send it to NetIQ Technical Support:

    Linux: /var/log/novell-apache2

    Windows: \Program Files\Novell\apache\logs

  2. View the information at the local URLs or copy the pages to send to NetIQ Support:

    • http://127.0.0.1:8181/server-status

      This page displays debug information about caching, SSL, workers, and proxy information.

    • http://127.0.0.1:8181/server-info

      This page displays module and configuration information.

  3. If a crash occurred, examine the core dump file or copy it so you can send it to NetIQ Technical Support.

    Linux: /var/cache/novell-apache2

    Windows: C:\tmp directory that you created

Disabling Debug Mode

Use the following commands to disable debug mode:

Linux: /etc/init.d/novell-apache2 stop OR rcnovell-apache2 stop

/etc/init.d/novell-apache2 start nodebug OR rcnovell-apache2 start nodebug

Windows: Use the following steps to disable debug mode:

  1. Click Control Panel > Administrative Tools > Services.

  2. Right-click the Apache 2.4 service, then select Stop.

  3. Right-click the service, then click Properties.

  4. In the Start parameters box, remove

    -D allowServerDebug

  5. Click Start.