Thursday, November 20, 2014

wsadmin check global security


 the below  function  if security is enabled will return True else False.


def isGlobalSecurityEnabled():
    securityon = AdminTask.isGlobalSecurityEnabled()
    return securityon

Another Usage:


security=AdminTask.isGlobalSecurityEnabled()
if security == 'true':
 print "Global security Enabled"
else:
 print "Global Security not Enabled"

wsadmin check application exist or not

appname="Yourappname"
isapppresent=AdminConfig.getid("Deployment:"+appname+"/")
if len(isapppresent) > 0:
   print "the application %s is present" % appname
else:
  print "the application  %s is not present"  % appname
 

wsadmin get hostname of a node

node=AdminControl.getNode()
ns=AdminConfig.getid("/Node:"+node+"/")
AdminConfig.showAttribute(ns,'hostName')

Tuesday, October 14, 2014

Configure websphere datasource for cluster database configuration

Oracle RAC cluster:

  jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-node1)(port=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=rac-node2)(port=1521)))(FAILOVER=on)(LOAD_BALANCE=on)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<service_name>)))


DB2 HADR:
   The below values are needed  for configuration

Retry interval for client reroute
Maximum retries for client reroute
Alternate server names
Alternate port numbers
Client reroute server list JNDI™ name
Unbind client reroute list from JNDI

Monday, October 13, 2014

Generate javacore automatically ,threaddumps during hung threads

Add the below custom property to genereate thread dump:

com.ibm.websphere.threadmonitor.dump.java  true

Application servers->server->Server Infrastructure->Administration->Custom property

Monday, July 28, 2014

ADMN0022E: Access is denied for the getProcessType operation on Server MBean because of insufficient or empty credentials

If you get error ADMN0022E while you are trying to issue commands that require username ,password,then there is a problem with password.Check the password has any special character which is not allowed.


Check the deployment logs to see any LDAP error as below is there
[LDAP: error code 49 - Invalid Credentials] to confirm the password is wrong.



Friday, July 11, 2014

Class Loading PARENT_FIRST, PARENT_LAST explained

By default in IBM Websphere Application server the PARENT_FIRST option is selected for
class loading.

Classloadingdelegation Model.








As mentioned in the diagram

if delegation model is set to PARENT_FIRST it will try to load from the application jars which are present in WEB-INF/lib or WEB-INF/classes or  included in shared library references.

If the class expected is not present in the application loader it will look up to it parent until Bootstrap.

So in PARENT_FIRST the look up for classes is always upwards .If a class referenced by Ext loader is present in application level then that class will not be visible and throw exception.

PARENT_LAST is just opposite to PARENT_FIRST it  look for classes downwards  from root classloader.


Change sdk version in Websphere 8

Some software integrating with Websphere will require sdk 7 instead of default sdk 6 .There is
a  script available in profile bin directory to change the sdk version

Displays a list of all SDK names available to the product installation.
i.e. managesdk -listAvailable -verbose

-listEnabledProfile [-profileName profile_name]
Displays a list of all SDK names that specific profile is currently configured to use.
i.e. managesdk -listEnabledProfile -profileName default

-listEnabledProfileAll
Displays a list of all profiles in an installation and the SDK names that each profile is currently configured to use.
i.e. managesdk -listEnabledProfileAll

-enableProfile [-profileName profile_name] [-sdkname sdkName] [-enableServers] [-user user_name] [-password password_value]
Enables a profile to use a specified SDK name.
i.e. managesdk -enableProfile -profileName default -sdkname 1.6_64 -enableServers

-enableProfileAll [-sdkname sdkName] [-enableServers] [-user user_name] [-password password_value]
Enables all profiles in an installatino to use a specified SDK name.
i.e. managesdk -enableProfileAll -sdkname 1.6_64 -enableServers

-getNewProfileDefault
Displays the SDK name currently configured for all profiles created with the manageprofiles command.
i.e. managesdk -getNewProfileDefault

-setNewProfileDefault [-sdkname sdkName]
Changes the SDK name currently configured for all profiles created with the manageprofiles command.
i.e. managesdk -setNewProfileDefault -sdkname 1.6_64

-getCommandDefault
Displays the SDK name that script commands are enabled to use when no profile is specified by the command and when no profile is defaulted by the command.
i.e. managesdk -getCommandDefault

