Problém 31:
Nedávno vyšla nová verze Grid Controlu, konkrétně se jedná o verzi 11g, která je určená pro operační systém Windows. Myslel jsem, že to bude rutijní práce, neboť jsem GC instaloval již hodněkrát a to různé verze, ale všechny na linuxu. Tohle bylo něco jiného a setkal jsem se zde s problémy, které jsem předtím řešit nemusel. Jeden z nich se týká problému se zabezpečením Agenta.Pokaždé, když jsem ho zkusil přepnout do secure módu, vypsal mě chybu:”EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.”
Analýza:
Jak je vidět z výpisu, agent běží a vše vypadá v pořádku, ale zatím nenehrál žádná data do OMS.c:\oracle\Middleware\agent11g\BIN>emctl status agentOracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.—————————————————————Agent Version : 11.1.0.1.0OMS Version : 11.1.0.1.0Protocol Version : 11.1.0.0.0

Agent Home : C:\Oracle\Middleware\agent11gAgent binaries : C:\Oracle\Middleware\agent11gAgent Process ID : 6112Agent URL : http://grid.tomas-solar.com:3872/emd/main/Repository URL : http://grid.tomas-solar.com:4889/em/upload/Started at : 2010-07-18 14:01:54Started by user : SYSTEMLast Reload : 2010-07-18 14:01:54Last successful upload : (none)Last attempted upload : (none)Total Megabytes of XML files uploaded so far : 0.00Number of XML files pending upload : 13Size of XML files pending upload(MB) : 15.84Available disk space on upload filesystem : 10.04%Last attempted heartbeat to OMS : 2010-07-18 14:02:24Last successful heartbeat to OMS : unknown—————————————————————Agent is Running and Ready

Pokaždé, když jsem zkusil data nahrát, objevila se následující chyba.

c:\oracle\Middleware\agent11g\BIN>emctl upload agentOracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.—————————————————————EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.

V logu agenta jsem dohledal chybu v komunikaci s OMS servere, který běží na tom samém serveru

c:\oracle\Middleware\agent11g\sysman\log\secure.log2010-07-18 13:44:57,197 [main] INFO agent.SecureAgentCmd secureAgent.226 – Requesting an HTTPS Upload URL from the OMS2010-07-18 13:44:57,259 [main] INFO agent.SecureAgentCmd openPage.829 – Opening: https://grid.tomas-solar.com:1159/em/genwallet2010-07-18 13:45:15,931 [main] INFO agent.SecureAgentCmd openPage.855 – Response Status Code: 2002010-07-18 13:45:15,931 [main] INFO agent.SecureAgentCmd openPage.863 – RESPONSE_STATUS header: null2010-07-18 13:45:15,931 [main] INFO agent.SecureAgentCmd openPage.864 – Response body: OMS is unavailable

Backend WLS or EM application seems to be down

2010-07-18 13:45:15,931 [main] INFO agent.SecureAgentCmd getOMSSecurePort.809 – Non-numeric response obtained: OMS is unavailable

Backend WLS or EM application seems to be down

2010-07-18 13:45:15,931 [main] INFO agent.SecureAgentCmd getOMSSecurePort.811 – OMS Secure Port: -12010-07-18 13:45:15,931 [main] ERROR agent.SecureAgentCmd secureAgent.231 – The OMS is not set up for Enterprise Manager Security.2010-07-18 13:45:15,931 [main] ERROR agent.SecureAgentCmd main.210 – Failed to secure the Agent:java.lang.Exception: The OMS is not set up for Enterprise Manager Security. at oracle.sysman.emctl.secure.agent.SecureAgentCmd.secureAgent(SecureAgentCmd.java:232) at oracle.sysman.emctl.secure.agent.SecureAgentCmd.main(SecureAgentCmd.java:203)2010-07-18 13:25:50,444 Thread-4712 ERROR http: 2848: Unable to initialize ssl connection with server, aborting connection attempt: ret -12010-07-18 13:25:50,444 Thread-4712 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://grid.tomas-solar.com:1159/em/upload/: retStatus=-12010-07-18 13:25:50,460 Thread-4712 WARN http: nmehl_readAgentKey: File access failure2010-07-18 13:25:50,460 Thread-4712 ERROR ssl: Open wallet failed, ret = 287592010-07-18 13:25:50,460 Thread-4712 ERROR ssl: nmehlenv_openWallet failed2010-07-18 13:25:50,460 Thread-4712 ERROR ssl: Error initializing SSL

Řešení:

Řešení bylo v celku jednoduché, ale dospět k němu chtělo trochu času a zkoušení. Nakonec jsem našel, že celý problém spočívá v pojmenováni serveru.Všude v dokumentaci se píše, že má být v souboru emd.properties udaný hostname i s doménou. Tohle však není pravda.

Můj server má následující hostname.

c:\oracle\Middleware\oms11g\BIN>hostnamegrid

Bylo tedy potřeba změnit hodnotu parametru REPOSITORY_URL, kterou nastavil instalátor.

V souboru c:\oracle\Middleware\agent11g\sysman\config\emd.propertiesREPOSITORY_URL=http://grid.tomas-solar.com:4889/em/upload/na REPOSITORY_URL=http://grid:4889/em/upload/

Potom již přepnutí do secure můdu prošlo v pořádku.

c:\oracle\Middleware\agent11g\BIN>emctl secure agentOracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.Agent successfully stopped… Done.Securing agent… Started.Enter Agent Registration Password :Agent successfully restarted… Done.Securing agent… Successful.c:\oracle\Middleware\agent11g\BIN>emctl start agentOracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.The Oracleagent11g1Agent service is starting…………The Oracleagent11g1Agent service was started successfully.c:\oracle\Middleware\agent11g\BIN>emctl upload agentOracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.—————————————————————EMD upload completed successfullyCommunication: Agent to OMS Communication Fails if the Agent’s REPOSITORY_URL Parameter has Incorrect Value [ID 737373.1]



Komentáře