Sunday, 28 August 2016

Configuring OBIEE 11g as Services under Windows Server 2012



1. Check if the MW_HOME environment variable is set.







  • Check Environment variables for MW_HOME  Control Panel -> System -> Advanced System Settings -> Advanced  tab -> Environment Variables -> System variables.
  • Add it to both variables.
2. Restart the machine.

Node Manager

Note: For Node Manager, if you want the component to start automatically on boot up, your best option is to create a Windows Service. You may have selected the option to create a service for Node Manager during the WebLogic Server installation.This service is automatically created with the OBIEE 11g installation on Windows and can be skipped. However please find the below steps if it needs to be configured.

Use Start -> Run -> services.msc from the Start menu to load the Windows Services Manager. If there is no service for Node Manager, use the following steps to create one.
  • ·         WL_HOME\server\bin\installNodeMgrSvc.cmd
  • ·         Verify in Windows Services that a service was created.






Admin Server

For the Admin Server, we have to create a Windows Service. Follow below steps:

  • Browse in to the location and check boot.properties file is present there or not. (D:\MW_HOME\user_projects\domains\bifoundation_domain\servers\AdminServer\security)



This file is already present and has the username and password of the weblogic user in encrypted format. If it is not present, create one. Create a text file named %MIDDLEWARE_HOME%\user_projects\domains\<domainname>\servers\AdminServer\security\boot.properties. Add the following lines:

username=weblogic
password=<the weblogic username password>


2. Create a command script called installAdmServer_Service.cmd which you will want to make sure has lines like:

SETLOCAL
set DOMAIN_NAME=<your wls domain>
set USERDOMAIN_HOME=<path to domain> # e.g., C:\middleware\FMW11g\user_projects\domains\ClassicDomain
set SERVER_NAME=AdminServer
set PRODUCTION_MODE=true
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "<your middleware home>\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL





3. Calling setDomainEnv.cmd sets some environment variables for your domain and also calls the WebLogic common environment script commEnv.cmd.

(Note: If you do customize these scripts in this way, you also need to make a change to the installSvc.cmd script because it also calls commEnv.cmd, so it could overwrite any customizations you may have made to setDomainEnv.cmd. If so comment the below statement.)

Note: Skip this step if no customization is done at your end.
Else navigate to MW_HOME\wlserver_10.3\server\bin\installSvc.cmd, check whether the below line is present:

call "%WL_HOME%\common\bin\commEnv.cmd"

Modify the above line as follows:
@rem call "%WL_HOME%\common\bin\commEnv.cmd"

4. Create a standard out log file for AdminServer and bi_server1.

( Note: For troubleshooting/debugging purposes it is helpful to redirect standard out and error to a text file. Although most information is captured in the AdminServer server log files, you will not see all standard out and error when the server is started via a MS Windows Service (unlike when you start an AdminServer from the command prompt using startWebLogic.cmd)).

To redirect standard out to a text file, backup and edit installSvc.cmd and change the line at the bottom of the file so it includes the -log parameter, e.g.

"%WL_HOME%\server\bin\beasvc" -install -svcname:"%DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -extrapath:"%WL_HOME%\server\bin" -password:"%WLS_PW%" -cmdline:%CMDLINE% -log:"<your middleware home>\user_projects\domains\<your wls domain name>\servers\AdminServer\logs\AdminServer-stdout.txt"



5. Install the service. For this select the installAdmServer_Service.cmd, run it as in administrator mode.Once the service is installed, go to services.msc and look of the service name beasvc bifoundation_domain_AdminServer.

6. Go to RUN type "regedit" and you get the Registry Editor. Find
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services\beasvc bifoundation_domain_AdminServer \ Parameters. Modify the cmdLine parameters values from default values (32,200,128) to (1024,1024,512). (Note: This step is the solution for the error : java.lang.OutOfMemoryError)


 

