12
返回列表 发新帖
楼主: rocket_zhao

[安装] 关于EMCA手工配置问题

[复制链接]
11#
发表于 2008-9-1 13:11 | 只看该作者
主题:  Troubleshooting DbConsole Error - OC4J Configuration issue
  文档 ID:  注释:456111.1 类型:  TROUBLESHOOTING
  上次修订日期:  03-SEP-2007 状态:  PUBLISHED

In this Document
  Purpose
  Last Review Date
  Instructions for the Reader
  Troubleshooting Details
  References



--------------------------------------------------------------------------------



Applies to:
Enterprise Manager for RDBMS - Version: 10.1.0.0 to 10.2.0.0
Enterprise Manager Grid Control - Version: 10.1.0.0 to 10.2.0.0
Information in this document applies to any platform.

Purpose
The purpose of this document is to provide the steps needed to troubleshoot database control startup issues due to the below errors:

1. OC4J Configuration issue.
D:\oracle\10gdb/oc4j/j2ee/OC4J_DBConsole_x.x.x.x_ORCL10G not found.

2. OC4J Configuration issue.
/u01/app/oracle/product/10.1.0/db10g/oc4j/j2ee/OC4J_DBConsole_5
[main] WARN emSDK.config - Exception in getting local host java.net.UnknownHostException: <hostname>
at java.net.InetAddress.getLocalHost(InetAddress.java:1199)
at oracle.sysman.emSDK.conf.TargetInstaller.getLocalHost(TargetInstaller.java:4790)
at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3767) null_altpmp1 not found.

Last Review Date
August 27, 2007
Instructions for the Reader
A Troubleshooting Guide is provided to assist in debugging a specific issue. When possible, diagnostic tools are included in the document to assist in troubleshooting.
Troubleshooting Details
1. If the server is configured for DHCP

The issue is that on the DHCP server end, things can be configured to:

a. dynamically assign an IP address from a pool of IP's
b. dynamically assign an IP address/hostname from a pool of IP's and hostnames.

Most DHCP servers associate each IP address in the pool with a hostname in DNS. Thus, depending on how the hostname is retrieved, you may get the local Windows Machine Name (set by setting the machine name in the control panel) or you may get the DHCP assigned hostname (retrieved from DNS). What ends up happening is that you get a mixture of hostnames and IP addresses embedded in configuration files, and the DB control doesn't start.

The same thing would happen if you were to do an off-network install. When you are off-network, you would get the local machine name returned whenever a query to get the hostname is done. If you were to connect this to the network after the fact, then the servers would not start because the runtime calls to get the hostname would not match the off-network config-time call for the hostname which was embedded in multiple configuration files and directory names.

The way to address all of these issues is to configure the "Loopback Adapter" for Windows. This is essentially a virtual network card that you can configure and assign a dummy static IP address. Then in the "hosts" file, you can add an entry associated with this dummy static IP address and map that to the machine name associated with the system through the system properties.

If this Loopback adapter is configured to be the primary network adapter on the system, then any call to get the IP address of the system will return the dummy static IP associated with the loopback adapter. In call to get the hostname associated with this dummy IP address will return the real machine name, since this was associated with the IP address in the hosts file.

In addition, any call to get the hostname will also return the machine name (instead of the long DHCP hostname as before), since the loopback adapter is the primary network adapter.

In Windows, Refer ‘2.4 Oracle Database Network Topics’ to install a loopback adapter

Oracle® Database Installation Guide
10g Release 2 (10.2) for Microsoft Windows (32-Bit)
Part Number B14316-03

OR

Refer Note 274661.1 - Problem: Startup: Cannot Start DBCONSOLE on DHCP Machine after Reboot

2. If the server uses a static ip address

2a. Network Configuration:

The OM and agent components in dbcontrol uses full canonical name of a machine. This is done with a type of double-lookup/reverse-lookup to get the Fully Qualified Domain Name. Consult a Network Administrator for more details.

