Friday, April 17, 2015

WebLogic Server fails to start with SecurityServiceRuntimeException Error

WebLogic Server does not start, showing the following stack trace, soon after Domain creation:


weblogic=>./startWebLogic.sh
.
.
JAVA Memory arguments: -Xms256m -Xmx512m  -XX:MaxPermSize=256m
.
WLS Start Mode=Production
.
CLASSPATH=/app01/oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/app01/oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/app01/java/jdk1.6.0_43/lib/tools.jar:/app01/oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/app01/oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/app01/oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/app01/oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/app01/oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/app01/oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/app01/oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/app01/oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar
.
PATH=/app01/oracle/Middleware/wlserver_10.3/server/bin:/app01/oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/app01/java/jdk1.6.0_43/jre/bin:/app01/java/jdk1.6.0_43/bin:/app01/oracle/Middleware/wlserver_10.3/server/bin:/app01/oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/app01/java/jdk1.6.0_43/jre/bin:/app01/java/jdk1.6.0_43/bin:/app01/oracle/Middleware/wlserver_10.3/server/bin:/app01/oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/weblogic/bin:/home/weblogic/bin:/home/weblogic/bin:/app01/java/jdk1.6.0_43
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
Starting WLS with line:
/app01/java/jdk1.6.0_43/bin/java -server   -Xms256m -Xmx512m  -XX:MaxPermSize=256m -Dweblogic.Name=MedRecAdmServer -Djava.security.policy=/app01/oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy  -Dweblogic.ProductionModeEnabled=true  -Xverify:none  -da -Dplatform.home=/app01/oracle/Middleware/wlserver_10.3 -Dwls.home=/app01/oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/app01/oracle/Middleware/wlserver_10.3/server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/app01/oracle/Middleware/patch_wls1036/profiles/default/sysext_manifest_classpath:/app01/oracle/Middleware/patch_ocp371/profiles/default/sysext_manifest_classpath  weblogic.Server
<Apr 17, 2015 8:44:26 AM EDT> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
<Apr 17, 2015 8:44:26 AM EDT> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
<Apr 17, 2015 8:44:26 AM EDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 20.14-b01 from Sun Microsystems Inc.>
<Apr 17, 2015 8:44:27 AM EDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 >
<Apr 17, 2015 8:44:28 AM EDT> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server:
<Apr 17, 2015 8:44:35 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Apr 17, 2015 8:44:35 AM EDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<Apr 17, 2015 8:44:35 AM EDT> <Notice> <Log Management> <BEA-170019> <The server log file /app01/oracle/Middleware/user_projects/domains/MedRecDomain/servers/MedRecAdmServer/logs/MedRecAdmServer.log is opened. All server side log events will be written to this file.>
<Apr 17, 2015 8:44:38 AM EDT> <Warning> <Security> <BEA-090076> <A failure occurred attempting to load LDIF for provider Authorizer from file /app01/oracle/Middleware/wlserver_10.3/server/lib/XACMLAuthorizerInit.ldift.>
<Apr 17, 2015 8:44:38 AM EDT> <Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /app01/oracle/Middleware/wlserver_10.3/server/lib/XACMLAuthorizerInit.ldift..
weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /app01/oracle/Middleware/wlserver_10.3/server/lib/XACMLAuthorizerInit.ldift.
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initializeRealm(CommonSecurityServiceManagerDelegateImpl.java:466)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadRealm(CommonSecurityServiceManagerDelegateImpl.java:841)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initializeRealms(CommonSecurityServiceManagerDelegateImpl.java:870)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1032)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)
    Truncated. see log file for complete stacktrace
Caused By: com.bea.common.engine.ServiceInitializationException: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /app01/oracle/Middleware/wlserver_10.3/server/lib/XACMLAuthorizerInit.ldift.
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:365)
    at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)
    at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257)
    at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72)
    at weblogic.security.service.CSSWLSDelegateImpl.getService(CSSWLSDelegateImpl.java:155)
    Truncated. see log file for complete stacktrace
