Tuesday, 18 December 2012

Point To Be Remember


XML Configuration Files
Property files
Log Files
WebSphere stores its configuration to set of XML files. When we use the Admin console to configure WebSphere, certain XML files are updated internally.
CELL-scope
• admin-authz.xml
Contains the roles set for administration of the Admin console.
<profile_root>/appsrv01/config/cells/<cell_name>/
• profileRegistry.xml
Contains a list of profiles and profile configuration data
• resources.xml
Defines operating cell scope environmental resources, including JDBC, JMS, JavaMail, URL end point configuration, and so on.
• security.xml
Contains security data , including all user ID and password information.
• virtualhosts.xml
Contains virtual host and Multipurpose Internet Mail Extensions (MIME)-type configurations.
• variables.xml
Contains cell level WebSphere variables
• wimconfig.xml
Contains the federated repository configurations for global security
<profile_root>/config/cells/<cell_name>/wim/config/
NODE-scope
• namestore.xml
Provides persistent JNDI namespace binding data
• resources.xml
Defines node scope environmental resources, including JDBC, JMS, JavaMail, URL end point configuration, and so on
• serverindex.xml
Specifies all the ports used by servers on this node
• variables.xml
Contains node level WebSphere variables
SERVER-scope
• resources.xml
Contains the configuration of resources, such as, JDBC, JMS, JavaMail, and URL end points at server scope
• server.xml
Contains application server configuration data
• variables.xml
Contains server level variables
properties files
If the global security is enabled WebSphere Application Server cell, you need to manually enter the username and password every time you run the wsadmin tool. By editing the sas.client.props and the soap.client.props files, you can specify the username and password you have configured for global security so you are not prompted to enter the username and password every time you run administrative scripts.

soap.client.props file
com.ibm.SOAP.securityEnabled=<true>
com.ibm.SOAP.loginUserid=<username>
com.ibm.SOAP.loginPassword=<password>
Optionally, set the following property:
com.ibm.SOAP.loginSource=none
sas.client.props file
com.ibm.CORBA.loginUserid=
com.ibm.CORBA.loginPassword=
Also, set the following property:
com.ibm.CORBA.loginSource=properties

Log Files
JVM logs
native_stderr.log,native_stdout.log
stdout and stderr streams are redirected to log files at application server startup, which contain text written to the stdout and stderr streams by native modules, that is, Linux Modules, and so on. In normal error-free operations, these logs files are typically empty.
startServer.log
It is created in your logs directory when the server starts up. This log is very useful to determine JVM parameters used in the start-up process, the server’s process id, and also the date and time in which the server was started. If there are errors experienced during the start-up (for example, security configuration errors where the application server cannot start), then log information will exist for problem determination.
stopServer.log
when server was stopped via a command line, the log will be written to this. If the server has trouble stopping, then Java stack traces will be written to the log which can be used in determining why a given application server failed to stop.
SystemErr.log
contains Java exceptions and stack traces. An empty SystemErr.log file does not necessarily indicate a successfully running application server JVM. You may need to consult the other logs in this directory.
SystemOut.log
This log file contains messages as generated by the JVM during runtime. Some messages are informational, some are warnings or status updates. Applications can be configured to write to the log and so it is very common for the SystemOut.log to be your first port of call in application debugging.

<server_name>.pid
contains the process id of the server. In Linux, this is the actual process id assigned to the JVM process.

FFDC logs
FFDC directory contains detailed logs of exceptions found during the runtime of the WebSphere Application Server. Can be found at WAS_ROOT/profiles/logs/ffdc

Thursday, 22 November 2012

SyncNode command


The syncNode command forces a configuration synchronization to occur between the node and the deployment manager for the cell in which the node is configured.
The node agent server runs a configuration synchronization service that keeps the node configuration synchronized with the master cell configuration. If the node agent is unable to run because of a problem in the node configuration, you can use the syncNode command to perform a synchronization when the node agent is not running in order to force the node configuration back in sync with the cell configuration. If the node agent is running and you want to run the syncNode command, you must first stop the node agent.
The syncNode.log file is located in the profile_root/logs directory.
For more information about where to run this command, see the Using command tools topic.
Syntax
The command syntax is as follows:
syncNode <deploymgr host> <deploymgr port> [options]
  • The <deploymgr host> argument is required.
  • The <deploymgr port> is the Java Management Extensions (JMX) port number that corresponds to the connector type on the -conntype parameter.