i) Check /etc/nsswitch.conf to see how lookups are to be performed by the Operating System

ii) All systems involving a HOSTS file must be setup like this:

NOTE: On Windows, the HOSTS file is under $WINDOWS/system32/drivers/etc

On Unix systems hosts file is under /etc

The file should have the IP address followed by the fully qualified hostname.domain name, and then a short hostname or alias.

For Example: hosts

10.10.10.10 hostname.domainname hostname

iii) To check:

> hostname
hostname.domainname

>ifconfig -a
10.10.10.10

On Windows,
ipconfig /all
10.10.10.10

>ping 10.10.10.10

>ping hostname.domainname
>ping hostname
>nslookup 10.10.10.10
>nslookup hostname.domainname
>nslookup hostname

The above commands should return the same output for hostname, hostname.domainname and ip_address.

Reference - Note 428665.1 - Installation Checklist for Testing Networking Configurations Prior to Installing EM Components

2b. Check if directories

<ORACLE_HOME>/<hostname>_<SID>
<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname_sid>

exist and have correct permissions for the same user who has installed the software.


Note:- If you have more than one database in the same ORACLE_HOME, database control has to be created for each SID. Thereby the directory names will be

<ORACLE_HOME>/<hostname>_<SID1>
<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname_sid1>

<ORACLE_HOME>/<hostname>_<SID2>
<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname_sid2>

If these directories don't exist, then the dbcontrol has to be created using the steps in Note 278100.1 : How To Drop, Create And Recreate DB Control In A 10g Database

2c. Ensure environment variables are set before starting the database control

ORACLE_HOME
ORACLE_SID

2d. If the hostname was changed, please recreate dbconsole using Note 278100.1 : How To Drop, Create And Recreate DB Control In A 10g Database



References
Note 274661.1 - Problem: Startup: Cannot Start DBCONSOLE on DHCP Machine after Reboot
Note 278100.1 - How To Drop, Create And Recreate DB Control In A 10g Database
Note 428665.1 - Installation Checklist for Testing Networking Configurations Prior to Installing EM Components

Keywords
CONFIGURE~OC4J; DB~CONTROL; DATABASE~CONTROL; DBCONTROL; DBCONSOLE;

使用道具 举报

回复
12#
发表于 2008-9-1 13:12 | 只看该作者
How to Troubleshoot Failed Login Attempts to DB Control
  文档 ID:  注释:404820.1 类型:  HOWTO
  上次修订日期:  31-AUG-2008 状态:  PUBLISHED

In this Document
  Goal
  Solution
  References



--------------------------------------------------------------------------------



Applies to:
Enterprise Manager Grid Control - Version: 10.2.0.1 to 10.2.0.1
Information in this document applies to any platform.

Goal
The purpose of this Note is to fast-track the debugging process with regard to the inability to connect or login to DB Console via a web-browser.
Solution
The following checks can be undertaken:


1. If failing to connect to DB Console via remote connection to the DB Console server, are you able to login to DB Console locally using a web-browser that is running on the actual DB Console Server? If so then the issue is at the remote workstation (network connectivity to the DB Console Server, firewall etc).

Preferably you should reference the DB Console server using a Fully Qualified Hostname in the web-browser URL.

1.0 If a firewall is being used, ensure that the EM Port (default non-secure port 5500 or default secure port 1158) is open for communication in the firewall e.g.

[oracle@abc ~]$ telnet xyz.oracle.com 5500
Trying <IP Address for xyz.oracle.com>...
Connected to xyz.oracle.com (<IP Address for xyz.oracle.com>).
Escape character is '^]'.

Note: The above example shows the output from a successful telnet.

Should telnet be disabled & ssh communication enabled then the following command can be used instead:

ssh -X xyz.oracle.com -p 5500
Note: A successful connect to the port using SSH will result in no output otherwise if not successfull the following error will show:

ssh: connect to host xyz port 1158: Connection refused

1.1 Are you able to ping the DB Console server from your machine? If not then get in contact with your network admin to resolve this networking issue.