7. Right click and start the service.
Check the log file in the location
D:\MW_HOME\user_projects\domains\bifoundation_domain\servers\AdminServer\logs
The log file “AdminServer-stdout.txt” would say AdminServer started in "Running mode" in a while (2-3 minutes).

BI Server

1. Browse in to the location and check boot.properties file is present there or not.
D:\MW_HOME\user_projects\domains\bifoundation_domain\servers\bi_server1\security
Create a command script called installbi_server1_Service.cmd which has lines like

username=weblogic
password=<the weblogic username password e.g manager11g>


2. Create a command script called installbi_server1_Service.cmd which has lines like:

SETLOCAL
set DOMAIN_NAME=<your wls domain>
set USERDOMAIN_HOME=<path to domain> # e.g. C:\middleware\FMW11g\user_projects\domains\ClassicDomain
set SERVER_NAME=WLS_FORMS
set PRODUCTION_MODE=true
set ADMIN_URL=http://mymachine.mycompany.com:7001
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "<your middleware home>\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL


3. Calling setDomainEnv.cmd sets some environment variables for your domain and also calls the WebLogic common environment script commEnv.cmd.

(Note: If you do customize these scripts in this way, you also need to make a change to the installSvc.cmd script because it also calls commEnv.cmd, so it could overwrite any customizations you may have made to setDomainEnv.cmd. If so comment the below statement.)

Note: Skip this step if no customization is done at your end.
Else navigate to MW_HOME\wlserver_10.3\server\bin\installSvc.cmd, check whether the below line is present:

call "%WL_HOME%\common\bin\commEnv.cmd"

Modify the above line as follows:

@rem call "%WL_HOME%\common\bin\commEnv.cmd"

4. Install the service. For this select the installbi_server1_Service.cmd, run it as in administrator mode.
Once the service is installed, go to services.msc and look of the service name beasvc bifoundation _domain_bi_server1.

5. Go to beasvc bifoundation_domain_AdminServer à Parameters

Edit the CmdLine parameters values from default values (32,200,128) to (1024,1024,512).

 (Note: This step is the solution for the error : java.lang.OutOfMemoryError)

 

6. Right click and start the service.
Check the log file in the location
D:\MW_HOME\user_projects\domains\bifoundation_domain\servers\AdminServer\logs
The log file “AdminServer-stdout.txt” would say bi_server1 started in Running mode in a while (2-3 minutes).

7. When it is  started as "Running mode" start the Oracle Process Manager (OPMN) either manually or from services.msc.

8. After the starting up of OPMN Services, log in to EM, Console and Analytics and verify the reports and services.

Note: Below steps are to configure the above created services in such a way that if the server machine is restarted for any probable reason in future, the OBIEE services start automatically as system startup services.

Create Groups & Dependencies in the Registry

To ensure the OBIEE service start in the correct order we need to create a group in the windows registry for each service. We then assign each of the four services to these groups and place dependencies on the start order.

1. Open the Registry Editor from ‘Run’ (regedit)





2. Expand and locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder:








3. Double click on the ‘List’ entry and add the following four groups to the end of the value:
  • ·         OBI Node Manager
  • ·         OBI Admin Server
  • ·         OBI Managed Server
  • ·         OBI OPMN









4. Click ‘OK’ to Save.


5. Now locate the Weblogic Node Manager entry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services  -> Oracle WebLogic Node Manager (D_MW_HOME_wlserver_10.3)

6. Right click on the entry and select New -> String Value





7. Enter the name ‘Group’. Double click on Group and enter the value data as OBI Node Manager.









8. Now repeat this for the other three entries:
  • ·         beasvc bifoundation_domain_AdminServer  with the Group value “OBI Admin Server”.
  • ·         beasvc bifoundation _domain_bi_server1  with the Group value “OBI Managed Server”.
  • ·         OracleProcessManager_instance1 with the Group value “OBI OPMN”.




9. Now we need to setup the dependences to ensure each service wait’s until the previous services have started before starting.

Right click on the beasvc bifoundation_domain_AdminServer entry and select New à Multi-String value. Give it the name DependOnService. Edit the value and enter the name of the node manager service.



10. Now create a DependOnService value for the beasvc bifoundation_domain_bi_server1 and give it the two values:
·         Oracle WebLogic Node Manager (D_MW_HOME_wlserver_10.3)
·         beasvc bifoundation_domain_AdminServer






11. Finally create the DependOnService value for the OracleProcessManager_instance1 with the three values:
·         Oracle WebLogic NodeManager (D_MW_HOME_wlserver_10.3)
·         beasvc bifoundation_domain_AdminServer
·         beasvc bifoundation_domain_bi_server1



Check the Services.

Open up the Services window and scroll down to find the four OBIEE services. You need to make sure all four are set to Automatic startup.  


Restart the Server.

Now shutdown and restart the Server.

(Note: When the server boots all four services should start in the correct order, however be warned that they will take just as long to start as they do when using the standard ‘Start BI Services’ command, however being services there will be no command windows and the services will stay up when you log off. The Services screen is a little confusing because all four services will report a status of ‘Started’ even though they are still loading in the back ground.)

By this restart, the bi services should start as windows services in the order
  • ·         Oracle Node Manager
  • ·         Admin Server
  • ·         BI Server
  • ·         OPMN



 Log in to EM, Console and Analytics and verify the reports and services. We can see that there are no command prompts open related to OBIEE in that active user session. Below Task Manager screen shot indicates OBIEE services are running under System Account.




Reference

Thursday, 11 February 2016


Exceeded configured maximum number of allowed input records.

Issue: While trying to open a report from Analytics, you may get an error stating"
Exceeded configured maximum number of allowed input records".
Description:  This error occurs when the BI server tries to fetch up more records than the limit specified in instanceconfig.xml file.

Solution:
 We need to change the row limit in instanceconfig.xml file which is in the location
MW_HOME/instance/Instance1/config/OracleBIPresentationServicesComponent/
coreapplication_obips1/instanceconfig.xml file.(The same can be increased using console itself.)

  • Note: Below mentioned tags has to be included in between <security> and </security> inorder to increase the maximum display limit in reports. 

<Cube>
<CubeMaxRecords>999999</CubeMaxRecords>
<CubeMaxPopulatedCells>180000</CubeMaxPopulatedCells>
</Cube>

<Charts>
        <MaxVisibleColumns>999999</MaxVisibleColumns>
        <MaxVisiblePages>999999</MaxVisiblePages>
        <MaxVisibleRows>999999</MaxVisibleRows>
        <MaxVisibleSections>999999</MaxVisibleSections>
        <JavaHostReadLimitInKB>999999</JavaHostReadLimitInKB>
 </Charts>

<Pivot>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
<DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
<DefaultRowsDisplayedInDownload>999999</DefaultRowsDisplayedInDownload>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
        <MaxVisibleColumns>999999</MaxVisibleColumns>
        <MaxVisiblePages>999999</MaxVisiblePages>
        <MaxVisibleRows>999999</MaxVisibleRows>
        <MaxVisibleSections>999999</MaxVisibleSections>
<!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control--><DisableAutoPreview>false</DisableAutoPreview>
</Pivot>
  •  Restart the BI Server after making the required changes. It is better if you could restart all of the coreappliaction components.


Tuesday, 9 February 2016

OBIEE 11g : weblogic.management.managementexception : "unable to obtain lock server may already be running".


This error occurs in two scenarios:

1. If the server is already running.
2. If the server is not properly killed and at times it does retain some references to the .lok file under the tmp directory of the DOMAIN/server folder and the lok file is not relinquished totally.

When the server starts it checks if any .lok file in present in the tmp file.
If yes, it would try to acquire a lock on that one.

If the lock is already held by some other process, then it would throw this error.