Parameters
The following options are available for the syncNode command:
-stopservers
Tells the syncNode command to stop all servers on the node, including the node agent, before performing configuration synchronization with the cell.
-restart
Tells the syncNode command to launch the node agent process after configuration synchronization completes. If the node agent is running and you want to run the syncNode command, you must first stop the node agent.
-nowait
Tells the syncNode command not to wait for successful initialization of the launched node agent process.
-quiet
Suppresses the progress information that the syncNode command prints in normal mode.
-logfile <fileName>
Specifies the location of the log file to which trace information is written. By default, the log file is named syncNode.log and is created in the logs directory of the profile for the node that you are synchronizing.
-profileName [AIX Solaris HP-UX Linux Windows] [IBM i]
Defines the profile of the Application Server process in a multi-profile installation. The -profileName option is not required for running in a single profile environment. The default for this option is the default profile.
-replacelog
Replaces the log file instead of appending to the current log.
-trace
Generates trace information into a file for debugging purposes.
-timeout <seconds>
Specifies the waiting time before node agent initialization times out and returns an error.
-username <name>
Specifies the user name for authentication if security is enabled. Acts the same as the -user option.
-user <name>
Specifies the user name for authentication if security is enabled. Acts the same as the -username option.
-password <password>
Specifies the password for authentication if security is enabled.
-conntype <type>
Specifies the Java Management Extensions (JMX) connector type to use for connecting to the deployment manager. Valid types are SOAP or Remote Method Invocation (RMI). The default type is SOAP.
-help
Prints a usage statement.
-?
Prints a usage statement.
Usage scenario
The following examples demonstrate correct syntax:
[AIX Solaris HP-UX Linux Windows] [IBM i]
syncNode testhost 8879

syncNode deploymgr 8879 -trace (produces the syncNode.log file)

syncNode host25 4444 -stopservers -restart
(assumes that the deployment manager JMX port is 4444)
[z/OS]
syncNode.sh testhost 8879

syncNode.sh deploymgr 8879 -trace (produces the syncNode.log file)



Case:
Note: Before running syncNode command
1. Ensure that the Deployment Manager is running on the specified host and port
2. The syncNode command may only be run when the node agent is stopped
Case 1: when dmgr, app server, nodeagent in stop status —->
<appsrv-home>/bin> syncNode.bat  <dmgr-host> <dmgr_soap_port> -username xxx  -password xxxxx
O/P:
ADMU0116I: Tool information is being logged in file C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv60\logs\syncNode.log
ADMU0128I: Starting tool with the AppSrv60 profile
ADMU0113E: Program exiting with error:
com.ibm.websphere.management.exception.ConnectorException:
ADMC0016E: The system cannot create a SOAP connector to connect to
host localhost at port 8879., resulting from:
java.lang.reflect.InvocationTargetException
ADMU4123E: Ensure that the Deployment Manager is running on the specified host and port.
ADMU1211I: To obtain a full trace of the failure, use the -trace option.
ADMU0211I: Error details may be seen in the file: C:\Program
Files\IBM\WebSphere\AppServer/profiles/AppSrv60\logs\syncNode.log
————————————————
Case 2: dmgr , nodeagent start state —>
syncNode.bat dmgr-host 8879
O/P:
ADMU0116I: Tool information is being logged in file C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv60\logs\syncNode.log
ADMU0128I: Starting tool with the AppSrv60 profile
ADMU0401I: Begin syncNode operation for node anode60 with Deployment Manager
localhost: 8879
ADMU0403E: The syncNode command may only be run when the node agent is stopped.
Either stop the node agent or use the normal synchronization
facility in the node agent.
—————————————————
Case 3: To do sync—> dmgr,server1 is start and nodeagent in stop—> running syncNode
O/P:
ADMU0116I: Tool information is being logged in file C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv60\logs\syncNode.log
ADMU0128I: Starting tool with the AppSrv60 profile
ADMU0401I: Begin syncNode operation for node anode60 with Deployment Manager
localhost: 8879
ADMU0016I: Synchronizing configuration between node and cell.
ADMU0402I: The configuration for node anode60 has been synchronized with
Deployment Manager localhost: 8879