1.2 If you are able to successfully ping the DB Console server from your machine then you need to determine the order of priority between the "hosts" file & DNS. To do this in a UNIX environment then issue the following command on your machine:



grep -i hosts /etc/nsswitch.conf


If the result has "files" before "dns" as follows:

"hosts: files dns"

then your "/etc/hosts" file is taking precedence over DNS. Sometimes machines are configured in this way to minimized the overhead on the network. You need to ensure that your "/etc/hosts" file is setup correctly with a reference to the DB Console server. Refer to Note 203280.1 Ext/Pub How to Configure the hosts File for 9iAS 9.0.2 Installations.
The contents of this note do not only apply to 9iAS 9.0.2 and are as follows:

Verify that /etc/hosts.* has the following format:



IP_ADDRESS FULLY_QUALIFIED_HOSTNAME SHORT_HOSTNAME ALIASES

The following example shows a properly configured /etc/hosts.* file:

<ip address>   <hostname.domain>  <hostname>   <alias>


1.3 If on the other hand, you can ping the DB Console server from your machine but the returned value from issuing the "grep -i hosts /etc/nsswitch.conf" command has the "dns" ahead of "hosts" then DNS is taking precedence. You then need to ensure that (a) an nslookup on the DB Console Hostname returns the DB Console host's correct IP address & (b) an nslookup on the DB Console's IP address (Reverse NSLOOKUP) returns the fully qualified name of the DB Console host. If this is not the case then please consult with you network admin.

A Good area to check for issues with connectivity & login to DB Console are the following files found on the DB Console server:

-> $ORACLE_HOME/hostname_sid/sysman/log/emoms.*


Login failures in DB Console will be logged in the emoms.* files.

2. Are you using the correct port in your URL reference to the DB Console?
There are 2 ways to check that you are using the correct port. They are as follows:

2.1 Go to the $ORACLE_HOME/install directory & take a look at the portlist.ini file.
The portlist.ini will contain the port assignments. Look for the "Enterprise Manager Console HTTP Port (ORACLE_SID) = <Port Number>" entry. Default DB Console port being 5500 (unsecured) whilst 1158 is the default for DB Console if it has been secured. So the URL to access DB Console should look like the following: http://<DB_Console_Host>:5500/em or
https://<DB_Console_Host>:1158/em i.e. http(s)://<DB_Console_Host>:<Port Number>/em

2.2 Go to the $ORACLE_HOME/hostname_sid/sysman/config directory & look for the following entries in the emoms.properties file:


oracle.sysman.emSDK.svlt.ConsoleServerPort=<DBConsole_Port_Number>
oracle.sysman.emSDK.svlt.ConsoleServerHTTPSPort=<DBConsole_Port_Number>



3. Is DB Console up & running? From the $ORACLE_HOME/bin directory run

emctl status dbconsole
to ensure that the DB Console is up & running. You should receive the following message if it is:

"Oracle Enterprise Manager 10g is running."

If the DB Console is not running then issue the

emctl start dbconsole
command from the same directory.

If any errors are reported in the starting up of the DB Console then please consult the log & trace file found in the $ORACLE_HOME/hostname_sid/sysman/log/ directory. In particular the emoms.* & emagent.* files.


4. Ensure that the Database is up & running as follows:

From the Database host issue:


sqlplus "/ as sysdba" SQL> startup immediate;


OR issue from the command prompt:


ps -ef |grep $ORACLE_SID


4.1 Ensure that the Database is not in the MOUNT state which means connections for normal users will fail with the error :
ERROR: ORA-01033: ORACLE initialization or shutdown in progress

To Correct this:
Connect as 'sys as sysdba' user and open the database and verify that the database is in 'READ WRITE' mode for all users.


SQL> alter database open; SQL> select name, OPEN_MODE from v$database;
NAME OPEN_MODE
--------- --------- <DB_NAME> READ WRITE