Caused By: weblogic.security.spi.ProviderInitializationException: A failure occurred attempting to load LDIF for provider Authorizer from file /app01/oracle/Middleware/wlserver_10.3/server/lib/XACMLAuthorizerInit.ldift.
    at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadFullLDIFTemplate(BootStrapServiceImpl.java:910)
    at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadLDIFTemplate(BootStrapServiceImpl.java:688)
    at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadLDIFXACMLAuthorizerTemplate(BootStrapServiceImpl.java:176)
    at com.bea.common.store.bootstrap.internal.BootStrapServiceImpl.loadLDIFXACMLAuthorizerTemplate(BootStrapServiceImpl.java:160)
    at com.bea.common.security.internal.service.BootStrapServiceImpl.loadLDIFXACMLAuthorizerTemplate(BootStrapServiceImpl.java:106)
    Truncated. see log file for complete stacktrace
Caused By: <openjpa-1.1.1-SNAPSHOT-r422266:1172209 fatal store error> kodo.jdo.FatalDataStoreException: The transaction has been rolled back.  See the nested exceptions for details on the errors that occurred.
    at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2170)
    at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2017)
    at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1915)
    at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1833)
    at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
    Truncated. see log file for complete stacktrace
Caused By: <openjpa-1.1.1-SNAPSHOT-r422266:1172209 nonfatal store error> kodo.jdo.DataStoreException: ORA-00942: table or view does not exist
 {prepstmnt 1198520800 INSERT INTO BEAXACMLAP (DOMN, REALMN, TYPEN, CN, XVER, CTS, WCN, WCI, WXF, XD, XS, MTS) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(String) MedRecDomain, (String) myrealm, (String) Policies, (String) urn:bea:xacml:2.0:entitlement:resource:type@E@Fmbean@G, (String) 1.0, (null) null, (null) null, (null) null, (Blob) oracle.sql.BLOB@315cb235, (InputStream) java.io.ByteArrayInputStream@3cb7cee4, (String) 3, (Timestamp) 2015-04-17 08:44:38.792] [reused=0]} [code=942, state=42000]
FailedObject: com.bea.common.security.store.data.XACMLAuthorizationPolicy@55ab3cda
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4207)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4171)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:72)
    at kodo.jdbc.kernel.BatchingPreparedStatementManager.flushInternal(BatchingPreparedStatementManager.java:214)
    Truncated. see log file for complete stacktrace
Caused By: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00942: table or view does not exist
 {prepstmnt 1198520800 INSERT INTO BEAXACMLAP (DOMN, REALMN, TYPEN, CN, XVER, CTS, WCN, WCI, WXF, XD, XS, MTS) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(String) MedRecDomain, (String) myrealm, (String) Policies, (String) urn:bea:xacml:2.0:entitlement:resource:type@E@Fmbean@G, (String) 1.0, (null) null, (null) null, (null) null, (Blob) oracle.sql.BLOB@315cb235, (InputStream) java.io.ByteArrayInputStream@3cb7cee4, (String) 3, (Timestamp) 2015-04-17 08:44:38.792] [reused=0]} [code=942, state=42000]
    at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
    at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)
    at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:866)
    at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1453)
    Truncated. see log file for complete stacktrace
>
<Apr 17, 2015 8:44:38 AM EDT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Apr 17, 2015 8:44:38 AM EDT> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason:

There are 1 nested errors:

weblogic.security.service.SecurityServiceRuntimeException: [Security:090399]Security Services Unavailable
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:917)
    at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1054)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)
    at weblogic.security.SecurityService.start(SecurityService.java:141)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

>
<Apr 17, 2015 8:44:38 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<Apr 17, 2015 8:44:38 AM EDT> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<Apr 17, 2015 8:44:38 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
weblogic.oraclesys.com /app01/oracle/Middleware/user_projects/domains/MedRecDomain/bin
weblogic=>cd $WL_HOME/server/lib
weblogic.oraclesys.com /app01/oracle/Middleware/wlserver_10.3/server/lib
weblogic=>ls



Probable Solution:

The database administrator needs to run the SQL script that creates the RDBMS tables in the datastore which are used by the RDBMS security store. A set of SQL scripts for creating and removing these tables for each supported RDBMS system is available in WL_HOME/server/lib
During the process of configuring the RDBMS security store via the Configuration Wizard, you are presented with the option of testing the database connection. Oracle strongly recommends using this option because it can verify that the connection is set up properly. If there were a problem with the database connection, you might not be able subsequently to boot the domain if the security providers that control access to that domain are unable to obtain the necessary security policies.

Create RDBMS Tables in the Security Datastore

Prior to booting the domain, the database administrator needs to run the SQL script that creates the RDBMS tables in the datastore used by the RDBMS security store. A set of SQL scripts for creating these tables for, and also removing them from, each supported RDBMS system is available in the following WebLogic Server installation directory:
WL_HOME/server/lib

