Wednesday, March 18, 2015

Problem with access SOA EM


Problem with access SOA EM






[ERROR] [J2EE JMX-46335] [] [tid: oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl - Incident Dump Executor (created: Wed Mar 18 08:53:24 CET 2015)] [userId: ] [ecid: d490ace35472fb51:-7e89a104:14c214f7eba:-8000-00000000000a2aea,0] [APP: soa-infra] MBean attribute access denied. [[
  MBean: EMDomain:Name=soa-infra,EMTargetType=oracle_soainfra,type=EMIntegration,Application=soa-infra
  Getter for attribute EMInstanceProperties
  Detail: Access denied. Required roles: Admin, Operator, Monitor, executing subject: principals=[] java.lang.SecurityException: Access denied. Required roles: Admin, Operator, Monitor, executing subject: principals=[]


This can be happened on SOA cluster distributed on different physical servers. Only one server which is running on the same server as Admin Server is able to authenticate the users for SOA application & the other servers are not able to authenticate the users.


Solution:


- login into WLS console
- select the domain -> security -> Embedded LDAP
-  enable Refresh Replica At Starup ( default value is disable)
- save changes & restart all servers




Tuesday, March 17, 2015

Weblogic Stuck Threads



Weblogic Stuck Threads  (BEA-000337)








WLS generate the following errors;





<[STUCK] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "622" seconds working on the request "Workmanager: default, Version
: 0, Scheduled=true, Started=true, Started time: 622750 ms
[
POST /soa-infra/services/xxxxxxxxxxx/HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Transfer-Encoding: chunked
User-Agent: Java1.6.0_81
Accept: text/html, image/gif, image/jpeg, */*; q=.2
Connection: Keep-Alive



]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
Thread-200 "[STUCK] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'" {
    jrockit.net.SocketNativeIO.readBytesPinned(SocketNativeIO.java:???)
    jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:32)




In SOA environment most of Stuck Threads are generated by de applications self (services).


The first thing you need to contact the developers to check there service


As a workaround


Make the following modifications:
  1. Login to Weblogic Server Administration Console.  Default: http://localhost:7001/console
  2. Select 'Lock and Edit' (if WebLogic server is a Production Mode implementation)
  3. Go to  Home > Summary of Servers > AdminServer, Tuning tab.
  4. Change the Stuck Thread Max Time from 600 to 900.
  5. Change the Stuck Thread Timer Interval from 60 to 100
  6. Go to Overload tab
  7. Change the Max Stuck Thread Time from 600 to 900.
  8. Change the Stuck Thread Count 0 to 16.
  9. Save and Activate Changes.
  10. Restart the WebLogic server.

WebCenter (ADF) & Weblogic

WebCenter (ADF) & Weblogic





One of the challenge which I met by one of our customer was the problem with ADF application & Weblogic. 


Different types of errors like JBO-25009 can not create an object of type .... & JBO-26041: failed to post data during insert or


JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-29000. Error message parameters are


{0=java.sql.SQLException, 1=Protocol violation: [0]}
 This a well known error in Weblogic. WLS has a feature enabled by default in its JDBC Data SOurce That Wraps JDBC data types and which interferes with some LOB type handling in ADF; some issues in passivation for 10g ADF and other LOB interaction from the Entity Objects .


Solution:


Only from WLS 10.3.4 & late you can enable & disable this feature.


 login on WL console -> Services -> Data Sources-> (data Source Name)-> Connection Pool->


Advanced.
under Advanced check out Wrap Data Types.
By checking out Wrap Data Types this feature will be disabled.
Restart of the data source is needed but I prefer to restart Managed Server

Thursday, March 1, 2012

weblogic server failed_not_restartable

You get this error during the start of  AdminServer or even Managed Server. There're a lot of threads about this erro &  how to solve it.

In my Situation, I had problem with the Admin Server & Managed Servers

I got to solve the problem of Admin Server as following
wls:/nm/base_domain> nmServerStatus ('AdminServer')


FAILED_NOT_RESTARTABLE
Solution:
1. An authorized user issues the WLST offline command nmConnect to connect to
the Node Manager process on the machine that hosts the Administration Server.
(If the Node Manager instance is the SSH version, the user can connect using the
SSH client). The nmConnect command provides the Node Manager user name
and password that are used to authenticate the user with the Node Manager.
Then, the user issues the nmStart command and provides the credentials for
starting the Administration Server.
For example:


prps = makePropertiesObject("username=weblogic,password=XXXXX")


prps = makePropertiesObject("username=weblogic, password=welcome1")

nmStart("AdminServer",props=prps)

The nmStart command identifies the domain and server instance to start.

2. Node Manager looks up the domain directory in nodemanager.domains, and authenticates the user credentials using a local file that contains the encrypted username and password.

3. Node Manager obtains the startup properties for the Administration Server.

4. Node Manager creates the Administration Server process.

5. The Administration Server obtains the domain configuration from its config directory.

Note: If the user has previously connected to the Node Manager, a

boot.properties file exists, and the user does not have to supply user name and password.

wls:/nm/base_domain> prps = makePropertiesObject("weblogic.ListenPort=7001")

wls:/nm/base_domain> nmStart('AdminServer',props=prps)

Starting server AdminServer ...

Successfully started server AdminServer ...

wls:/nm/base_domain>
=============================
 
For Managed Server
 
A lot of threads say it has to do with Xrs or Xnohup arguments (The arguments to use when starting this server). I disagree with them . Just have a look at  General Node Manager Configurationhttp://docs.oracle.com/cd/E12839_01/web.1111/e13740/nodemgr_config.htm 
 
I think the main problem with failed_not_restartable is error in the server startup configruation file, the config.xml or in PATH or CLASSPATH  ( ID 1130004.1)
 
In my situation I found in error in the server startup configuration file.I added the wrong Root Directory.
ex. D:\weblogic\Oracle\Middleware\user_projects\domains\my_domain
& it must be D:\weblogic\Oracle\Middleware\user_projects\domains\base_domain
 
 
Cheers,
 

Critical error Server failed. Reason there are 1 nested errors

It took to much time to find the solution for this error "Critical Server failed. Reason: There are 1 nested errors: weblogic.management.ManagementException: Booting as admin server, but servername,xxxxx, does not match the admin server name"

This  error can be accured  in the start of Managed Server through Node Manager
Reasons
1- Wrong parameters  in the Config.xml file
2- Wrong parameters in the Server Start file ( startup.properties)
3- Startup the Managed Server for the first time via Node Manager

Solution:

1- Just check one of the two files above &try; find out the wrong parameters then start your managed Server.
In my case  I addede the wrong the Root Directory " The directory that this server uses as its root directory. This directory must be on the computer that hosts the Node Manager"

2- Try starting the managed server one time via the script startManagedWebLogic outside of using Node Manager for example: WL_HOME\user_projects\domains\base_domain\bin\startManagedWebLogic.cmd (name managed Server) http://localhost:7001 . Then stop the server and this time use Node Manager still using startWebLogic as the script.
Cheers,

Saturday, February 18, 2012

Weblogic Admin Console Timeout

on the Weblogic Admin Console will cause user session timeout and will fall back at the login screen.

Solution:

To avoid timeout session you'll need to increase session timeout parameter in weblogic.xml.

This file is located under WL_HOME\wlserver_10.3\server\lib\consoleapp\webapp\WEB-INF.
The default setting is as floowing;

session-descriptor 
(timeout-secs)3600(/timeout-secs)
(invalidation-interval-secs)60(/invalidation-interval-secs)

You'll need to change these two parameters to your wish.
After changes has been taken place, just save the file and restart weblogic server.
 
Cheers,

Sunday, February 12, 2012

NodeManager(nmConnect problems)

During the start of NodeManager may be you'll meet the following problem;
NMProcess: WARNING: Configuration error while reading domain directory NMProcess: weblogic.nodemanager.common.ConfigException: The domain 'base_domain' at 'D://weblogic/Oracle//Middleware//user_projects//domains//base_domain' was not registered in the nodemanager.domains file and dynamic domain registration is not supported. Please register the domain in the nodemanager.domains file.

Or during the use of mnConnect  command for example:
wls:/base_domain/serverConfig> nmConnect('weblogic','xxxxxx','localhost','5556','base_domain',r'D:\weblogic/Oracle\Middleware\user_projects\domains\base_domain','ssl')


WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Access to domain 'base_domain' for user 'weblogic' denied Use dumpStack() to view the full stacktrace
wls:/base_domain/serverConfig>

Solution:

You will need to add the following lines to nm_password.properties file

password=xxxxx
username=weblogic
This file is located under WL_HOME\user_projects\domains\base_domain\config\nodemanager

Note: for the first Error you'll need to stop/start NodeManager

wls:/base_domain/serverConfig> stopNodeManager()
wls:/base_domain/serverConfig> startNodeManager()

For the second error you do not need to stop/start Nodemanager
wls:/base_domain/serverConfig> nmConnect 'weblogic','xxxxx','localhost','5556','base_domain',r'D:\weblogic/Oracle\Middleware\user_projects\domains\base_domain','ssl')

Connecting to Node Manager ...

Successfully Connected to Node Manager.

wls:/base_domain/serverConfig>
 
Cheers,