5. Ensure that the Listener is running & listening for the Database by issuing the following command:



lsnrctl status


You will see a result similar to the following output if it is up & running:


Service "ORACLE_SID" has 2 instance(s). Instance "ORACLE_SID", status
UNKNOWN, has 1 handler(s) for this service... Instance "ORACLE_SID", status
READY, has 1 handler(s) for this service...



5.1 Ensure that the listener does not reference any symbolic links (UNIX environment). If it does then copy across the actual files i.e. tnsnames.ora & listener.ora to their expected locations, removing the symbolic links. As the DB Console agent is unable to resolve the references from symbolic links.

6. Ensure that the SYSMAN', 'DBSNMP','MGMT_VIEW' accounts are not locked as follows:

6.1 From sqlplus, login as SYS & run the following command:


select username, account_status from dba_users where username in ('SYSMAN',
'DBSNMP','MGMT_VIEW');


Take note of the accounts that are locked.

6.2 Stop the DB Console by running the following command:


$ORACLE_HOME/bin/emctl stop dbconsole


6.3 Unlock the Accounts that are locked by running the following command:


alter user <username> account unlock;


6.4 Start the DB Console once more by running.


$ORACLE_HOME/bin/emctl start dbconsole


7. Check to see whether the SYSMAN or DBSNMP user passwords have recently changed. If so, find out what the new password is & use it to login to DB Console as the SYSMAN user. Then remap the new DBSNMP password into the "Monitoring Credentials" for the Agent that is monitoring the Database if the DBSNMP password has also changed.

7.1 Ensure that the OEM_MONITOR privilege exists & has been granted to the SYSMAN user account or any other Administrator level account that has been created for the purpose of monitoring & administering the Database. Refer to Note 152593.1 How to Grant OEM_MONITOR Role to Database Preferred Credentials:

8. Other connection Related Problems with DB Console
---------------------------------------------------
[Problem:] ORA-1017 ERROR when logging into DB Console.
Problems with the credentials, when trying to connect with sys as sysdba locally there is no problem, but when trying to connect remotely an ORA-1017 ERROR is experienced.

[Answer:] This normally has to do with the remote_login_passwordfile parameter, needing to be set to EXCLUSIVE.
Refer to Note 204166.1 Connecting To Database From EM to db target as SYSDBA Fails With ORA-1031

[Problem:] Agent sends message "Failed to connect to database instance: ORA-12537: TNS:connection closed (DBD ERROR: OCIServerAttach)." though everything seems to be fine.

[Answer:] The ONS may be interfering with effective listener operation as described in :
Note 284602.1 10g Listener: High CPU Utilization - Listener May Hang

Explicitly disable the 10g TNS Listener from subscribing to the ONS.
Edit the active 10g listener.ora file and add the parameter below:


SUBSCRIBE_FOR_NODE_DOWN_EVENT_<listener_name>=OFF


where <listener_name> would be replaced with the actual listener name
configured in the listener.ora file.
For example, if the listener name is LISTENER (default), the parameter would be:


SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF


then restart the listener

This error message should disappear.

[Problem:] when connecting to DB Console as SYSDBA in a Windows Environment. It returns insuffient privleges ORA-01031.

[Answer:]
1. Include the following to the sqlnet.ora

SQLNET.AUTHENTICATION_SERVICES= (NTS)


2. Ensure the the OS user has the "Logon as a Batch Job" privilege

[Problem:] New basic installation Of Enterprise Edition Database Control in Windows. The installation is completed. Can log on the database using SQL plus, but can not access the database control. It display a blank page.

[Answer:] Ensure the appropriate services have been started & set to auto-startup as follows:

To autostart make the following changes to the registry.


HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE->KEY_<ORACLE_SID>_home1->
ORA_<ORACLE_SID>_AUTOSTART=TRUE
ORA_<ORACLE_SID>_SHUTDOWN=TRUE
ORA_<ORACLE_SID>_SHUTDOWN_TIMEOUT=90
ORA_<ORACLE_SID>_SHUTDOWNTYPE=immediate


