Troubleshooting
DBCollect Troubleshooting
Tips
-
Debug : If something fails, run dbcollect with the
-D(debug) option. This will show the content of exception debug messages and print the full dbcollect.log logfile when finished. -
Logfile : dbcollect writes log messages to
/tmp/dbcollect.log. This file will be moved into the dbcollect ZIP file when dbcollect finishes. View the contents of /tmp/dbcollect.log or dump it from the zip file:unzip -qc /tmp/dbcollect-hostname.zip hostname/dbcollect.log -
Sending failed results : If something goes wrong, you can send the ZIP file anyway, this allows me to inspect the debug messages and find out what went wrong.
Problems with executing DBCollect
dbcollect itself will not run for some reason.
PK Errors
File "dbcollect", line 2
PK"""
This means you are running a very old Python version (before 2.6) that does not understand Python ZipApp packages
Environment issues
/usr/bin/env: ‘python’: No such file or directory
This means python is not in $PATH, or env does not work correctly.
On more recent RHEL Linux variants (EL 8), you need to specify which Python major version is to be used. Select Python3 if unsure.
alternatives --set python /usr/bin/python3
If you cannot set alternatives correctly, you can also run dbcollect directly with the right Python version:
python3 /usr/local/bin/dbcollect [options]
Permission errors
Permission denied errors on the dbcollect command, such as:
bash: /tmp/dbcollect: Permission denied
If you run dbcollect as root, it will switch to the first detected oracle`` user (user owning theora_pmon_process).
This user (usuallyoracle`, has no execute access on the dbcollect package.
Causes:
- DBCollect placed in a different location than
/usr/local/binand the user has no rights on the directory (such as/root/) - The dbcollect executable itself has incorrect permissions (use
chmod 755 <dbcollect_path>) - The dbcollect executable is placed in a directory that does not allow execution of binaries (such as
noexecmount option on Linux) - Problems with
SELinuxorAppArmor?
DBCollect Error and warning messages
dbcollect runs but spits out error or warning messages.
Almost all errors and warning messages have a message ID. For errors, this is E followed by a 3-digit number, for warnings, this is W followed by a 3-digit number. The list of messages can be found here Errors:
DBcollect runs for a very long time
This is most likely due to performance issues in Oracle with the generation of AWR reports. It is especially the case if you run dbcollect on Oracle RAC. There are a number of known issues that cause it to be very slow. I have observed up to 20 seconds per AWR report (usually about 0.5 seconds) making dbcollect run for over an hour or more for a typical 10-day, 1-hour interval, single database cluster. Check Support notes for fixes and workarounds: 2404906.1, 2565465.1, 2318124.1, 29932310.8, 2148489.1, 29470291.8. Or be very patient.
Update: As of version 1.11, dbcollect runs multiple AWR reports in parallel for each instance, making it much faster, by default 50% of CPUs with a max of 8.
To use all available CPUs, use --tasks 0 (note that CPU load will likely go to 100%, be careful)
You may also try to cleanup the Oracle Recycle Bin:
SQL> purge dba_recyclebin;
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
SQL> EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
Other errors
Error: No buildinfo or dbcollect must run from a ZipApp package
dbcollect must run from a ZipApp package, but you are trying to run dbcollect using a cloned repository (git clone). You can manually build dbcollect if you really want to use the git repository.
Same as above except somehow you managed to create the buildinfo. Either go with the released ZipApp or follow the build procedure.
Missing Argparse
- Python-argparse (is usually included in the Python distribution except for very old versions)
TBD...