Solution: 
  1. Check the running processes which can acquire lock on the .lok files and kill them.
  2. Restart the server. 


Agents fetching limited records after scheduling in OBIEE 11g.


Info: The number of rows returned when a report is run (downloaded) is different than when it is emailed to the end user via scheduling.(limited to 75 rows/records)
Description: When you run a report online, the output shows the correct number of records. However, when scheduling the Analysis Agent , the email content shows only 75 records, some expected rows are missing.
Cause: The issue is caused by the following setup:

MW_HOME/instance/Instance1/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml file,

there is an entry that controls how many records could be delivered. In this case it is defaulted to 75.

 <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>

Scenario: 
Log into /analytics.
Run the report in question and observe that the number of records are greater than 75.
Now, schedule the report using the Analysis Agent.
The emailed report will have only 75 rows or records.
Please note that the fix has to be done through the BI Enterprise Manager not by modifying the instanceconfig.xml.
The instanceconfig.xml should look like below tag before modifying through EM.
<Views>
<Pivot>              
 <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
<DefaultRowsDisplayedInDownload>25000</DefaultRowsDisplayedInDownload>
<DisableAutoPreview>false</DisableAutoPreview>
<MaxCells>1000000</MaxCells>
</Pivot>
<Table>
<DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
<DefaultRowsDisplayedInDownload>25000</DefaultRowsDisplayedInDownload>
<MaxCells>1000000</MaxCells>
</Table>
</Views>

The Solution:

To increase this value, please follow these steps:
1. Log in to Fusion Middleware Enterprise Manager.
2. Navigate to Coreapplication => Capacity Management => Performance tab.
3. Look for this setting.
   [Maximum Number of Rows Per Page to Include].
4. Change this value to 25000 and  ensure to click the "APPLY" button.
5. Followed by clicking  "Activate Changes" , restart the BI Server (all of the coreapplication components).



BEA-141281 unable to get file lock, will retry. . 


Info: unable to get file lock, will retry …
Description: This message indicates that WLS can not get file lock because other process still holds the lock. W LS will try again before timeout.
Cause: This is an information-level message only.
Action: If WLS fails to start due to unable to get file lock, then lock files need to be removed manually before restart WLS.

The solution:

  1. Delete the domain *.lok file
  2. Remove the 1 edit.lok (Oracle/Middleware/user_projects/domains/idm_domain)
  3. Remove the 2 config.lok (Oracle/Middleware/user_projects/domains/idm_domain/config/)
  4. Remove the 3 AdminServer.lok (Oracle/Middleware/user_projects/domains/idm_domain/servers/AdminServer/tmprm AdminServer.lok)
  5. Remove the 4 EmbeddedLDAP.lok (Oracle/Middleware/user_projects/domains/idm_domain/servers/AdminServer/data/ldap/ldapfilesrm EmbeddedLDAP.lok)
  6. Restart the weblogic.
Note: In case the .lok file is unable to delete, stop the java.exe program from task manager and try again.

OBIEE file locations:

NodeManager. properties: C:\MW_HOME\wlserver_10.3\common\nodemanager

NQSConfig File: C:\MW_HOME\instances\instance1\config\OracleBIServerComponen\coreapplication_obis1

StartWebLogic/SetDomainEnv: C:\MW_HOME\user_projects\domains\bifoundation_domain\bin

Repository: C:\MW_HOME\instances\instance1\bifoundation\OracleBIServerComponent\coreapplication_obis1\repository

nqserver: C:\MW_HOME\instances\instance1\diagnostics\logs\OracleBIServerComponent\coreapplication_obis1

sawlog: C:\MW_HOME\instances\instance1\diagnostics\logs\OracleBIPresentationServicesComponent\coreapplication_obips1

instanceconfig.xml: C:\MW_HOME\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1

tnsnames.ora:   C:\MW_HOME\Oracle_BI1\network\admin\sample