<?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; Oracle</title>
	<atom:link href="http://www.108.bz/posts/tag/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.108.bz</link>
	<description>Wandering futilities...</description>
	<lastBuildDate>Wed, 08 Sep 2010 13:45:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Oracle Reports Server font issues</title>
		<link>http://www.108.bz/posts/it/oracle-reports-server-font-issues/</link>
		<comments>http://www.108.bz/posts/it/oracle-reports-server-font-issues/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 13:45:53 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=572</guid>
		<description><![CDATA[Here&#8217;s a couple of hints you may find useful when shooting troubles around Oracle Reports Server. It all starts when Customer wants to produce PDF reports using a custom font. Of course the font won&#8217;t be there when the file is opened on a client PC. The report server must either embed (include entirely) or [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a couple of hints you may find useful when shooting troubles around <a href="http://en.wikipedia.org/wiki/Oracle_reports">Oracle Reports Server</a>.<br />
It all starts when Customer wants to produce PDF reports using a custom font. Of course the font won&#8217;t be there when the file is opened on a client PC. The report server must either <i>embed</i> (include entirely) or <i>subset</i> (include just the actually used glyphs) the font into the PDF.</p>
<p>We&#8217;re running <a href="http://www.oracle.com/technology/documentation/appserver1012.html">Oracle Application Server 10g Release 2</a> on Windows.</p>
<p>More than one Reports Server (RS from now on) can be run at the same time. Each RS is identified by name. Open a DOS window, change directory to the one where reports templates/resources are, then launch:</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">rwserver server=rstest</div></div>
<p><a href="http://www.108.bz/wp-content/uploads/2010/09/rsts01.png"><img src="http://www.108.bz/wp-content/uploads/2010/09/rsts01.png" alt="Test Oracle Reports Server is running" title="rsts01" width="390" height="200" class="aligncenter size-full wp-image-576" /></a></p>
<p>RS named &#8220;rstest&#8221; will get its own log directory and configuration file, under the Application Server &#8220;HOME&#8221;:</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">reports\conf\rstest.conf<br />
reports\logs\rstest\<br />
reports\logs\rstest\rwserver.log</div></div>
<p>Quite convenient: you&#8217;ll leave the production RS alone, be able to activate debug tracing, restart at will, &#8230;</p>
<p>Here&#8217;s how tu run a test report on the &#8220;rstest&#8221; RS:</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">rwclient SERVER=rstest REPORT=d01_skt_anag1.rdf userid=user/pwd@db DESFORMAT=pdf DESTYPE=file DESNAME=c:\temp\testoutput.pdf</div></div>
<p>Back to our issues. First step, I&#8217;d say, is to find out the exact name of the font we&#8217;d like to embed. Did you know you can convert Report Developer &#8220;source&#8221; files (<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">.rdf</span>) to XML, then peek in them? Use:</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">rwconverer STYPE=rdffile SOURCE=d01_skt_anag1.rdf DTYPE=xmlfile dest=c:\temp\rpt.xml</div></div>
<p>&#8220;Cooper Black&#8221; is the name:</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">C:\dev\appl\Reports&gt;findstr /I face c:\temp\rpt.xml | findstr /I coop<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;font face=&quot;Cooper Black&quot; size=&quot;14&quot; bold=&quot;yes&quot; textColor=&quot;red&quot;/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;font face=&quot;Cooper Black&quot; size=&quot;11&quot; bold=&quot;yes&quot; textColor=&quot;red&quot;/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;font face=&quot;Cooper Black&quot; size=&quot;12&quot; bold=&quot;yes&quot; textColor=&quot;red&quot;/&gt;</div></div>
<p>Install the font in Windows. Oddly, things didn&#8217;t seem to work for me when I just copied the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">.ttf</span> file in the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">C:\WINDOWS\Fonts</span> directory. I had to use the &#8220;Install New Font&#8221; menu item. I thought both methods were equivalent, maybe I was wrong, maybe I&#8217;m talking junk now.</p>
<p><a href="http://www.108.bz/wp-content/uploads/2010/09/rsts03.png"><img src="http://www.108.bz/wp-content/uploads/2010/09/rsts03.png" alt="TTF font install in Windows" title="rsts03" width="377" height="257" class="aligncenter size-full wp-image-578" /></a></p>
<p>Modify the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">uifont.ali</span> file (<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">tools\common</span>), telling the Report Server to subset &#8220;Cooper Black&#8221; into the generated PDF files. Just add a line under the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">PDF:Subset</span> section, equating the font name to the TTF file name, both enclosed in double quotes.</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">[ PDF:Subset ]<br />
&quot;Cooper Black&quot; = &quot;COOPBL.TTF&quot;</div></div>
<p>The <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">fnchk.exe</span> program (ran without arguments) displays the full path of <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">uifont.ali</span> and tells if everything is fine or the file contains any syntax error.</p>
<p>Installing the font in Windows is not enough, you should also put it in one of the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">REPORTS_PATH</span> directories. The value of this variable can be found in the registry, I chose: <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">C:\Oracle\Products\FRHome\reports\templates</span>. <a href="http://en.wikipedia.org/wiki/Filemon">FileMon</a> is essential when trying to see which files can&#8217;t be found by a process.</p>
<p>Time to restart the Reports Service, generate a PDF report and check if fonts are good (in Acrobat Reader: CTRL-D, &#8220;Fonts&#8221; tab). Ours is listed as &#8220;Embedded Subset&#8221;; we&#8217;re done.</p>
<p><a href="http://www.108.bz/wp-content/uploads/2010/09/rsts06.png"><img src="http://www.108.bz/wp-content/uploads/2010/09/rsts06-294x300.png" alt="Embedded Subset Font in PDF" title="rsts06" width="294" height="300" class="aligncenter size-medium wp-image-580" /></a></p>
<p>See also: Oracle Support Note.350971.1 <i>&#8220;Troubleshooting Guide for Font Aliasing / Font Subsetting / Font Embedding Issues&#8221;</i>.</p>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=572" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/it/oracle-reports-server-font-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>3</slash:comments>
		</item>
	</channel>
</rss>