When running the appropriate SQL script for the database serving as the RDBMS security store, be sure to specify the same connection properties, including the credentials of the user who has access, the database URL, etc., as specified for that RDBMS during domain creation.
Oracle 9i, 10g, 11g
———————————————
CREATE- rdbms_security_store_oracle.sql

REMOVE- rdbms_security_store_oracle_remove.sql
MS-SQL 2000, 2005
———————————————
rdbms_security_store_sqlserver.sql

rdbms_security_store_sqlserver_remove.sql
DB2 9.2, 9.5
———————————————

rdbms_security_store_db2.sql
rdbms_security_store_db2_remove.sql
Derby
———————————————

rdbms_security_store_derby.sql

Monday, April 13, 2015

Automate file transfer from FTP to UNIX server



#!/bin/sh
set -x
rm commands.txt

echo "Enter the Path... example:"
echo "/oraftp/OraFin"
echo "/oraftp/OraFin/mm541"
read pth
        echo "cd $pth" > commands.txt

echo "Name of the file?"
read file_name
        echo "get $file_name" >> commands.txt

echo "Below are the Path and the file name you entered"
cat commands.txt

sftp -b commands.txt oraftp@10.10.10.10


#Note: This setup works only when passwordless authentication is eanbled b/w the servers.

https://libsys.kctcs.edu/stapleton/file-xfer/scripting.html
http://linuxcommand.org/wss0090.php

Saturday, March 28, 2015

Configuring a new disk in Linux


[root@ebsapp01 ~]# cd /dev/
[root@ebsapp01 dev]# ls -l sd*
brw-rw----  1 root disk 8,  0 Aug 29  2014 sda
brw-rw----  1 root disk 8,  1 Aug 29  2014 sda1
brw-rw----  1 root disk 8,  2 Aug 29  2014 sda2
brw-rw----  1 root disk 8, 16 Aug 29  2014 sdb
brw-rw----  1 root disk 8, 17 Aug 29  2014 sdb1
brw-rw----  1 root disk 8, 32 Aug 29  2014 sdc

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

[root@ebsapp01 dev]# fdisk sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab el
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 26108.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk sdc: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4):
Value out of range.
Partition number (1-4): 1
First cylinder (1-26108, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-26108, default 26108):
Using default value 26108

Command (m for help): p

Disk sdc: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
  sdc1               1       26108   209712478+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

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

[root@ebsapp01 dev]# mkdir -p /db01

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

[root@ebsapp01 ~]# mkfs.ext3 /dev/sdc1

mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
26214400 inodes, 52428119 blocks
2621405 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=54525952
1600 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

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

[root@ebsapp01 ~]# mount -t ext3 /dev/sdc1 /db01/

[root@ebsapp01 ~]# mount -a