Wednesday, 14 November 2012

Session Affinity


Session Affinity allows returning requests to be routed back to the
same server in a cluster that handled the initial request, if that
same server is available.

 Plug-in Session Affinity is handled by the WebSphere Plug-in
through a special cookie enabled and configured by the Application
Server
 Default name for the Application Server session cookie is
JSESSIONID
 Application Server Session JSESSIONID cookie is enabled and set
through WebSphere Administration console
 Application servers -> <Application ServerName> -> Session
management -> Cookies


Plug-in Session Affinity
 JSESSIONID cookie contains
CacheID
SessionID
CloneID
 Only CloneID is used by WebSphere Plug-in for Session
Affinity

Plug-in Session Affinity
 For Session Affinity to work a few things must be setup
1. Cluster environment is created
2. JSESSIONID Cookie is enabled by the Application
Server
3. CloneID is generate to the Plugin-cfg.xml , after
Cookie has been setup and Enabled in the Application
Server

ypes of session affinity
A load balancer group supports the following types (or modes) of session affinity:
  • Passive
  • Active
  • Active-conditional
1.Passive session affinity
Passive session affinity can be used with only WebSphere servers
2.Active session affinity
Active session affinity is for non-WebSphere servers that do not use cookies.
3.Active-conditional session affinity
Active-conditional session affinity is for non-WebSphere servers that use cookies.

Wednesday, 7 November 2012

WebLogic vs WebSphere


WebLogic vs  WebSphere

Application Servers comparison: an administrative perspective

Oracle WebLogic
IBM Websphere
Installation packages are in Basic, Enterprise, Suite. The Generic jar version is platform independent. Zip distribution is light weight available for developers.
Installation binaries are different packages available as Base, Express, Network Deployment, Enterprise
Domain is the logical collection of entire WebLogic  resources and services
Cell is a logical representation of complete set of resources and services
NodeManager controls registered domains and their managed servers on the Nodes. Node manager enrolls the domain with nmEnroll
NodeAgent controls managed nodes. The addNode to a Deployment Manager is done with federation
Whole Security defined under Realm
Security defined under a Domain
Administrative console is controlled by AdminServer
The centralized Administrative console is controlled by Deployment Manager, which interun connected with NodeAgents for Administer the application server  and others
Managed Server, Stand-alone Server
Application Server, Message Engine
To start Admin Server startWebLogic.sh
To start DMGR startManager.sh
To start Managed Server startManagedWebLogic.sh
To start a application server startServer.sh
startNodeManager.sh
startNode.sh
To configure a domain config.sh that uses domain templates
To make a profile manageprofile.sh uses profile templates
My Oracle Support
My IBM
Logging

Sunday, 28 October 2012

Deloy Application Step


§  Goto Applications ->install new application
§  select enterprise application and browse the archive (EAR) file
§  Select the install method
§  Map the modules to servers
§  choose the deployment options (detailed was chosen here to show all the options)
§  Map shared libraries, if required
§  Map resource references to resources
§  Mapping virtual hosts for web modules (by default, default_host will be there)
§  Map the context root for the application
§  Review all the steps and options you provided
§  and finish the application deployment
§  start the application and test it

Tuesday, 16 October 2012

Linux basic commands

Command
Example
Description
1.     ls
ls
ls -alF
Lists files in current directory
List in long format
2.     cd
cd tempdir
cd ..
cd ~dhyatt/web-docs
Change directory to tempdir
Move back one directory
Move into dhyatt's web-docs directory
3.     mkdir
mkdir graphics
Make a directory called graphics
4.     rmdir
rmdir emptydir
Remove directory (must be empty)
5.     cp
cp file1 web-docs
cp file1 file1.bak
Copy file into directory
Make backup of file1
6.     rm
rm file1.bak
rm *.tmp
Remove or delete file
Remove all file
7.     mv
mv old.html new.html
Move or rename files
8.     more
more index.html
Look at file, one page at a time
9.     lpr
lpr index.html
Send file to printer
10.   man
man ls
Online manual (help) about command
Command
Example
Description
1.     grep <str><files>
grep "bad word" *
Find which files contain a certain word
2.     chmod <opt> <file>
chmod 644 *.html
chmod 755 file.exe
Change file permissions read only
Change file permissions to executable
3.     passwd
passwd
Change passwd
4.     ps <opt>
ps aux
ps aux   |   grep dhyatt
List all running processes by #ID
List process #ID's running by dhyatt
5.     kill <opt> <ID>
kill -9 8453
Kill process with ID #8453
6.     gcc (g++) <source>
gcc file.c -o file
g++ fil2.cpp -o fil2
Compile a program written in C
Compile a program written in C++
7.     gzip <file>
gzip bigfile
gunzip bigfile.gz
Compress file
Uncompress file
8.     mail
        (pine)
mail me@tjhsst.edu < file1
pine
Send file1 by email to someone
Read mail using pine
9.     telnet <host>
        ssh <host>
telnet vortex.tjhsst.edu
ssh -l dhyatt jazz.tjhsst.edu
Open a connection to vortex
Open a secure connection to jazz as user dhyatt
10.   ftp <host>
ncftp <host/directory>
ftp station1.tjhsst.edu
ncftp metalab.unc.edu
Upload or Download files to station1
Connect to archives at UNC
Command
Example
Description
1.     who
who
Lists who is logged on your machine
2.     finger
finger
Lists who is on computers in the lab
3.     ytalk <user@place>
ytalk dhyatt@threat
Talk online with dhyatt who is on threat
4.     history
history
Lists commands you've done recently
5.     fortune
fortune
Print random humerous message
6.     date
date
Print out current date
7.     cal <mo> <yr>
cal 9 2000
Print calendar for September 2000
8.     xeyes
xeyes &
Keep track of cursor (in "background")
9.     xcalc
xcalc &
Calculator ("background" process)
10.   mpage <opt> <file>
mpage -8 file1   |  lpr
Print 8 pages on a single sheet and send to printer (the font will be small!)
Command
Example
Description
1.     netscape
netscape &
Run Netscape browser
2.     xv
xv &
Run graphics file converter
3.     xfig / xpaint
xfig & (xpaint &)
Run drawing program
4.     gimp
gimp &
Run photoshop type program
5.     ispell <fname>
ispell file1
Spell check file1
6.     latex <fname>
latex file.tex
Run LaTeX, a scientific document tool
7.     xemacs / pico
xemacs (or pico)
Different editors
8.     soffice
soffice &
Run StarOffice, a full word processor
9.     m-tools (mdir, mcopy,
        mdel, mformat, etc. )
mdir a:
mcopy file1   a:
DOS commands from UNIX (dir A:)
Copy file1 to A:
10.   gnuplot
gnuplot
Plot data graphically
Command
Example
Description
1.     df
df
See how much free disk space
2.     du
du -b subdir
Estimate disk usage of directory in Bytes
3.     alias
alias lls="ls -alF"
Create new command "lls" for long format of ls
4.     xhost
xhost + threat.tjhsst.edu
xhost -
Permit window to display from x-window program from threat
Allow no x-window access from other systems
5.     fold
fold -s file1   |   lpr
Fold or break long lines at 60 characters and send to printer
6.     tar
tar -cf subdir.tar subdir
tar -xvf subdir.tar
Create an archive called subdir.tar of a directory
Extract files from an archive file
7.     ghostview (gv)
gv filename.ps
View a Postscript file
8.     ping
   (traceroute)
ping threat.tjhsst.edu
traceroute www.yahoo.com
See if machine is alive
Print data path to a machine
9.     top
top
Print system usage and top resource hogs
10.   logout (exit)
logout or exit
How to quit a UNIX shell.