Wednesday, March 31, 2010

Disabling global security

If you are running a Deployment Manager
There are two security.xml files you need to change:
WSAS_install_root/AppServer/config/cells/cellname/security.xml
WSAS_install_root/DeploymentManager/config/cells/cellname/security.xml
Always store a copy of the security.xml file in a temporary directory before making any changes.
Open each security.xml file and search for the very first occurrence of enabled="true". This is located inside the tag.
Change enabled="true" to enabled="false", then save the file.
You must restart the Deployment Manager, the nodegent and then the Application Servers, in that order.

Monday, March 15, 2010

A quick way of navigating to WebSphere logs

A quick way of navigating to WebSphere logs. If you are using the bash as a shell then you know about the tab key to auto complete, however in the WebSphere file system there are many subfolders within subfolders to get to the logs. To speed up having to tab through folders you can go direct using a UNIX alias as a shortcut.alias, unaliasAssign a name or an abbreviated name that makes sense or is shorter for a command.Description:alias Lists the aliases that are currently defined. alias "dir=ls" Creates an alias. dir will output the same contents as the ls command. unalias name Removes an alias. unalias dir Example:in my .bash_profile I have created two lines as follows:alias dlogs='ls -ltr /apps/was/ws61/profiles/dmgr/logs'alias glogs='cd /apps/was/ws61/profiles/dmgr/logs'Demo:To list deployment manager logs[root@websphere ~]# dlogstotal 2076-rw-r--r-- 1 root root 508 Oct 14 16:09 AboutThisProfile.txt-rw-r--r-- 1 root root 2561 Dec 15 12:59 iscinstall.log-rw-r--r-- 1 root root 0 Dec 15 15:03 wsadmin.valout-rw-r--r-- 1 root root 6635 Dec 15 15:03 wsadmin.traceoutdrwxr-xr-x 2 root root 4096 Dec 15 22:22 dmgrdrwxr-xr-x 2 root root 4096 Jan 28 21:59 ffdc-rw-r--r-- 1 root root 2097152 Jan 28 22:01 activity.logTo go to deployment logs[root@websphere ~]# glogs[root@websphere logs]#

WASX702 Error creating SOAP connection to host localhost exception

Problem:WASX7023E: Error creating "SOAP" connection to host "localhost"; exception information: com.ibm.websphere.management.exception.ConnectorNotAvailableException: com.ibm.websphere.management.exception.ConnectorNotAvailableException: Failed to get a connection with IP address associated with hostname localhostWASX7213I: This scripting client is not connected to a server process; please refer to the log file /E50/was/inst50/profiles/e50crm_cell/e50crm_dmgr/logs/wsadmin.traceout for additional information.WASX8011W: AdminTask object is not available.WASX7017E: Exception received while running file "./my script.jacl"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7070E: The configuration service is not available.
Solution:The problem is the Deployment Manager is not started, Start it./profiles/dmgr/bin/startManager.sh or startManager.bat

Discussion on umask options for Installing WebSphere

Well depending on how paranoid you may be in your environment and if your a true Unix die hard you would probably not like the default suggested umask of 022 for WebSphere installs. Often your hosting provider will set a default umask of 077 for the OS, however you can set a umask in your user profile that you are installing WAS. Is is recommended that you install WebSphere with the umask 022, but you could go to 027 to stop third party's from reading your logs.a umask is you access not'd. So 022 means that all new files will have 755 as their file permissions. Not'd means the inverse. We are using binary do the inverse of 7 is 0 and the inverse of 5 is two.Note: 755 means rwx for owner, r x for group and r x for otherBefore installing WebSphere you can verify the umask setting, issue the following command:umaskTo set the umask setting to 022, issue the following command:umask 022 A umask of 22 will allow logs to be created where third party's (other) can read the logs. some WebSphere/Unix admins consider logs source code and thus use 077 or 027.Some more security conscious WebSphere installs may even go for 027 where access for other is not allowed until the administrator grants it upon request. This means no other third party can read the was logs unless the file permission's are changed with chmod.

How to find number of JVM in Websphere

