Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zabora with Container Databases (CDB) and Pluggable Databases (PDB) #9

Open
w00binda opened this issue Mar 11, 2021 · 5 comments
Open
Assignees

Comments

@w00binda
Copy link

Hello Sergio, we've installed Zabora plugin but we have some problem.
Version: Zabbix 4.0.3
Linux Version: Oracle Linux Server release 7.4
Zabora 1.5.4

We are using Oracle Container Database (CDB) with Pluggable Databases.
If we point to the Container Database, zabora.sh works pretty fine, but we need to monitor the pluggable database. And if we try to point to that the script hangs whitout any result.

Example:

export ORACLE_SID=CONTAINERDB
ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o "${ORACLE_SID}" -s db_version -a 1
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
export ORACLE_SID=PLUGGABLEDB
ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o "${ORACLE_SID}" -s db_version -a 1
hangs with no result

Do you have any idea?

Inside /etc/oratab we have something like:
CONTAINERDB:/oracle12c/app/oracle/product/12c:Y

And if we try to change there CONTAINERDB with PLUGGABLEDB, the script doesn't works.

Thanks in advance for any suggestion.

@sergiotocalini sergiotocalini self-assigned this Mar 11, 2021
@sergiotocalini
Copy link
Owner

Hi @w00binda,

Thanks for your information.
The script uses the oratab to setup the oracle environment so it is mandatory to have this properly setup. I would recommend to include the PLUGGABLEDB to your oratab with the right ORACLE_HOME.
If this is still not working, please include how do you use to use sqlplus with your PLUGGABLEDB and also include the environment variables.

Regards,
Sergio

@w00binda
Copy link
Author

Hi Sergio and thank you for your answer.

We've tried to add the pluggable DB inside /etc/oratab without success.

# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
CONTAINERDB:/oracle12c/app/oracle/product/12c:Y
PLUGGABLEDB:/oracle12c/app/oracle/product/12c:Y

If we try this command:

ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o PLUGGABLEDB -s tb_list

We get this is the error:

ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 3701 Additional information: 902253311 Process ID: 0 Session ID: 0 Serial number: 0 ERROR: ORA-01017: invalid username/password; logon denied ERROR: ORA-01017: invalid username/password; logon denied SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

Username and password are correct inside zabora.conf

We also tried with zabora.oraenv but we get the same error.

ORACLE_SID=PLUGGABLEDB
ORACLE_HOME=/oracle12c/app/oracle/product/12c
PATH=PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID ORACLE_HOME PATH

If we change the sqlplus command like this inside zabora.sh

sqlplus -s user/password@server.PLUGGABLEDB.example.com @${SQL} "${SQL_ARGS}"

The script works correctly, but it's a bit less flexible.

Regards.

@sergiotocalini
Copy link
Owner

Hi @w00binda,

It seems that your instances is not allowing to login from the sqlplus with localhost. It is not related with the script is an oracle misconfiguration.
Please review your configuration on the listeners about this.

Regards,
Sergio

@adoang1919
Copy link

Hi @w00binda,

how do you solve this config ?

Thanks

@sergiotocalini
Copy link
Owner

Hi @w00binda,

Thanks for opening the issue.
Are you facing the same issue? It seems @w00binda found a solution but please feel free to share here the issue you got.

Regards,
Sergio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants