mercoledì 8 agosto 2012

OBIEE: nQSError 43126 Invalid Username/Password

Today I experienced this trouble with OBIEE: users can't login to BI Presentation Services.

System returned the following error: An invalid User Name or Password was entered.

Although I was perfectly capable of accessing WebLogic Server console and Enterprise Manager console OBIEE didn't let me in.

After a brief investigation in logs located at:

BI_HOME/diagnostics/logs/OracleBIPresentationServicesComponent/coreapplication_obips1

I spotted this error:

WSM-06102 Policy Reference The policy reference URI "oracle/wss_username_token_service_policy" is not valid.

which is an error given by a deplyed component which has gone bad.

This can be verified accessing WebLogic Server Deployment console, wsm-pm component is in error state:



To solve this it's sufficient to re-deploy this component

Click Lock & Edit -> select component wsm-pm -> Update



Click Next -> Finish



Then Activate Changes and verify that wsm-pm can service all requests and is in running state.



Once this is completed you should be able to login to OBIEE presentation Services again!

lunedì 6 agosto 2012

Oracle VM: Some useful tips using XM command

This post states some obvious commands, which are well known by majority of sys admins using XEN hypervisors.
Anyway I whish to share these commands since I think they are pretty useful, infact I had to deal with command line when my VM Manager had troubles.

Let's start saying that XM commands are performed connecting to physical Oracle VM servers and should be used carefully since they are pretty powerful and could potentially destroy your VM environment just with a click.

A good practice is to deal with XM CLI only if VM Manager is unusable, since it's preferrable to execute tasks by VM Manager itself rather than by physical server, especially in an environment with more than one physical server because XM CLI commands could potentially lead to inconsistencies between physical servers.

Another thing to note before using XM CLI is that as stated by server itself: making manual modifications in the management domain might cause inconsistencies between Oracle VM Manager and the server.

XM provide a lot of functionalities and you can check them all by just typing:

[root@orclvmsrv1 ~]# xm

Oracle VM identifies guest VMs by assigning them an unique ID, despite the name you gave to VM during creation, so when you perform an action using XM CLI you need to refer to VMs using that ID instead of the VM name you gave.

I suggest when you create a new VM using VM Manager to take note of "VM Name - assigned ID" because it could be useful for future references.
If you didn't do that don't be worried, there's a solution anyway, you can see what's the VM name on vm.cfg file:

[root@orclvmsrv1 ~]# cd /OVS/Repositories/0004fb0000030000fc2ad4059c973859
[root@orclvmsrv1 0004fb0000030000fc2ad4059c973859]# ls
Assemblies  ISOs  lost+found  Templates  VirtualDisks  VirtualMachines

As you can see above:

0004fb0000030000fc2ad4059c973859 is the REPOSITORY ID, every repository contains the following folders: Assemblies  ISOs  lost+found  Templates  VirtualDisks  VirtualMachines

VM configuration files are placed in VirtualMachines folder.In this case I've 3 VMs in this Repository and these are VM's ID.

[root@orclvmsrv1 0004fb0000030000fc2ad4059c973859]# ls VirtualMachines/
0004fb00000600003ace83d53d5313b0  0004fb0000060000e0f49015b41ead02 0004fb00000600005d4bfe48c8fe0cf9

To check what's the name of a certain VM just have a look at vm.cfg file contained in every of the folders above.

[root@orclvmsrv1 VirtualMachines]# cat 0004fb0000060000e0f49015b41ead02/vm.cfg | grep OVM_simple_name

and search for OVM_simple_name attribute which tells you what's the name you assigned to that VM.

OVM_simple_name = 'VMM'

Now that you know how to identify VMs by theyr ID it's time to do some basic stuff:

1)List all running VMs:

[root@orclvmsrv1 ~]# xm list

Name                                        ID   Mem VCPUs      State   Time(s)
0004fb00000600003ace83d53d5313b0             1  4096     4     -b----   9343.5
0004fb0000060000e0f49015b41ead02             8  4096     4     -b----    832.9
Domain-0                                     0   726    12     r-----  14059.0

As you can see I've two running VMs in my domain.

2)Stop a running VM:

[root@orclvmsrv1 ~]# xm shutdown 0004fb00000600003ace83d53d5313b0

I gracefully stopped a guest VM

3)Kill a running VM:

Same thing as above, but instead of "shutdown" use "destroy"

[root@orclvmsrv1 ~]# xm destroy 0004fb00000600003ace83d53d5313b0

4) Start a (non running) VM:

If you have a VM that is not currently in running state and you wish to start it:

[root@orclvmsrv1 VirtualMachines]# xm create 0004fb00000600005d4bfe48c8fe0cf9/vm.cfg

Please note that in this case I was in VirtualMachines folder.You could need to use full path to vm.cfg file.


5) Live migrate running VM to another Oracle VM server in the same Pool:

This can be done in two ways, specifying destination server IP address or, as I suggest, just typing destination server name.This is useful if you have a lot of servers in your infrastructure, and remembering server names it's usually easier than IP addresses.

You need to add your servers names to host file:

[root@orclvmsrv1 ~]# vi /etc/hosts

Add all your servers:

10.0.0.103              orclvmserver2
10.0.0.104              orclvmserver3
10.0.0.105              orclvmserver4

Save file, then you can migrate your VM to orclvmserver2:

[root@orclvmsrv1 ~]# xm migrate -l 0004fb00000600005d4bfe48c8fe0cf9 orclvmserver2

In a future post I will explain the use of another great CLI: Oracle VM Manager 3 CLI
which was introduced since VM Manager 3.1.1 build 365 and performs almost any task of VM manager but via CLI instead of web interface.

That's all!!

venerdì 3 agosto 2012

Oracle VM: Upgrade VM Manager to 3.1.1-399

A new patch for VM Manager is released by a few hours on MOS.

This patch as stated on changelog fixes the following issues:

14338549 - Fixes the issue where the log files do not have sufficient information to determine why TCPS fails to be enabled.
14318605 - Ensures that the upgrade process should not continue in case when the Oracle VM Manager cannot be stopped.
14256453 - Fixes the issue in server rediscovery due to the yum repository URL reset.
14222824 - Fixes the issue where iSCSI initiators were no longer associated with the ZFS Storage Appliance Access Groups after a restart of the Oracle VM Manager.


Login to My Oracle Support and download patch ID 14227416

Login to your VM Manager machine and

[root@vmm ~]# unzip p14227416_30_Linux-x86-64.zip
[root@vmm ~]# mount -o loop,ro ovmm-3.1.1-upgrade-b399.iso /mnt/cdrom/
[root@vmm ~]# cd /mnt/cdrom/
[root@vmm cdrom]# ./runUpgrader.sh


Stating OVM Manager upgrade on Thu Aug  2 10:06:59 CEST 2012

Oracle VM Manager 3.1.1.399 upgrade utility
Upgrade logfile : /tmp/upgrade-2012-08-02-06.log


It is highly recommended to do a full database repository backup prior to upgrading Oracle VM Manager ...

Press any key to continue ...


Oracle VM Manager is running ...

Verifying installation status ...
Read Oracle VM Manager config file ...
Skipping database upgrade for the same product version (3.1.1 to 3.1.1)
Found Oracle VM Manager install files ...
Found Oracle VM Manager upgrader ...
Found Oracle WebLogic Server ...
Found Java ...
Using the following information :
  Database Host          : 10.0.0.74
  Database SID           : ORCL
  Database LSNR          : 1521
  Oracle VM Schema       : ovs
  Oracle VM Manager UUID : 0004fb0000010000aef89d7d546a0d5e
  Current Build ID       : 3.1.1.365
  Upgrade from version   : 3.1.1
  Upgrade to version     : 3.1.1
Using /tmp/workdir.OjEwPb3mDR for backup and export location.
Using /tmp/patchdir.bJf4OKPoG for patching.
Undeploying previous version of Oracle VM Manager application ...
Undeploying Oracle VM Manager help ...
Undeploying Oracle VM Manager console ...
Undeploying Oracle VM Manager core ...
Waiting for Oracle VM Manager core to fully undeploy...
Waiting...
Finished undeploying previous version ...
Upgrading Oracle VM Manager ...
Backing up old files to /tmp/ovm-manager-3-backup-2012-08-02-121118...
Removing old files ...
Unpacking Oracle VM Manager 3.1.1.399
Refresh system-jazn-data.xml file ...
Redeploying Oracle VM Manager core container ...
Redeploying Oracle VM Manager console ...
Redeploying Oracle VM Manager help ...
Unpacking Oracle VM Manager OVM CLI Tool
Completed upgrade to 3.1.1.399 ...
Writing updated config in /u01/app/oracle/ovm-manager-3/.config
Restart WebLogic ...
Stopping Oracle VM Manager                                 [  OK  ]
Starting Oracle VM Managernohup: ignoring input and redirecting stderr to stdout
                                                           [  OK  ]

OVM Manager upgrade finished on Thu Aug  2 10:13:55 CEST 2012


Once installation is completed login to your VM Manager and everything should be back as normal and if you go to Help -> About you will see:

Oracle VM Manager
Version: 3.1.1.399
Build: 20120716_399

giovedì 2 agosto 2012

Oracle VM: Timeout starting OVMM service

I encountered this problem a while ago during a VM Manager restart: OVMM service didn't started anymore going in timeout.
As a general suggestion when this happens first thing to do is to have a look at VM Manager logs, located at:

/u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/servers/AdminServer/logs/AdminServer.log

if file is too long to read you could just give a try grepping only errors

cat /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/servers/AdminServer/logs/AdminServer.log | grep ERROR

In this case however OVMM Timeout was caused by an issue in /etc/init.d/ovmm file and in detail by this line:

nohup su - oracle -c "$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\"-Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8453,server=y,suspend=n -da:org.apache.myfaces.trinidad\" /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null

As you can see by default ovmm start script starts WebLogic server as oracle user, instead of root user, the one used to perform VM Manager installation.
I just fixed it by simply swapping oracle user with root user, this happened despite before VM Manager installation I launched "createOracle.sh" script which performs oracle user creation and permissions assignment.

So, to solve this issue simply replace:

nohup su - oracle -c "$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\"-Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8453,server=y,suspend=n -da:org.apache.myfaces.trinidad\" /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null

with:

nohup su - root -c "$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\"-Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8453,server=y,suspend=n -da:org.apache.myfaces.trinidad\" /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null


Then start ovmm service again:

service ovmm start

That's all!!

martedì 31 luglio 2012

Oracle UCM: Dashboard

Dashboard is an Oracle WebCenter Content feature that allow to display useful data in simple portlets that are displayed to users. Dashboards can be set as WebCenter Content users homepage, this means that when a user access UCM after login page instead of the generic search form will be redirected to these dashboards.

Dashboards are fully customizable by admins and by users and they are basically folio templates containing one or more items. Any of these item composing a Dashboard is an idoc page which performs some action like search for specific content, displays active workflows, etc.

To enable Dashboard you need to enable ContentFolios component. To enable it login to UCM, go to Administration -> Admin Server -> advanced component manager -> CHECK all Category Filters -> under Disabled Components select ContentFolios and click Enable button.

Restart UCM service, then go to Administration -> Configure Record Settings -> under Records Management Install Settings select Standalone and under Installation Levels choose at least Minimal. Minimal enables some new features, including Dashboards. If you have more specific needs you should consider a deeper level. Clicking to "info" icon near each level gives you infos about features enabled by each installation level.



After selection you will need to restart UCM service.



After service restart when logged in you will be prompted by following screen



Under Define Defaults click every item and choose default metadata that will be associated to every Audit Entries.



Do the same for Screenings Reports



Then CHECK all items and click Submit button to proceed.



Click Records -> Dashboards then you can go to User Dashaboard, Admin Dashboard or Create a new Dashboard.



By enabling Dashboards some new filea have been uloaded to your Content Server, if you perform a search you will find some new files and two Folios with following ID:
        
ADMIN_TASKPANELS
USER_TASKPANELS

which are admin and users Dashboards respectively. By editing these folios you will see all items composing a Dashboard. Here you can add new items or deleting existing ones. By clicking the green arrow you can search for all panels in Content Server.



Some have been previsouly created but you can add custom ones too. Custom panels are created using IDOC Scripts but I will return on this with more details in a further post ASAP.

Once Dashboard modifications are complete remember to save changes.

That's all!!

lunedì 30 luglio 2012

Oracle UCM: Performing basic tasks using HCST and IDOC scripts


In this post I will create a simple HCST page containing some IDOC scripts that allow to perform some basic actions like searching for specific content among WebCenter Content and change metadata values on link click.

If you are new to IDOC I suggest you to have a look at documentation:

Idoc Script Reference Guide

Another really precious resource for IDOC, HCST, HCSP, and UCM in general is Brian Huff's book "The Definitive Guide to Stellent Content Server Development".

We will create a HCST (Hypertext Content Server Template) page that will contain both HTML and IDOC Scripts.

The following code will perform a search of all documents in UCM with:

Security Group: Public
Document Type: Document
Custom Metadata: Pending

Likely you will change these according to your UCM configuration.

Copy/paste the following code to "test.hcst"

<html>
<head>
<title>Simple HCST Page</title>
</head>

<body>

<$QueryText="dSecurityGroup <matches> `Public` <AND> dDocType <matches> `Document` <AND> xCustom_Metadata <matches> `Pending`"$>
<$executeService("GET_SEARCH_RESULTS")$>

<table>
<tr>
<td>View Content</td><td>Content ID</td><td>Check-in Date</td><td>Custom Metadata</td><td>APPROVE</td><td>REJECT</td>
</tr>
<$loop SearchResults$>
<tr>
<td><a href="<$SearchResults.URL$>">VIEW CONTENT</a></td>
<td><$SearchResults.dDocTitle$></td>
<td><$SearchResults.dInDate$></td>
<td><$SearchResults.xStatus_Offerta$></td>
<td><a href="<$HttpCgiPath$>?IdcService=UPDATE_DOCINFO_BYFORM&coreContentOnly=1&dID=<$SearchResults.dID$>&dDocName=<$SearchResults.dDocName$>&dRevLabel=<$SearchResults.dRevLabel$>&dSecurityGroup=<$SearchResults.dSecurityGroup$>&dDocAccount=<$SearchResults.dDocAccount$>&xCustom_Metadata=Approved&IsSoap=1">CLICK HERE TO SET CUSTOM METADATA TO APPROVED</a></td>
<td><a href="<$HttpCgiPath$>?IdcService=UPDATE_DOCINFO_BYFORM&coreContentOnly=1&dID=<$SearchResults.dID$>&dDocName=<$SearchResults.dDocName$>&dRevLabel=<$SearchResults.dRevLabel$>&dSecurityGroup=<$SearchResults.dSecurityGroup$>&dDocAccount=<$SearchResults.dDocAccount$>&xCustom_Metadata=Rejected&IsSoap=1">CLICK HERE TO SET CUSTOM METADATA TO REJECTED</a></td>
</tr>
<$endloop$>
</table>

</body>
</html>


Login to UCM and check-in test.hcst file. If you will publish hcst pages in a production environment I suggest to use Web Mapped Folders in order to have a more friendly URL.

Open page in a browser and you will see something like this.

giovedì 26 luglio 2012

Oracle UCM: Web Mapped Folders

Web Mapped Folders is a great feature of Oracle UCM that allow to access WebCenter Content folders and documents contained on them using an URL.

This feature is really useful when using Site Studio features because this allows your contents to be accessed in a friendly url like this:

http://YOUR_WEBCENTER_CONTENT_SERVER_IP_ADDRESS:16200/cs/Web/WEB_PAGE.HTML

instead of default content mapping that have a web location with an URL like this:

http://YOUR_WEBCENTER_CONTENT_SERVER_IP_ADDRESS:16200/cs/groups/public/documents/web/mdaw/mdaw/~edisp/WEB_PAGE.HTML

To enable Web Mapped Folders you need to enable "Folders_g" component. In case you have not activated it you can enable it login to Oracle UCM -> Administration -> Admin Server -> Component Manager -> click "advanced component manager" link -> on "Category Filters" CHECK all 3 items.

In "Disabled Components" list look for "Folders_g" and click Enable button, then perform a restart of UCM service.

When Folders_g is enabled go to Administration -> expand Folders Configuration -> click Web Url Mapped Folders.
Choose the folder you wish to map with a URL and it's URL Mapping then click Add button.



In this case I added a folder named "Web" and I choosed to leave the default mapping as "Web", this means this folder will be accessible at the following URL:

http://YOUR_WEBCENTER_CONTENT_SERVER_IP_ADDRESS:16200/cs/Web/