Also in "Services" ensure that the "OracleService<ORACLE_SID>" is set to autostartup. As well as the TNSLISTENER & DBConsole services.


[Problem:] Attempt to start the dbconsole with emctl start dbconsole generates the following message:


OC4J Configuration issue.
$ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname_sid> not found.


[Answer:] When upgrading the database from a previous version, the emca is not ran thus the dbconsole is not configured. Depending on the existing configuration different approaches are done:

If you upgraded the database from a previous version(9i), then you must drop the existing SYSMAN repository and create a new one using emca.

If you manually create a database and no SYSMAN reporistory was created, run the emca

If you used the DBCA and created the scripts with the Database Control option, the repository was created, you will need to run the

emca -r


Refer to the following notes:

Note 456111.1 Troubleshooting DbConsole Error - OC4J Configuration issue
Note 297363.1 Oc4j Configuration Issue Starting Em Dbconsole Oc4j 'CONFIG ORA-00922 missing or invalid option':

[Problem:] Migrated a single instance DB from host abc123 to RAC hostname def456. The services DB is up fine, but when logging into Enterprise Control Manager. It references the wrong connection string. When logging in, it attempts to connect to abc123 instead of def456. It seems to be acquiring this string from the DB it, how to modify it so that it picks up host def456?

[Answer:] Drop and recreate the DB CONTROL with the correct hostname as follows:




A. Login to SQLPLUS as user SYS or SYSTEM, and drop the sysman account &
mangement objects: -> Clean up the Db Console repository a. drop user sysman cascade; b. drop role MGMT_USER;
c. drop user MGMT_VIEW cascade; d. drop public synonym MGMT_TARGET_BLACKOUTS; e. drop public synonym SETEMVIEWUSERCONTEXT;
f. issue a "commit;" B. Export the correct values for the ORACLE_HOME and ORACLE_SID environment variables
C. Change directories to the $ORACLE_HOME/bin directory D. Cleanup the External DB Console Configuration files by
issuing: emca -deconfig dbcontrol db -repos drop E. Recreate the DB Console Repository & external Configuration files by issuing: emca -config dbcontrol db -repos create



9. As a "Catch All", the DB Console can be recreated. Please keep in mind that *RE-CREATING THE DB CONSOLE WILL WIPE OUT ALL SCHEDULED JOBS*. But it will keep all the existing job definitions in-tact. This is a known issue for Database Control up to version 10.2.0.2. If you are fine with the possibility of having all your job schedules wiped out then you may proceed to undertake the steps to re-create the DB Console configuration files. If a re-build of the *DB Console configuration files ONLY* was insufficient in resolving the issue, then if you can afford to lost the existing Repository information then also rebuild the Repository in addition to the DB Console Configuration files.

SCENARIO 1: Delete the DB Control using scripts:



A) To delete only the configuration files: In 10g R1 run:
<ORACLE_HOME>/bin/emca -x <sid> In 10g R2 run:
<ORACLE_HOME>bin/emca -deconfig dbcontrol db B) To delete only the DB Control repository: In both 10g R1 and R2 run:
<ORACLE_HOME>/sysman/emdrep/bin/RepManager <hostname> <listener_port> <sid> -action drop C) To delete both the configuration files and the repository: In 10g R1 do:
<ORACLE_HOME>/bin/emca -x <sid>
<ORACLE_HOME>/sysman/emdrep/bin/RepManager <hostname> <listener_port> <sid> -action drop In 10g R2 do:
<ORACLE_HOME>/bin/emca -deconfig dbcontrol db -repos drop


SCENARIO 2: Manually delete the DB Control:

The procedure is the same for 10g R1 and R2

A) To delete the configurartion files:
- remove the following directories from your filesystem:


<ORACLE_HOME>/<hostname_sid>
<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>


SCENARIO 3: Create the DB Control



