I was trying to debug an issue with Active Directory Connector customization. Wanted to turn the debug logs on but logging.xml file was getting overwritten after a restart of OIM managed servers. Found the issue and documented some notes below.
OIM documentation for setting detailed logging for connectors etc is posted here. OIM used weblogic Oracle Diagnostic Logging (ODL) feature. Primary components of this feature are message types and levels, log handler and logger configurations.
Instead of updating logging.xml on the managed server in a standalone install, updates such as below must be made on the admin server configuration files. Ofcourse this requires managed servers to be restarted for immediate effect. An example is given below:
file location of the admin server of clsuter in my case:
/kpsoftfileshare/orafmw/admin/IDMDomain/adminserver/IDMDomain/config/fmwconfig/servers/wls_oim1
/kpsoftfileshare/orafmw/admin/IDMDomain/adminserver/IDMDomain/config/fmwconfig/servers/wls_oim2
take a backup of logging.xml and update with components as below. In this case i used AD connector logging handlers.
in the log_handler section:
<log_handler name='adcs-handler' level='TRACE:32' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
<property name='logreader:' value='off'/>
<property name='path' value='${domain.home}/servers/${weblogic.Name}/logs/ActiveDirectory.log'/>
<property name='format' value='ODL-Text'/>
<property name='useThreadName' value='true'/>
<property name='locale' value='en'/>
<property name='maxFileSize' value='5242880'/>
<property name='maxLogSize' value='52428800'/>
<property name='encoding' value='UTF-8'/>
</log_handler>
in the loggers section:
<logger name="OIMCP.ADCS" level="TRACE:32" useParentHandlers="false">
<handler name="adcs-handler"/>
<handler name="console-handler"/>
</logger>
Please refer to KP Soft's website at https://kpsoft.digital/ for more information.
Friday, February 3, 2012
Thursday, January 19, 2012
Export all metadata in oim 11.1.1.3
1.
cd to /home/orafmw/oracle/middleware/iam/common/bin
2.
./wlst.sh
3.
connect('weblogic','xxxxxxx','t3://oim.kpsoft.org:7001')
[here weblogic is username, weblogic120
is password and the host is of the domain's admin server]
4.
exportMetadata(application='OIMMetadata',
server='wls_oim1',toLocation='/home/orafmw/temp/allmetadata01192012',docs='/**')
5.
exit()
Wednesday, January 4, 2012
OIM 11.1.1.3 password decrypt
It is often useful to decrypt passwords for debugging purposes.. below is the code that does just that. After getting OIMClient instantiated and login run XLClientSecurityAssociation.setClientHandle(oimClient);
then run the following code:
tcDataProvider dbProvider = new tcDataBaseClient();
String query = "select USR_LOGIN,USR_PASSWORD from USR where USR_LOGIN='XELSYSADM'";
tcDataSet dataSet = new tcDataSet();
dataSet.setQuery(dbProvider, query);
dataSet.executeQuery();
System.out.println("Password:: "+dataSet.getString("USR_PASSWORD"));
then run the following code:
tcDataProvider dbProvider = new tcDataBaseClient();
String query = "select USR_LOGIN,USR_PASSWORD from USR where USR_LOGIN='XELSYSADM'";
tcDataSet dataSet = new tcDataSet();
dataSet.setQuery(dbProvider, query);
dataSet.executeQuery();
System.out.println("Password:: "+dataSet.getString("USR_PASSWORD"));
Thursday, December 22, 2011
Oracle OSB 11.1.1.5 installation
I was trying to install oracle osb 11.1.1.5 this morning, as usual most of the install is plug and play, with some gotchas (few minute kind..) . So i decided to put some notes out there with the install steps. I am not covering Pre-requisite software such as teh oracle db and rcu in this article. Sure there are plenty of articles on the web for this. For new comers i would recommend that they download and oracle vm with db already for this. Since i spent a lot of time in the past doing this, I reused an existing db.
- Software that i used for this:
- Oracle 11.2.0.1 db
- rcu 11.1.1.5
- jdk ( i used jdk 1.6.0_29 for this exercise)
- weblogic 10.3.5 for linux 64 bit (wls_1035_generic.jar)
- oracle service bus (11.1.1.5)
- Oracle Enterprise pack for eclipse (11.1.1.7.2)
- Install Oracle DB and install rcu SOA schemas. There is only a few tables that OSB uses in this schema.
- Install weblogic 10.3.5 for linux 64 bit server.
export JAVA_HOME with the correct pathjava -jar wls1035_generic.jarMore information can be found hereI installed my weblogic middle tier under /Oracle/JDev11115Download and unzip OEPE under Middletier (/Oracle/JDev11115/oepe_111172). please note that you cannot proceed with installation without this if you selected custom installation type with IDE option selected.Install Oracle Service Busexecute runInstaller (from /home/oracle/software/Oracle/osb_11115/Disk1)Click Next on the welcome screenSelected Custom InstallationSelected Oracle Service Bus and Oracle Service BUS IDE options and Deselected Oracle Service Bus Example options (got an installer error on 64 bit linux machine when i selected this)click NextBrowse for and Select weblogic server location (/Oracle/JDev11115/wlserver-10.3) and OEPE Location (/Oracle/JDev11115/oepe_111172)click next and Install buttonCreate a weblogic domain for OSBcd to/Oracle/JDev11115/wlserver-10.3/common/bin and run config.shSelect create a new weblogic domain optionSelect everything except Oracle Service Bus for developersClick next and enter OSBDomain for domain nameClick next and enter weblogic admin account passwordBrowse for and select SDK locationenter JDBC information, I used Dev1_MDS and Dev1_SOAINFRA for the SOA RCU that i created in the pastclick Create when doneAfter domain was created, start the servicescd to/Oracle/JDev11115/user_projects/domains/OSBDomain/bin and runnohup sh ./startWeblogic.sh &create boot.properties under/Oracle/JDev11115/user_projects/domains/OSBDomain/servers/osb_server1/security with weblogic username and passwordnohup sh ./startManagedWeblogic.sh osb_server1 &Initially i got errors starting the managed server using weblogic admin console or nodemanager I had to turn on StartScriptEnabled=true in order to get rid of the errorsStart Eclipse and deploy, sample projects or new projectscd to/Oracle/JDev11115/oepe_111172 and run eclipse in an terminalOpen OSB perspectiveSelect new in the server panelselect Oracle weblogic server 11gr2 patchset 4 (or whatever is the latest)click next to select remoteand provide admin node properties (port number, weblogic admin username and password that was used to create domain)create new OSB project (or use samples fromhttp://java.net/projects/oraclesoasuite11g/pages/OSB) to publish and run- Importing projects was clumsy at times, I had to cleanup and run fresh imports for running the projects.
- During the first time use of eclipse i got the following error - "Target runtime oracle weblogic server 11gr1 patchset 4" is not defined"
- For this i opened project properties and navigate to runtimes subtab and had to remove the existing facet and add "Oracle weblogic server 11gr1 patchset 4" setting.
Tuesday, December 20, 2011
Virtualbox mounting shared folders
Started playing with oracle virtualbox SOAbpm image and wanted to install eclipse pack 11g r1 on linux. First thing we need for this is the ability to copy files using sharedfolders. Had to go through the following steps for this:
- Navigate to Shared Folders
- Click + icon for adding folders
- Added "Downloads" Folder with auto-mount selected
- started the vm
- logged in as root
- sudo mkdir /mnt/Downloads_win
- sudo mount.vboxsf Downloads /mnt/Downloads_win
- cd /mnt/Downloads_win
Friday, December 16, 2011
Run as Administrator on Windows 7
When you are running application/services on window it is often painful to find out what's happening when the services don't start correctly. then you may decide to open a cmd shell and run the same commands to get more details. on windows 7 in some workplace environments you need a way to start these services with delegated administrator privileges. The way to do this is:
- click on start prompt
- in search for programs box enter "cmd"
- then hit "ctrl + shift + enter"
- you get a prompt to "do you want to allow this program to make changes to your computer"
- select yes
- command shell now opens with admin privileges and you can run the services/application cmd or bat files without any issues.
Wednesday, December 7, 2011
EM 11g Grid Control for monitoring weblogic server and OIM
There are several ways to monitor the health of weblogic, discussed WLDF in a prior post as one way. Another traditional approach include installation and configuration of Oracle Enterprise Manager Grid Control product. Below are the steps for configuring notification and alerts.
- Access https://gridctlem.kpsoft.com:7799/em/console
- enter username and password of a super administrator
- Navigate to Deployments and click Install Agent
- Click Fresh Install
- Select Default for source directory
- agent source software version (11.1.0.1.0 is used in this article)
- Select host (linux x86-64)
- host idm.thekpsoft.com
- OS credential (oracle/xxxx)
- un select on run root.sh (this requires sudo to root)
- installation directory /home/oracle/oracle_em_agent
- Click continue, unchecked security updates forms
- wait for confirmation on installation agent
- login to idm.thekpsoft.com, navigate to /home/oracle/oracle_em_agent/agent11g and run root.sh
- Navigate to Targets -> Middleware for adding a host for discovery
- Enter admin server hostname (idm.thekpsoft.com)
- port number - 7001
- username - weblogic
- password
- Unique Domain Identifier - sandbox_oimdomain
- Agent - use the search light and select as needed
- Press continue -> EM will find all teh targets (weblogic server, domains etc) -> Click ADd targets
- Now we go about setting notifications rules and schedule
- Click Setup -> Notification Methods
- Enter SMTP Server (mail.thekpsoft.com)
- Username and password if required
- Identify Sendar as - EM Grid Control 11
- Sender E-mail address (emcontrol@thekpsoft.com)
- click test email servers to test email notifications
- click preferences -> add e-mail address (prasad@thekpsoft.com) and choice message format (long format)
- click Notification Rules
- Click create
- General -
- Name - Sandbox sample nitification rule
- Selct Make public
- Target Type - Oracle Weblogic Server
- select apply rule to specified oracle weblogic server targets or groups .............
- ADd targets that you prefer to, I added wls_oam1, wls_oim1, wls_ods1, wls_soa1, admin server
- Click Availability, I selected up, down, agent unreachable
- Add by selecting metrics if needed (you can also templatize this as an SLA for each set of targets) using setup -> monitoring template feature
- configure their thresholds (i will cover thresholds in another article)
- click poilicies and jobs if you want to (advanced features, will cover at a later time)
- click actions and select send me e-mail and repeat notification frequency (i left defaults for this)
- Create a blackout configuration for planned maintenance to notifications will not be sent
- you are all set....
- you should be receiving email notifications whenever the threshold criteria is met
Subscribe to:
Comments (Atom)