<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>108.bz &#187; certificates</title>
	<atom:link href="http://www.108.bz/posts/tag/certificates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.108.bz</link>
	<description>Wandering futilities...</description>
	<lastBuildDate>Fri, 27 May 2011 09:08:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Failed to shutdown DBConsole Gracefully</title>
		<link>http://www.108.bz/posts/it/failed-to-shutdown-dbconsole-gracefully/</link>
		<comments>http://www.108.bz/posts/it/failed-to-shutdown-dbconsole-gracefully/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 23:07:52 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[RAC]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=300</guid>
		<description><![CDATA[Pretty average Oracle RAC Cluster (10g, two nodes). All of a sudden, trying to stop dbconsole results in an error: [oracle@racnode1 log]$ emctl stop dbconsole TZ set to Europe/Vatican Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0 Copyright (c) 1996, 2007 Oracle Corporation. &#160;All rights reserved. https://racnode1:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... [...]]]></description>
			<content:encoded><![CDATA[<p>Pretty average Oracle RAC Cluster (10g, two nodes). All of a sudden, trying to stop <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">dbconsole</span> results in an error:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[oracle@racnode1 log]$ emctl stop dbconsole<br />
TZ set to Europe/Vatican<br />
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0<br />
Copyright (c) 1996, 2007 Oracle Corporation. &nbsp;All rights reserved.<br />
https://racnode1:1158/em/console/aboutApplication<br />
Stopping Oracle Enterprise Manager 10g Database Control ...<br />
--- Failed to shutdown DBConsole Gracefully ---<br />
&nbsp;failed.</div></div>
<p>Similar behaviour when attempting to start it:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[oracle@racnode1 log]$ emctl start dbconsole<br />
TZ set to Europe/Vatican<br />
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0<br />
Copyright (c) 1996, 2007 Oracle Corporation. &nbsp;All rights reserved.<br />
https://racnode1:1158/em/console/aboutApplication<br />
Agent Version &nbsp; &nbsp; : 10.1.0.6.0<br />
OMS Version &nbsp; &nbsp; &nbsp; : 10.1.0.6.0<br />
Protocol Version &nbsp;: 10.1.0.2.0<br />
Agent Home &nbsp; &nbsp; &nbsp; &nbsp;: /opt/oracle/product/10.2.0/db_1/racnode1_DBSID1<br />
Agent binaries &nbsp; &nbsp;: /opt/oracle/product/10.2.0/db_1<br />
Agent Process ID &nbsp;: 24756<br />
Parent Process ID : 24753<br />
Agent URL &nbsp; &nbsp; &nbsp; &nbsp; : https://racnode1:3938/emd/main<br />
Started at &nbsp; &nbsp; &nbsp; &nbsp;: 2010-02-09 13:48:34<br />
Started by user &nbsp; : oracle<br />
Last Reload &nbsp; &nbsp; &nbsp; : 2010-02-09 13:48:34<br />
Last successful upload &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : (none)<br />
Last attempted upload &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: (none)<br />
Total Megabytes of XML files uploaded so far : &nbsp; &nbsp; 0.00<br />
Number of XML files pending upload &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp; &nbsp; 3971<br />
Size of XML files pending upload(MB) &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp; &nbsp;50.11<br />
Available disk space on upload filesystem &nbsp; &nbsp;: &nbsp; &nbsp;59.30%<br />
Agent is already started. Will restart the agent<br />
Stopping agent ... stopped.<br />
Starting Oracle Enterprise Manager 10g Database Control ............................................................................................. failed.<br />
------------------------------------------------------------------<br />
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/racnode1_DBSID1/sysman/log</div></div>
<p>Peeking into the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">emdctl.trc</span> logfile, I found something that definitely smelled of expired certificates:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">2010-02-09 13:54:14 Thread-4134193952 ERROR http: 6: Unable to initialize ssl connection with server, aborting connection attempt<br />
2010-02-09 13:54:16 Thread-4133477152 WARN &nbsp;http: snmehl_connect: connect failed to (racnode1:3938): Connection refused (error = 111)<br />
2010-02-09 13:54:41 Thread-4134140704 ERROR ssl: nzos_Handshake failed, ret=29024</div></div>
<p>This <a href="http://forums.oracle.com/forums/thread.jspa?threadID=994286">thread</a> on Oracle forums seems to confirm my suspicion.</p>
<p>And here&#8217;s what you do to fix the issue:</p>
<p>Ready your environment (<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">$ORACLE_SID,</span> <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">$ORACLE_HOME</span>, &#8230;). I &#8220;source&#8221; a script for that, each instance has its own.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[oracle@racnode1 ~]$ cat envDBSID.sh <br />
export ORACLE_SID=DBSID1<br />
export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1<br />
export PATH=/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:&quot;$ORACLE_HOME&quot;/bin<br />
<br />
[oracle@racnode1 ~]$ . envDBSID.sh</div></div>
<p>As I said, if the certificate is expired, dbconsole won&#8217;t shutdown cleanly. Fetch its pid and kill it manually.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[oracle@racnode1 ~]$ cat /opt/oracle/product/10.2.0/db_1/racnode1_DBSID1/emctl.pid &nbsp;25608<br />
<br />
[oracle@racnode1 ~]$ ps axo pid,command | grep 25608<br />
25608 /opt/oracle/product/10.2.0/db_1/jdk/bin/java -server -Xmx256M -XX [..]<br />
<br />
[oracle@racnode1 ~]$ kill 25608<br />
<br />
[oracle@racnode1 ~]$ ps axo pid,command | grep 25608<br />
[oracle@racnode1 ~]$</div></div>
<p>Run <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">emctl secure dbconsole</span>, it will generate the new certificates. Provide Oracle SYSMAN&#8217;s password and the hostname you&#8217;ll use (without domain name, in my case).<br />
The URL displayed (the port number) will also tell you if you&#8217;re on the right instance and got the intended environment.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[oracle@racnode1 ~]$ emctl secure dbconsole<br />
TZ set to Europe/Vatican<br />
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0<br />
Copyright (c) 1996, 2007 Oracle Corporation. &nbsp;All rights reserved.<br />
https://racnode1:5500/em/console/aboutApplication<br />
Enter Enterprise Manager Root password :<br />
Enter a Hostname for this OMS : racnode1<br />
<br />
DBCONSOLE already stopped... &nbsp; Done.<br />
Agent is already stopped... &nbsp; Done.<br />
Securing dbconsole... &nbsp; Started.<br />
Checking Repository... &nbsp; Done.<br />
Checking Em Key... &nbsp; Done.<br />
Checking Repository for an existing Enterprise Manager Root Key... &nbsp; Done.<br />
Fetching Root Certificate from the Repository... &nbsp; Done.<br />
Updating HTTPS port in emoms.properties file... &nbsp; Done.<br />
Generating Java Keystore... &nbsp; Done.<br />
Securing OMS ... &nbsp; Done.<br />
Generating Oracle Wallet Password for Agent.... &nbsp; Done.<br />
Generating wallet for Agent ... &nbsp; &nbsp;Done.<br />
Copying the wallet for agent use... &nbsp; &nbsp;Done.<br />
Storing agent key in repository... &nbsp; Done.<br />
Storing agent key for agent ... &nbsp; Done.<br />
Configuring Agent...<br />
Configuring Agent for HTTPS in DBCONSOLE mode... &nbsp; Done.<br />
EMD_URL set in /opt/oracle/product/10.2.0/db_1/racnode1_RDS1/sysman/config/emd.properties<br />
&nbsp; &nbsp;Done.<br />
Configuring Key store.. &nbsp; Done.<br />
Securing dbconsole... &nbsp; Sucessful.</div></div>
<p>Try and start <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">dbconsole</span>.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[oracle@racnode1 ~]$ emctl start dbconsole<br />
TZ set to Europe/Vatican<br />
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0<br />
Copyright (c) 1996, 2007 Oracle Corporation. &nbsp;All rights reserved.<br />
https://racnode1:5500/em/console/aboutApplication<br />
Starting Oracle Enterprise Manager 10g Database Control ............................. started.<br />
------------------------------------------------------------------<br />
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/racnode1_RDS1/sysman/log<br />
<br />
[oracle@racnode1 ~]$ emctl status dbconsole<br />
TZ set to Europe/Vatican<br />
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0<br />
Copyright (c) 1996, 2007 Oracle Corporation. &nbsp;All rights reserved.<br />
https://racnode1:5500/em/console/aboutApplication<br />
Oracle Enterprise Manager 10g is running.<br />
------------------------------------------------------------------<br />
Logs are generated in directory /opt/oracle/product/10.2.0/db_1/racnode1_RDS1/sysman/log</div></div>
<p>Be prepared to handle the same situation in a few months. To see the new certificate expiry date, open any HTTPS URL served by dbconsole (i.e.: https://racnode1:5500/em/console/aboutApplication) and click on the lock icon your web browser should show somewhere.</p>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=300" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/it/failed-to-shutdown-dbconsole-gracefully/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

