6f429244e498457b8400e72e4af683b0 Alberto Blog: Failed to shutdown DBConsole Gracefully

venerdì 29 aprile 2011

Failed to shutdown DBConsole Gracefully


Oggi tratterò un argomento importante che riguarda Enterprise Manager Console nella versione 10G.
Stamattina dopo un riavvio del server di produzione non riuscivo più ad entrare nella console di EM.
Mi sono collegato al server e ho digitato:

$ emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://jdesun:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
--- Failed to shutdown DBConsole Gracefully ---

Subito sono rimasto un pò stupito, sono andato a vedermi il log nel file emagent.trc nel path /oracle/app/oracle/product/10.2.0/..../sysman/log:

2011-04-29 14:23:30 Thread-1049 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://jdesun:1158/em/upload/: retStatus=-1
2011-04-29 14:23:30 Thread-1049 ERROR ssl: nzos_Handshake failed, ret=29024
2011-04-29 14:23:30 Thread-1049 ERROR http: 257: Unable to initialize ssl connection with server, aborting connection attempt
2011-04-29 14:23:30 Thread-1049 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://jdesun:1158/em/upload/: retStatus=-1


Ho notato in questa sezione la segnalazione  Thread-1049 ERROR http: 257: Unable to initialize ssl connection with server, aborting connection attempt

Si tratta di un errore http riguardante la connessione SSL con il server.

Con il comando ps -fe | grep oracle|more ho verificato se c'era qualcosa rimasto in "hang"  che potesse bloccare tutte le nuove connessioni per poter gestire EM console.

oracle 24044    56   0 14:31:07 pts/1       0:05 /oracle/app/oracle/product/10.2.0/jdk/bin/java -server -Xmx256M -XX:MaxPermSize
oracle 24761 24382   0 14:35:54 pts/1       0:01 /oracle/app/oracle/product/10.2.0/bin/emagent

in effetti ho trovato due processi interessanti e che potrebbero essere i responsabili di questo errore.
Con il comando kill li ho terminati.

Ho riprovato quindi a rilanciare:
$ emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://jdesun:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
...  Stopped.

e questa volta senza problemi ;-)

Vedendo che si trattava di un errore SSL ho deciso di rigenerare un nuovo certificato di connessione per il server con l'apposito comando:

$emctl secure dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://jdesun:1158/em/console/aboutApplication
Enter Enterprise Manager Root password :
Enter a Hostname for this OMS : server_name

DBCONSOLE already stopped...   Done.
Agent is already stopped...   Done.
Securing dbconsole...   Started.
Checking Repository...   Done.
Checking Em Key...   Done.
Checking Repository for an existing Enterprise Manager Root Key...   Done.
Fetching Root Certificate from the Repository...   Done.
Updating HTTPS port in emoms.properties file...   Done.
Generating Java Keystore...   Done.
Securing OMS ...   Done.
Generating Oracle Wallet Password for Agent....   Done.
Generating wallet for Agent ...    Done.
Copying the wallet for agent use...    Done.
Storing agent key in repository...   Done.
Storing agent key for agent ...   Done.
Configuring Agent...
Configuring Agent for HTTPS in DBCONSOLE mode...   Done.
EMD_URL set in /oracle/app/oracle/product/10.2.0/...../sysman/config/emd.properties
  Done.
Configuring Key store..   Done.
Securing dbconsole...   Sucessful.

Il nuovo certificato è stato creato con successo allora perchè non provare subito.....

$ emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://jdesun:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ........................... started.
------------------------------------------------------------------
Logs are generated in directory /oracle/app/oracle/product/10.2.0/...../sysman/log

Wow...adesso tutto è ripartito ;-)...

Dovrò aspettarmi fra un paio di mesi lo stesso errore ??
Probabilmente sì,  ma per adesso tutto funziona....
:-)


Nessun commento:

Posta un commento