To list all the jvm process that wensphere is running you can do several thgins.
1. ps-ef grep
> ps -ef grep //javawasadm 18445 18436 0 13:48:33 pts/9 0:00 grep /javawasadm 9959 1 0 Feb 18 ? 4:17 /java/bin/java -XX:MaxPermSize=256m -Dwas.status.socket=49743 -Xwasadm 9927 1 0 Feb 18 ? 5:10 /java/bin/java -XX:MaxPermSize=256m -Dwas.status.socket=49611 -X2. pgrep -f -u $WASUSER $ENVPATH

Application files

EJB application JAR files — An EJB application JAR file contains one or moreEJBs.
Web application WAR files — AWAR file contains a single Web application.Because an EAR file can contain multiple Web applications, each Web applicationin an EAR file must have a unique deployment context. The deploymentmechanism for EAR files allows just such a specification of different contexts.
Application client JAR files — The application client JAR file contains a single,standalone Java application that’s intended to run within an application clientcontainer. The application client JAR file contains a specialized deploymentdescriptor and is composed similarly to an EJB JAR file. The JAR file also containsthe classes required to run the standalone client as well as any clientlibraries needed to access JAAS, JAXP, JDBC, JMS, or an EJB client.
Resource adapter RAR files — The resource adapter RAR file contains Javaclasses and native libraries required to implement a Java Connector Architecture(JCA) resource adapter to an enterprise information system. Resource adaptersdon’t execute within a container; rather, they’re designed to execute as a bridgebetween an application server and an external enterprise information system.Each of these components is developed and packaged individually apart from the EARfile and its own deployment descriptor. A J2EE EAR file combines one or more of thesecomponents into a unified package with a custom deployment descriptor.Packaging Roles

What is WebSphere?

WebSphere is a set of Java-based tools from IBM that allows customers to create and manage sophisticated business Web sites. The central WebSphere tool is the WebSphere Application Server (WAS), an application server that a customer can use to connect Web site users with Java applications or servlets. Servlets are Java programs that run on the server rather than on the user's computer as Java applets do. Servlets can be developed to replace traditional common gateway interface (CGI) scripts, usually written in C or Practical Extraction and Reporting Language, and run much faster because all user requests run in the same process space. In addition to Java, WebSphere supports open standard interfaces such as the Common Object Request Broker Architecture (CORBA) and Java Database Connectivity (JDBC) and is designed for use across different operating system platforms. One edition of WebSphere is offered for small-to-medium size businesses and another edition for larger businesses with a higher number of transactions``
WAS provides a servlet server that is installed as a "bolt-on" to a Web (HTTP) server. The HTTP server provides static Web pages and when it is equipped with a servlet server such as WebSphere, it can provide dynamic Web pages that are modified on the fly by data that is on your iSeries. Servlets are the Java programs that communicate directly with the servlet server and send it the formatted data to enable Web transactions and data access. The Java programs in turn can do it all or they can call high level language (HLL) programs such as those written in RPG and COBOL to fetch and/or update the necessary data.
With a servlet server such as WebSphere, the code called by the server is always based on Java. The bottom line is that if you want the IBM mainstream method for serving dynamic data to a Web browser, you need a servlet server such as WebSphere in any of its versions and packages. WebSphere is currently at version 6.0 and there are a few numbers following it such as 6.0.2.1 which better depict its version and micro release and PTF levels.
WebSphere is in many ways a Web operating system that operates under control of the system's operating system. Just like i5/OS, it is very large, complex, and sophisticated. Though you may be able to do simple things with just a bit of WebSphere knowledge, to become proficient in it, you have to invest quite a bit of time. To give you an idea of the complexity of WebSphere and the things you can know overall to make it work effectively in your shop, there are a number of manuals that IBM provides for you to learn and use the product. In fact, there are seven separate PDF manuals for version 6.0 that address the many aspects of hosting a WebSphere server from installation to administration to troubleshooting.
The following list contains the purpose of each of these PDF format manuals and the number of pages in each. Considering that the manuals are two weeks behind the Web version, for me they are much easier to work with than playing the hypertext game on the Web. They are all downloadable to your PC. Additionally, they are being updated all the time so these page counts are how they look right now at the beginning of the fourth quarter, 2005. The WebSphere manuals include the following:
Installation, 66 pages Administration, 2690 pages Performance, 300 pages Security, 1196 pages Troubleshooting, 336 pages Migration, 170 pages Program Development, 1366 pages That's about 6,000 pages. Though you don't need all of those pages to set up and get some simple things running with WAS Express, if those pages we