[root@ebsapp01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             7.9G  2.1G  5.5G  28% /
none                  506M     0  506M   0% /dev/shm
/dev/sdb1             2.0G  270M  1.8G  14% /app01
/dev/sdc1             197G   93M  187G   1% /db01

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


[root@ebsapp01 ~]# grep "/dev/sdc1" /etc/fstab

/dev/sdc1               /db01                   ext3    defaults        0 0
[root@ebsapp01 ~]#


http://geektnt.com/how-to-format-and-mount-second-hard-drive-on-linux.html

Saturday, March 21, 2015

Debugging Guide for Reports Issues in Oracle E-Business Suite Release 12 (Doc ID 1669163.1)

Section 1: Overview

Oracle Forms and Reports 10.1.2.x as used by Oracle E-Business Suite Release 12 are components of Oracle Application Server 10.1.2. The latest version in Oracle E-Business Suite Release 12 is Oracle Reports version 10.1.2.3.

In Oracle E-Business Suite Release 12, all reports are submitted online through the concurrent manager, as there is no standalone reports server.

When a customer submits a report through the concurrent request screen, the $INST_TOP/ora/10.1.2/bin/appsrwrun.sh script is called. This script sets Oracle Application specific settings required for running the report, executes $ORACLE_HOME/bin/reports.sh to set the reports environment, and then calls 10.1.2 $ORACLE_HOME/bin/rwrun to execute the report.

Reports (rdf files) are placed under $PROD_TOP/reports/US in Release 12. The Oracle Reports user exits available in Oracle E-Business Suite are found in $FND_TOP/bin/fndrwxit.so (or fndrwxit.sl).

In UNIX, we have an environment variable REPORTS_DEFAULT_DISPLAY (defined under 10.1.2 $ORACLE_HOME/bin/reports.sh). This tells reports to use DISPLAY of a third party like XVFB,VNC or to use headless operations available in JDK on 10.1.2 ORACLE_HOME. 

REPORTS_DEFAULT_DISPLAY=YES means DISPLAY is not needed and the report is able to use headless operations from JDK for operations that need graphical or image generation work.
REPORTS_DEFAULT_DISPLAY=NO means DISPLAY is needed and the report depends on the DISPLAY parameter set correctly to the third party XVNC/XVBF displays. REPORTS_DEFAULT_DISPLAY=NO is set for AIX only.

REPORTS_SERVER_CONFDIR is used to specify where the rwbuilder.conf file will reside. This can be set to a directory that the user running the reports can write. The rwbuilder.conf file will be copied into this directory and used by the reports executables. This variable is set to $INST_TOP/ora/10.1.2/reports/conf in APPS instance.

Section 2: How to Debug Report Issues

2.1 Steps to Run a Report from Command Line
2.2 Further Debugging
When you receive a report issue, you must first assess whether the issue stems from the reports layer or is a concurrent program issue. To figure this out, you need to run a report from the command line.

2.1 Steps to Run a Report from Command Line

Take the following steps to run a report from the command line.
  1. Enable trace in the report so the command used to submit it will appear in the log file.

    1. Log in to Oracle Applications as a user who has system administrator responsibilities.

    2. As system administrator, navigate to the Define Concurrent Program Screen and query the report.

    3. Check the box next to Enable Trace.

    4. Save the record.
  2. Switch responsibilities and submit the concurrent request to run the report.

  3. You will get full reports command in concurrent program log file.

  4. Log into the middle tier and source the environment.

  5. Now run the command from the command line after adding userid=userid/password with this command.
If you see that the issue is reproduced after the completion of step 5, then it is confirmed that the issue is within the reports layer. If this is the case, you must check whether all patches listed in My Oracle Support Knowledge Document 437878.1, Upgrading OracleAS 10g Forms and Reports in Oracle E-Business Suite Release 12, have been properly applied in the customer's instance. You can verify this using the opatch lsinventory command.

2.2 Further Debugging

If all patches have been properly applied in the customer's instance and the customer is still receiving this error, it may be a new issue. Review the following points for further debugging:
    2.2.1:df -kh output of $REPORTS_TMP

    • As the reports temp file is created here, check to make sure enough space is available for reports temp file creation in this directory.
    2.2.2:df -kh output of $INST_TOP/logs/ora/10.1.2/reports/cache

    • The reports cache file is created in this directory. Check $INST_TOP/ora/10.1.2/reports/conf/rwbuilder.conf file for REPORTS_CACHE directory path. Enough space should be available for reports cache file creation in this directory.
    2.2.3:If the core file has been generated by the failed reports process, you need to review the stacktrace generated from the core file.

    • Please follow My Oracle Support Knowledge Document 1812.1, TECH: Getting a Stack Trace from a CORE file on Unix, for generating stacktrace from reports core file.
    2.2.4:Check output of ls -ltr 10.1.2 $ORACLE_HOME/bin/reports.sh. You must verify whether customer has the latest reports.sh under $ORACLE_HOME/bin. We have seen some report issues where the customer has an old reports.sh file in 10.1.2 $ORACLE_HOME/bin which will set the wrong LD_LIBRARY_PATH.

    2.2.5:Review the strace output of reports command. You can take strace output of reports command with the following command (you need to run the report from command line here):
    strace -o reports .out -f <entire reports command with userid/password>
    2.2.6:Excessive amounts of the srw.message included in the rdf file can cause signal 6/11 or out of memory error or performance issues in reports. These messages must be removed from the rdf file.

    2.2.7:Customers often cite a crash when they are running reports containing a large volume of data. Currently, there is no limitation on the reports temp file size and output file size, provided that the customer has applied all reports one-off patches from My Oracle Support Knowledge Document 437878.1, Upgrading OracleAS 10g Forms and Reports in Oracle E-Business Suite Release 12, and CA_FILEIO_64 is defined to YES in the customer's instance (already included in template fix 9413844).

    • Verify whether all reports one-off patches have been applied in the customer's instance and all post-installation steps are executed properly if they are still receiving errors when dealing with a large volume of data.

      You can also check the size of reports temp and cache file with the following commands in Linux (during reports execution).
      lsof|grep <reports process id>|grep dat
      lsof|grep <reports process id>|grep cache)
      You may also need to review the strace output of report command.
       
    2.2.8:Reports may consume 100% CPU or may run for 2-3 days and never finish or crashes in function 'rwfpngposition' when number of pages in report output exceeds 65535 and the report uses page numbering format "m of N". There is no fix for this issue yet. Respective product teams need to change their page numbering format to "m" to avoid such issues. The customer may be hit by this also while running a report with a large volume of data. We need to contact owner of the rdf file to modify the page numbering format.

    2.2.9:You can increase the heap size in jvmOptions in $INST_TOP/ora/10.1.2/reports/conf/rwbuilder.conf to check the reports execution with more jvm memory.

    Change the following lines:
    <engine id="rwEng" class="oracle.reports.engine.EngineImpl"
    initEngine="1" maxEngine="1" minEngine="0" engLife="50" maxIdle="30"
    callbackTimeOut="60000">
    to:
    <engine id="rwEng" class="oracle.reports.engine.EngineImpl" initEngine="1"
    maxEngine="1" minEngine="0" engLife="50" maxIdle="30"
    callbackTimeOut="60000"
    jvmOptions="-Xms512m -Xmx512m">
    You should suggest this to your customer when report fails with the error -java.lang.OutOfMemoryError.

    2.2.10:You may need to review the reports trace for debugging a report issue. Enabling reports tracing generates a text file that describes the series of steps completed during the execution of the reports. Tracing can be set to capture all events or just specific types of events.

    Under the system administrator responsibility, navigate to the Define Concurrent Programs form.

    From here, click on Concurrent -> Program -> Define.
    Query the report by entering the report name in the Program field.

    Check 'Enable Trace' in the 'Request' section. Enter your trace options in the 'Options' field in the 'Executable' section using the format:

    TRACEOPTS=< >TRACEFILE=< > TRACEMODE=< >


    The following table is a list of possible trace options:

    Trace Options Description
    TRACE_ALL Log all possible trace information in the trace file (default option).
    TRACE_APP Log trace information on all the reports objects in the trace file.
    TRACE_BRK List all breakpoints in the trace file.
    TRACE_DBG Log debug information.
    TRACE_DST List distribution lists in the trace file.
    TRACE_ERR List error messages and warnings in the trace file.
    TRACE_EXC List Reports Server exceptions.
    TRACE_INF Dumps any information not covered by the other options.
    TRACE_LOG Duplicate log information in your trace file.
    TRACE_PLS Log trace information on all the PL/SQL objects in the trace file.
    TRACE_PRF Log performance statistics in the trace file.
    TRACE_SQL Log trace information on all the SQL in the trace file (includes binds).
    TRACE_STA Provide server and engine state information.
    TRACE_TMS Enter a timestamp for each entry in the trace file.
    TRACE_WRN List server warning messages.
    TRACEOPTS=(TRACE_APP, TRACE_PRF) To use multiple options, list options in parentheses.
    TRACEFILE=Any valid file name including the full path to the file Specify the report trace file name.
    TRACEMODE=TRACE_APPEND Add the new information to the end of the file.
    TRACEMODE=TRACE_REPLACE Overwrite the file.
    TRACEOPTS=< >TRACEFILE=< > TRACEMODE=<> Collect reports trace file by adding tracing options to the end of the reports command line.

     
    Note: You will receive the following exception in the reports trace file:
    Exception 50125 (org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 202 completed: Maybe
    at com.sun.corba.se.internal.corba.ORB.disconnect(Unknown Source)
    at oracle.reports.server.ConnectionManager.release(ConnectionManager.java:183)
    at oracle.reports.server.ConnectionImpl.disconnect(ConnectionImpl.java:660)
    at oracle.reports.client.ReportRunner.releaseConnection(ReportRunner.java:333)
    at oracle.reports.definition.RWServerInProcess.release(RWServerInProcess.java:368)
    at oracle.reports.definition.RWServerInProcess.showProgress(RWServerInProcess.java:360)
    at oracle.reports.definition.RWServerInProcess.run(RWServerInProcess.java:198)
    ): Internal error org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 202 completed: Maybe
    This is not an error message. This exception is found in all reports trace files. This can be ignored while analyzing the report trace files.You can also apply Patch 5659594 in 10.1.2 ORACLE_HOME.With this patch you will not see these warning messages in reports trace file.

    2.2.11:If you want to check the values of environment variables during reports execution, you need to run modify appsrwrun.sh. To do so, add env> /tmp/envvalues.out just before -exec $ORACLE_HOME/bin/rwrun "$@" command in $INST_TOP/ora/10.1.2/bin/appsrwrun.sh.

    You can also modify appsrwrun.sh to take strace output of the report command if your customer does not feel comfortable with running the report from command line or if the report is executed from some product executable file. For that you need to modify appsrwrun.sh with the following:
    exec strace -o /tmp/strace.out -f $ORACLE_HOME/bin/rwrun "$@"
    2.2.12:If you want to generate DB trace for reports process, complete the following steps:

    1. Under the system administrator responsibility, navigate to the Define Concurrent Programs form (Concurrent -> Program -> Define).

    2. Query the reports by entering the reports name in the program field.

    3. Check 'Enable Trace' in the request section and save the record.

    4. Submit the concurrent request to run the reports. DB trace file will be generated under USER_DUMP_DEST. Check the trace file with the string *CR<concurrent_request_id>* in this directory (for example, -txkr12d2_ora_17752_SYSADMIN_CR40362585.trc). You can run tkprof TRACE_FILE_NAME to generate the tkprof output from this trace file.
    2.2.13:JVMCI161: FATAL ERROR in native method error in AIX

    • Customer may get -JVMCI161: FATAL ERROR in native method :Wrong method ID used to invoke a Java method error in AIX while executing report.Customer needs to upgrade jdk to 1.6/1.7 in 10.1.2 ORACLE_HOME for this issue.
    Note: Concerning the rwconverter issue, note that if you need to try manual recompilation while debugging rwconverter issue, you need to set DE_DISABLE_PLS_512=0 before executing rwconverter. During compilation through adadmin, this variable is set by ad scripts. During reports execution through the concurrent program, appsrwrun.sh takes care of this environment variable.

    Section 3: Known Issues

    • Reports-idleTimeout is set to 90000
      Long running reports-idleTimeout is set to 90000 in $INST_TOP/ora/10.1.2/reports/conf/rwbuilder.conf, allowing you to run reports that takes up to 90000 minutes.
       
    • Cache Directory Cleaning
      In Oracle E-Business Suite, report cache files are cleared automatically after report execution is completed if <property name="cacheSize" value="0"/> and <property name="noVoidedOutputError" value="yes"/> are in rwbuilder.conf and if Patch 14374587 is applied in 10.1.2 ORACLE_HOME.

Thursday, January 22, 2015

RMAN backup or restore monitoring scripts

Backup Progress Script:

col dbsize_mbytes      for 99,999,990.00 justify right head "DBSIZE_MB"
col input_mbytes       for 99,999,990.00 justify right head "READ_MB"
col output_mbytes      for 99,999,990.00 justify right head "WRITTEN_MB"
col output_device_type for a10           justify left head "DEVICE"
col complete           for 990.00        justify right head "COMPLETE %"
col compression        for 990.00        justify right head "COMPRESS|% ORIG"
col est_complete       for a20           head "ESTIMATED COMPLETION"
col recid              for 9999999       head "ID"

select recid
     , output_device_type
     , dbsize_mbytes
     , input_bytes/1024/1024 input_mbytes
     , output_bytes/1024/1024 output_mbytes
     , (output_bytes/input_bytes*100) compression
     , (mbytes_processed/dbsize_mbytes*100) complete
     , to_char(start_time + (sysdate-start_time)/(mbytes_processed/dbsize_mbytes),'DD-MON-YYYY HH24:MI:SS') est_complete
  from v$rman_status rs
     , (select sum(bytes)/1024/1024 dbsize_mbytes from v$datafile)
 where status='RUNNING'
   and output_device_type is not null
/


Source: http://www.dba-resources.com/oracle/rman-displaying-current-backup-progress/

