DBC:Errors/Executing: Difference between revisions

From Dirty Cache Wiki
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 3: Line 3:
= Some known errors that happen when running dbcollect. =
= Some known errors that happen when running dbcollect. =


== PK... errors ===
== PK... errors ==


<pre>
<pre>
Line 20: Line 20:
This means python is not in $PATH. On more recent RHEL Linux variants (EL 8), you need to specify
This means python is not in $PATH. On more recent RHEL Linux variants (EL 8), you need to specify
which Python major version is to be used. Select Python3 if unsure.
which Python major version is to be used. Select Python3 if unsure.
<code>alternatives --set python /usr/bin/python3</code>
<code>alternatives --set python /usr/bin/python3</code>


If you cannot set alternatives correctly, you can also run dbcollect directly with the right Python version:
<code>python3 /usr/local/bin/dbcollect [options]</code>
== Permission errors ==
Permission denied errors on the dbcollect command, such as:
<pre>
bash: /tmp/dbcollect: Permission denied
</pre>
If you run dbcollect as <code>root</code>, it will switch to the first detected 'oracle' user (user owning the ora_pmon_<sid> process). This user (usually <code>oracle</code>, has no execute access on the dbcollect package.


<syntaxhighlight lang=bash>
Causes:
# This means python is not in $PATH. 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


# Python3 should now be the default. Check:
* DBCollect placed in a different location than <code>/usr/local/bin</code> and the user has no rights on the directory (such as <code>/root/</code>)
ls -l $(readlink -f $(which python))
* The dbcollect executable itself has incorrect permissions
-rwxr-xr-x 2 root root 11872 Sep 24 11:46 /usr/libexec/platform-python3.6
* The dbcollect executable is placed in a directory that does not allow execution of binaries (such as <code>noexec</code> mount option on Linux)
* Problems with <code>SELinux</code> or <code>AppArmor</code> ?


== Git Clone issues ==


<pre>
Error: No buildinfo
Error: No buildinfo
# You are trying to run dbcollect using a cloned repository (git clone).
</pre>
# DBcollect should run as a ZipApp package and be downloaded from Github Releases to be reliable.
# You can manually build dbcollect if you really want to use the git repository.


You are trying to run dbcollect using a cloned repository (git clone).
{{dbcollect}} should run as a ZipApp package and be downloaded from Github Releases to be reliable.
You can manually build dbcollect if you really want to use the git repository.
<pre>
dbcollect must run from a ZipApp package, use https://github.com/outrunnl/dbcollect/releases/latest
dbcollect must run from a ZipApp package, use https://github.com/outrunnl/dbcollect/releases/latest
</pre>


 
Same as above except somehow you managed to create the buildinfo. Either go with the released ZipApp or
</syntaxhighlight>
follow the build procedure.

Latest revision as of 09:38, 15 November 2024


Some known errors that happen when running dbcollect.

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 problems

/usr/bin/env: ‘python’: No such file or directory

This means python is not in $PATH. 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 the ora_pmon_<sid> process). This user (usually oracle, has no execute access on the dbcollect package.

Causes:

  • DBCollect placed in a different location than /usr/local/bin and the user has no rights on the directory (such as /root/)
  • The dbcollect executable itself has incorrect permissions
  • The dbcollect executable is placed in a directory that does not allow execution of binaries (such as noexec mount option on Linux)
  • Problems with SELinux or AppArmor ?

Git Clone issues

Error: No buildinfo

You are trying to run dbcollect using a cloned repository (git clone). dbcollect should run as a ZipApp package and be downloaded from Github Releases to be reliable. You can manually build dbcollect if you really want to use the git repository.

dbcollect must run from a ZipApp package, use https://github.com/outrunnl/dbcollect/releases/latest

Same as above except somehow you managed to create the buildinfo. Either go with the released ZipApp or follow the build procedure.