Okta Access Gateway Log Download Fails Due to Size or Timeout Limits
Last Updated:
Overview
Okta Access Gateway (OAG) log downloads fail when the log files exceed default size limits or when the polling process times out. The configuration and UI logging messages were added with the 2023.4 version. Administrators must increase the maximum allowed log size or the polling timeout values in the configuration file to resolve this issue. When downloading logs from the OAG Admin Console, Okta displays one of the following errors:
minimum.disk.space.not.available=Not enough disk space available on the server to generate log file
disk.space.not.available=Log File is too large, not enough disk space available on the server to generate log file
failed.logs.not.available.for.given.date=Log files are not available for download for the given date
could.not.prepare.tar.gz.file=Failed to prepare log file
failed.remote.log.preparation.event.creation=Failed to complete log download task on worker node(s)
failed.remote.log.file.download.failed=Failed to download logs from worker node(s)
failed.remote.log.preparation.task.timeout=Log file size in worker node(s) too large, failed to download logs from worker(s)
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Access Gateway (OAG)
- Log Download
Cause
The log files exceed the default maximum allowed log size or disk space requirements, or the polling process times out before the worker nodes finish generating the logs.
Solution
The file size or timeout limits require adjustments in the configuration file.
Verify system utilization permits larger files, open the configuration file in the OAG shell, and increase either the file size or the timeout limits depending on the encountered error.
- Check the system utilization to ensure space permits by running the following commands:
sudo df -hls -lh /opt/oag/logs/all/ics_all.log*ls -lh /opt/oag/logs/archive/all/The archive for a specific date on an appliance will contain all logs from every directory under
/opt/oag/logs/. A rough estimation can be done by checking the directory size using :du -sh /opt/oag/logs/*NOTE:
- It is recommended to use log forwarders and keep minimal logging on the cluster. For more information, refer to Manage log verbosity.
- The workaround mentioned below should only be used as a temporary solution, and the changes must be reverted once the log download is successful.
- Sign in to the OAG shell.
- Open the configuration file using a text editor:
sudo vi /opt/oag/bin/logPrepareConfig.sh - For file size errors on all OAG nodes, increase the
MAX_ALLOWED_LOG_SIZEandDISK_SPACE_REQUIREDvalues to20000000(20GB). - Timeout errors will only be seen on the Admin node, increase the
MAX_ATTEMP_TO_GET_REMOTE_STATUSvalue to150(a 5-minute timeout).
NOTE: Increasing theSLEEP_BETWEEN_ATTEMPTSvalue is not recommended.
NOTE: Increasing theMAX_ATTEMP_TO_GET_REMOTE_STATUSon the worker nodes changes nothing.
How are the default settings restored?
Run the following command on any node to revert the configuration file to the default settings.
sudo sed -i -e 's/DISK_SPACE_REQUIRED=.*/DISK_SPACE_REQUIRED=2000000/' -e 's/MAX_ALLOWED_LOG_SIZE=.*/MAX_ALLOWED_LOG_SIZE=2000000/' -e 's/MAX_ATTEMP_TO_GET_REMOTE_STATUS=.*/MAX_ATTEMP_TO_GET_REMOTE_STATUS=30/' -e 's/SLEEP_BETWEEN_ATTEMPTS=.*/SLEEP_BETWEEN_ATTEMPTS=2/' /opt/oag/bin/logPrepareConfig.shHow is the log preparation process troubleshooted?
Set the global log level to info in the Admin Console, trigger the log download, and monitor the log preparation process using the tail command.
- Navigate to the Backups and logs tab, select Log storage, and set the Global verbosity to info.
- Run the following command to view the logs:
tail -F /opt/oag/logs/all/ics_all.log | grep LOG_PREPARE - Prompt the log download from the Admin Console.
- Observe the log messages to verify the polling status.
LOG_PREPARE_OPERATION SERVICE LOG_PREPARE_OPERATION INFO Polling log file on node myserver.lab, status=2NOTE: A status of 2 indicates that the log file generation on the target server has not completed. The process continues until it reaches the
MAX_ATTEMP_TO_GET_REMOTE_STATUSvalue or observes a status of 0. A status of 0 indicates completion. If the process fails with aFailed.remote.log.preparation.task.failederror, access the last polled node to investigate the failure.