To see what RMAN is doing now and how much work its got left to do you can run the following SQL
select
sid,
start_time,
totalwork,
sofar,
(sofar/totalwork) * 100 pct_done
from
v$session_longops
where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%'
/

 

The following query will show you a history of your BACKUP and RESTORE operations
select to_char(start_time, 'dd-mon-yyyy@hh24:mi:ss') "Date",
status,
operation,
mbytes_processed
from v$rman_status vs
where start_time >  sysdate -1
order by start_time
/




Check status of RMAN backups:
col STATUS format a9
col hrs format 999.99
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi')   end_time,
elapsed_seconds/3600                   hrs
from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;
 
Source: https://mdesouza.wordpress.com/2012/06/07/monitor-rman-backups/

Oracle Weblogic Blogs

https://blogs.oracle.com/WebLogicServer/

https://blogs.oracle.com/archbeat/

Monday, January 12, 2015

public and private key differences



The Public and Private key pair comprise of two uniquely related cryptographic keys (basically long random numbers). Below is an example of a Public Key:
3048 0241 00C9 18FA CF8D EB2D EFD5 FD37 89B9 E069 EA97 FC20 5E35 F577 EE31 C4FB C6E4 4811 7D86 BC8F BAFA 362F 922B F01B 2F40 C744 2654 C0DD 2881 D673 CA2B 4003 C266 E2CD CB02 0301 0001
The Public Key is what its name suggests - Public. It is made available to everyone via a publicly accessible repository or directory. On the other hand, the Private Key must remain confidential to its respective owner.
Comodo - SSL Certificate Authority