-setCommandDefault [-sdkname sdkName]
Changes the SDK name that script commands are enabled to use when no profile is specified by the command and when no profile is defaulted by the command.
i.e. managesdk -setCommandDefault -sdkname 1.6_64


IBM Reference  

Monday, May 12, 2014

ADMS0005E: The system is unable to generate synchronization request: javax.management.JMRuntimeException: ADMN0022E: Access is denied for the getRepositoryEpoch operation on ConfigRepository MBean because of insufficient or empty credentials.

If you get this error then synchronisation issue is there.Please check node is in sync in WAS console.
The server will not come up if node is not synch .Check for error messages like
Caused by: com.ibm.ejs.EJSException: Could not register with Location Service Daemon, which could only reside in the NodeAgent in SysOut logs.

Restart nodeagent to solve the issue .
The JVM will not come up if nodeagent has issue in registering with local service deamon.

Monday, April 28, 2014

Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.

Clear the browser cache and see if the error resolves.If not please increase the value of
LimitRequestFieldSize in httpd.conf

 
IBM reference link:
http://www-01.ibm.com/support/docview.wss?uid=swg21223419
http://www-01.ibm.com/support/docview.wss?uid=swg21384722

Thursday, April 10, 2014

ESI: getResponse: failed to get response: rc = 10 Internal server error 500

If you get these errors in Plugin logs

ERROR: ServerIOTimeout fired. Time out 60. retry count 0. serverIOTimeoutRetry -1, retry YES, rc 10

The above error is due to low value of ServerIOtimeOut.

ServerIOtimeOut plugin property explanation from IBM:
The ServerIOTimeout attribute of a server element enables the plug-in to set a time out value, in seconds, for sending requests to and reading responses from the application server.
If you set the ServerIOTimeout attribute to a positive value, this attempt to contact the server ends when the timeout occurs. However, the server is not considered to be down and future requests are still sent to the server on which the timeout occurred..
If you set the ServerIOTimeout attribute to a negative value, the server is considered to be down whenever a timeout occurs, and no future requests are sent to the server on which the timeout occurred.
  If a value is not set for the ServerIOTimeout attribute, the plug-in, by default, uses blocked I/O to write requests to and read responses from the application server, and does not time out the TCP connection. For example, you might specify the following setting:
For example, you might specify the following setting:
<Server Name="server1" ServerIOTimeout=300>
In this situation, if an application server stops responding to requests, the plug-in waits 300 seconds (5 minutes) before timing out the TCP connection. Setting the ServerIOTimeout attribute to a reasonable value enables the plug-in to time out the connection sooner, and transfer requests to another application server when possible.
When selecting a value for this attribute, remember that sometimes it might take a couple of minutes for an application server to process a request. Setting the value of the ServerIOTimeout attribute too low could cause the plug-in to send a false server error response to the client.
Important: The ServerIOTimeout limits the amount of time the plug-in will wait for each individual read or write operation to return. ServerIOTimeout does not represent a timeout for the overall request.
 
 
Increase the ServerIOtimeout value  to solve the above issue.
 
 

Thursday, March 27, 2014

Viewing activity log using showlog command

GO to $profile_root/bin

Use the below command to conver binary activity log to viewable one.

./showlog.sh  <activity.log path>  <path where you wanted to place new log>

ex:./showlog.sh ./logsactivity.log    /tmp/activity.log

SRVE0255E: A WebGroup/Virtual Host to handle /ibm/console has not been defined

The above error will be there in SystemOut logs when admin console of Websphere is not able to access.The reason is isclite.ear might be corrupted or manul port change would have caused the issue.

To solve the issue please reinstall isclite.ear using the below commands

Uninstall :

$profile_root/bin/wsadmin.sh -lang jython -f deployConsole.py remove






Install:
 $profile_root/bin/wsadmin.sh -lang jython -f deployConsole.py install

Wednesday, March 26, 2014

Caused by: com.ibm.websphere.wim.exception.WIMSystemException: CWWIM4520E The 'javax.naming.NamingException: [LDAP: error code 80 - Other]

If the above error is seen in Sysout logs of WAS please check LDAP is up and running fine.

80     LDAP_OTHER   Indicates an unknown error condition. This is the default value for NDS error codes which do not map to other LDAP error codes

Friday, January 31, 2014

java.sql.SQLNonTransientException: [jcc][t4][2043][11550][4.3.111] Exception java.net.ConnectException:

If you get this error while doing a test connection to a datasource.Please check the connection
telnet servername port

If it failed as connection refused then the port is not opened .