A) To create only the DB Control configuration files, skipping the repository
creation (this would be done for instance if you dropped only the files and left
the repository in place): In 10g R1 do: <ORACLE_HOME>/bin/emca -r
In 10g R2 do: <ORACLE_HOME>/bin/emca -config dbcontrol db B) To create the DB Control configuration files and repository: In 10g R1 do:
<ORACLE_HOME>/bin/emca In 10g R2 do <ORACLE_HOME>bin/emca -config dbcontrol db -repos create



You can use the steps above to recreate the DB Control (configuration files and repository). There are 2 typical scenarios:
- you only recreate the DB Control configuration files (i.e. if you suspect that the repository is intact)
- you recreate the configuration files as well as the repository (i.e. if you suspect that the repository may be corrupt);

NOTE: In 10g R2 you can use the following comand to recreate (drop and create) the DB Control configuration files and repository:
<ORACLE_HOME>/bin/emca -config dbcontrol db -repos recreate

For additional information on emca commandline options, please see the Oracle Enterprise Manager 10g Advanced Configuration Guide.
10g R1: http://download.oracle.com/docs/pdf/B12013_03.pdf
10g R2: http://download.oracle.com/docs/ ... c/em.102/e10954.pdf


10. A piece of advice: Please include the backup of the $ORACLE_HOME/hostname_sid/sysman/config/*.* files in your backup strategy for DB Console esp. the emoms.properties file.


AIX Based Systems

Note 332805.1 - Database Control failing on AIX5L system with DISPLAY set incorrectly - unable to access Enterprise Manager website.
Note 399403.1 - Db Control Hangs When Shutting Down

References
Note 273758.1 - How To: Configure a 10g Database When DB Control Shows The Status Of Unavailable
Note 274661.1 - Problem: Startup: Cannot Start DBCONSOLE on DHCP Machine after Reboot
Note 276950.1 - How to setup Enterprise Manager Database Control for SSL (HTTPS) secure connection
Note 278100.1 - How To Drop, Create And Recreate DB Control In A 10g Database
Note 309595.1 - Attempting to use EM 10g Java Console gets error: Procedure Entry Point Kpuhhalo Could Not Be Located In Dynamic Link Lib Oci.Dll
Note 330130.1 - Overview Of The EMCA Commands Available for DB Control 10.2 Installations
Note 335571.1 - Enterprise Manager Database Control only starts on one node of my RAC cluster. How do I start it on another node?
Note 383085.1 - Problem: Running EMCA Fails With "Could not complete the configuration" When DBSNMP Password is Incorrectly Specified at During DB Control Creation
Note 393727.1 - Failed To Connect To The Database: Io Exception
Note 395162.1 - How to manage DB Control 10.2 for RAC Database with emca
Note 398499.1 - Problem: Startup: EM Database Control Has Stopped Working and Unable to Start Again
Note 399751.1 - Cannot Logon To Oem Console After Changing IP Address
Note 456111.1 - Troubleshooting DbConsole Error - OC4J Configuration issue

Keywords
HANGING ; TNSNAMES.ORA ; LISTENER.ORA ; LOGON ; DATABASE~CONTROL ; CHANGE~PASSWORD ; TNSNAMES.ORA ; UNABLE~TO~CONN

使用道具 举报

回复
论坛徽章:
0
13#
 楼主| 发表于 2008-9-1 13:17 | 只看该作者
谢谢大师,另外,如果手工删除EMCA  -DECONFIG DBCONTROL DB -REPOS DROP
后后者从新配置 EMCA -REPOS RECREATE后往往提示配置失败,原因SYSMAN用户和相关的同义词存在,会导致配置失败,我用
drop user sysman cascade;
drop user dbsnmp cascade;
drop user mgmt_view cascade;
drop role  MGMT_USER cascade;
drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;
才能从新配置。这是怎么回事情。

使用道具 举报

回复
14#
发表于 2008-9-1 13:30 | 只看该作者
数据库里已有的东西,在创建肯定有问题,名字都一样的

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表