Because the key pair is mathematically related, whatever is encrypted with a Public Key may only be decrypted by its corresponding Private Key and vice versa.
For example, if Bob wants to send sensitive data to Alice, and wants to be sure that only Alice may be able to read it, he will encrypt the data with Alice's Public Key. Only Alice has access to her corresponding Private Key and as a result is the only person with the capability of decrypting the encrypted data back into its original form.
Comodo - SSL Certificate Authority

As only Alice has access to her Private Key, it is possible that only Alice can decrypt the encrypted data. Even if someone else gains access to the encrypted data, it will remain confidential as they should not have access to Alice's Private Key.
Public Key Cryptography can therefore achieve Confidentiality. However another important aspect of Public Key Cryptography is its ability to create a Digital Signature.

source: https://www.comodo.com/resources/small-business/digital-certificates2.php?key5sk1=d1e305ec97a4884240a5beb0bbf1752567484838&key5sk2=&key5sk3=1421051826000&key5sk4=&key5sk5=1421051997000&key5sk6=&key5sk7=1421056404000&key5sk8=&key5sk9=1421056410000&key5sk10=&key5sk11=1421060369000&key5sk12=&key5sk13=1421061153000&key5sk14=&key5sk15=1421061592000&key5sk16=&key5sk17=1421074159000&key5sk18=&key5sk19=1421074167000&key5sk20=&key5sk21=1421074168000&key6sk1=&key6sk2=FF330&key6sk3=7&key6sk4=en-us&key6sk5=US&key6sk6=0&key6sk7=Google&key6sk8=150-1&key6sk9=1366768&key6sk10=true&key6sk11=3a127a12f97ae13ecb45f2ba97a030ec0027da10&key6sk12=2037&key7sk1=399&key7sk2=406&key7sk3=399&key7sk4=7611&key7sk5=399&key7sk6=406&key7sk7=412&key7sk8=406&key1sk1=ors&key1sk2=Google

Monday, September 29, 2014

ORA-00000: normal, successful completion

This error may occur in many circumstances you need to check environment variables:
$ORACLE_HOME
$ORACLE_BASE
$ORACLE_SID
also check /etc/hosts file it must contains correct hostname and ip.
example:

[oracle@oel6 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Jan 27 11:55:17 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.
SQL> startup;
ORA-00000: normal, successful completion
after that i checked environment variables:
[oracle@oel6 ~]$ echo $ORACLE_BASE
/u0/app/oracle
[oracle@oel6 ~]$ echo $ORACLE_HOME
/u0/app/oracle/product/11.2.0/dbhome_1
[oracle@oel6 ~]$ echo $ORACLE_SID
orcl
it’s correct, then checked /etc/host file
cat /etc/hosts
#10.10.1.176 oel6
bingo! someone maybe system administrator or other dba commented this machine hostname and ip, hence we can’t start database, uncomment it and everything goes correct.
vi /etc/hosts
10.10.1.176 oel6

sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Jan 27 12:03:10 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size                  2232960 bytes
Variable Size             645926272 bytes
Database Buffers          180355072 bytes
Redo Buffers                6590464 bytes
Database mounted.
Database opened.
 

Friday, September 5, 2014

GParted - Increase disk size of a Linux native partition


Prerequisites:
You will need to download the GParted live CD ISO file so that you can use it later, you can get this here.
Below is an image displaying disk information on the server before we begin.
disk free and fdisk
It is important to identify that you are actually using a Linux native partition – as this is what we are extending. As you can see in the above image /dev/sda1 is listed as “Linux” and it has the ID of 83. The 83 hex code shows that it is a Linux native partition, while 8e shows a Linux LVM.
Note that /dev/sda1 is the partition we will be expanding.
Increasing the virtual hard disk
First off we increase the allocated disk space on the virtual machine itself.
VMware virtual disk increase
Booting into the GParted Live CD
Mount GParted live CD



Now we are ready to power on the virtual machine.
Once the virtual machine has powered on and you have booted to the CD, you will be presented with the following menu, just press enter to boot into GParted Live (Default Settings).
GParted
After some time you will then arrive at the following screen, for this I did not change anything and just accepted the defaults by pressing enter.
GParted
You will then be prompted to select a language, pressing enter defaults to English.
GParted
Next we select the default option 0 by pressing enter as we will be working with the GUI.
GParted
Once complete you will be presented with the GUI with GParted already open, if it is not already open you can select it from the Desktop icon.
GParted
As you can see the original /dev/sda1 partition that is making use of the 20gb disk is there, as well as the new unallocated 10gb from when we increased the size of the virtual hard disk earlier. The space between the two is the swap space. The total /dev/sda disk size of 30gb is also shown.
What needs to be done now is get /dev/sda1 to take up that unallocated space, this is not currently possible because swap is in the way so we need to move things around. If you do not have swap in between the partition to be extended and the unallocated space then you will be able to skip down a few steps until you arrive at the image where /dev/sda1 and the unallocated space are next to each other.
First we select /dev/sda2 which is the extended partition containing the swap, we want to expand this to include the 10gb of unallocated space.
Select /dev/sda2 and click “Resize/Move” and you will be presented with the following.
GParted
Basically you just need to drag the black arrow of /dev/sda2 all the way to the end of the unallocated space and click the Resize/Move button.
GParted
After doing this, you should see /dev/sda2 (represented by the blue box) spread out over the unallocated space.
GParted
This change and all further changes will not yet be applied, you can see the tasks down the bottom of the GParted interface and these will be applied only once you click the Apply button. Alternatively you can click the Undo button to remove a pending change.
This time we want to select /dev/sda5 which is the swap partition and select Resize/Move, this will result in the following.
GParted
This time rather than expanding the partition, we want to just move swap all the way to the end of the /dev/sda2 space that it is in, this is done by just dragging the box to the end which will then look like this.
GParted
Click the Resize/Move button and then a warning may appear informing you that moving a partition might cause your operating system to fail to boot. It also warns that performing this move may take a long time to apply, read the warning then click OK to continue.
The GUI should now look something like the below image, where /dev/sda1 is located right next to /dev/sda2 which contains the unallocated space.
GParted
Select the /dev/sda2 extended partition and click Resize/Move.
GParted
Drag this to the right so that only the swap space is contained and the grey unallocated space is freed, click Resize/Move once complete.
GParted
Once this is complete the disk will look like this.
GParted
Now we have /dev/sda1 next to the unallocated space so we are finally ready to expand /dev/sda1. Select /dev/sda1 and click the Resize/Move button.
GParted
You will be able to perform this action straight away if you did not have swap in between /dev/sda1 and the unallocated space, the previous steps were to get swap out of the way in GParted.
Drag the arrow over so that the unallocated space is then consumed by /dev/sda1 as shown below, then click Resize/Move.
GParted
Once this is done the /dev/sda1 partition will now be using the unallocated space that was previously there. All that is left to do is click the apply button which will apply the changes – you will be prompted to confirm with a warning that data loss may occur.
Note that this may take a while depending on how much of the disk is currently in use and the amount of disk space you are increasing, because a file system check (fsck) is run before the expansion and after it to ensure that there are no issues. I have performed this method on a 400gb server in the past and to increase it 100gb took approximately 5 hours. In this example I am only increasing by 10gb and there is only about 1gb of data on the disk so this took approximately 2 minutes to finish applying.
Once complete you will see something similar to the below image, you will be able to click close once finished.
GParted
Everything is now finished, you just need to reboot the virtual machine and then boot from disk rather than CD, alternatively shut down the virtual machine and unmount the live CD and then power it back on.
Once the operating system has booted you can confirm that the disk space has expanded correctly. Below you can see that /dev/sda1 is now 30gb in size.
GParted