Encrypting the SOAP.CLIENT.PROPS file password.

Here the steps to encrypt the password in soap.client.props

1) Update the  global security userid and password in soap.client.props file
  com.ibm.SOAP.loginUserid=wassecid
  com.ibm.SOAP.loginPassword=password


2) encrypt the soap.client.props password using below command

    /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/PropFilePasswordEncoder.sh /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/soap.client.props com.ibm.SOAP.loginPassword

IBM HTTP Server SSL configuration using gsk7cmd utility

How to Create View Edit certificate in CLI mode using gsk7cmd command


          Now days most of the production server's are running in Unix machine and it dont have gui mode.
If we need to create certificate for WebServer (IHS Http) using ikeyman utility, we need to export the display to X-windows server.it will take more time to load the X-Window if we are in low bandwidth network


Here the Simple command's create the complete SSL certificate setup

Export JAVA_HOME to execute the gsk7cmd

    1) export JAVA_HOME=/opt/WebSphere/AppServer/java

It will create the TEST.kdb, TEST.rdb, TEST.sth, TEST.crl files


    2)  gsk7cmd -keydb -create -db TEST.kdb -pw passwd -type cms -expire 365 -stash



Then need to create Self-signed certificate to TEST.kdb file.


    3)  gsk7cmd -cert -create -db TEST.kdb  -pw passwd -label "HTTP Server Key" -dn CN=TEST.com,O="IT,C=US" -expire 365 -default_cert yes


We can check the default certificate details using below command


   4)  gsk7cmd -cert -getdefault -db TEST.kdb  -pw passwd


Ouput .....
-------------------------------------------------------------------------

Label: HTTP Server Key
Key Size: 1024
Version: X509 V3
Serial Number: BA BA 6D DB 5C FC F1 D6
Issued By: TEST.com
IT
US
Subject: TEST.com
IT
US
Valid From: Sunday, October 31, 2010 7:13:37 PM GMT To: Tuesday, November 1, 2011 7:13:37 PM GMT
Fingerprint: 3C:B8:C5:7B:61:14:7B:D4:5F:DE:C9:52:3F:BF:10:EB:EA:C2:E5:5F
Signature Algorithm: 1.2.840.113549.1.1.4
Trust Status: enabled

--------------------------------------------------------------------------



5) Then edit the httpd.conf file add the below line


    LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
    Listen 443
   
    SSLEnable
   
    SSLDisable
   KeyFile /usr/IBMHTTPServer/ssl/key.kdb


6) Restart IBM HTTP Server using the standard method and confirm that it is now responding on SSL port 443 by hitting the https://ihs_server_name/

Checking port usage on AIX

Problem(Abstract)
There is a problem restarting TMTP. The startServer.log indicates that port 8880 is unavailable even after a reboot. However, if DB2 and WebSphere are restarted, the problem is resolved.

Resolving the problem
Here is a method that can be used to determine what process is using a particular port:

1.
Run netstat to get the address of the port you need to check:

eg.
[root:/:] netstat -Aan | grep 8880
701995f0 tcp4 0 0 *.8880 *.* LISTEN

2.
Now use the address seen in the first column as the first parameter to the rmsock command. The second parameter is "tcpcb"

eg.
[root:/:] rmsock 701995f0 tcpcb
The socket 0x70199400 is being held by process 26792 (java).

Please note.... rmsock is used to remove sockets that do not have file descriptors. However, rmsock doesn't remove a socket that still has a valid file descriptor but, instead, returns the identity of the process owner.

3.
Finally, use "ps -ef" to identify the actual process.

eg.

[root:/:] ps -ef | grep 26792
root 26792 1 0 Sep 13 pts/4 1341:37 /space/ms52/WAS/java/bin/java -Xbootclasspath/p:/space/ms52/WAS/java/jre/lib/ext/ibmorb.jar:/space/ms52/WAS/java/jre/lib/ext/ibmext.jar -Dwas.status.socket=32957 -classpath /space/ms52/WAS/properties:/space/ms52/WAS/properties:/space/ms52/WAS/lib/bootstrap.jar:/space/ms52/WAS/lib/j2ee.jar:/space/ms52/WAS/lib/lmproxy.jar -Xmx256m -Dws.ext.dirs=/space/ms52/WAS/java/lib:/space/ms52/WAS/classes:/space/ms52/WAS/classes:/space/ms52/WAS/lib:/space/ms52/WAS/lib/ext:/space/ms52/WAS/web/help:/space/ms52/WAS/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dserver.root=/space/ms52/WAS -Ddb2j.system.home=/space/ms52/WAS/properties -Duser.install.root=/space/ms52/WAS-Dcom.ibm.itp.location=/space/ms52/WAS/bin -Dwas.install.root=/space/ms52/WAS -Djlog.propertyFileDir=/space/ms52/config-Dcom.ibm.tivoli.transperf.logging.baseDir=/usr/ibm/tivoli/common-Djava.security.auth.login.config=/space/ms52/WAS/properties/wsjaas.conf -Djava.security.policy=/space/ms52/WAS/properties/server.policy com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer/space/ms52/WAS/config orion orion server1

http://www-01.ibm.com/support/docview.wss?rs=656&context=SSGR2C&dc=DB560&dc=DB520&uid=swg21211151&loc=en_US&cs=utf-8&lang=en

Configuring the TransactionService using scripting

To modify the TransactionService  of a server  perform the following steps:

Using Jython:
  • serid = AdminConfig.getid('/Server:server1')
  • trid = AdminConfig.list('TransactionService',serid)
  • AdminConfig.modify(trid,[['clientInactivityTimeout', '100'], ['totalTranLifetimeTimeout', '200']])
Using Jacl:
  • set serid [$AdminConfig getid /Server:server1/]
  • set trid [$AdminConfig list TransactionService $serid]
  • set attr [list {clientInactivityTimeout 100} {totalTranLifetimeTimeout 200}]
  • $AdminConfig modify $trid $attr

Configuring the Java virtual machine using scripting

To modify the Java virtual machine (JVM) of the server to turn on debug mode, do the following steps:

There are two ways to perform this task. Choose one of the following Object Type: 

Using the AdminTask object:

Using Jacl:
  • $AdminTask setJVMDebugMode {-serverName server1 -nodeName node1 -debugMode true}
Using Jython:
  • AdminTask.setJVMDebugMode (['-serverName', 'server1', '-nodeName', 'node1', '-debugMode', 'true'])
Using the AdminConfig object:

Identify the server and assign it to the server1 variable

Using Jacl:
  • set server1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
  • set jvm [$AdminConfig list JavaVirtualMachine $server1]
  • $AdminConfig modify $jvm {{initialHeapSize 512} { maximumHeapSize 1024} {genericJvmArguments "-Xnoclassgc -Duser.timezone::GMT+05:30"} {debugMode true} {debugArgs "-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777"}}



Using Jython:
  • server1 = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
  • JVMID = AdminConfig.list('JavaVirtualMachine', server1)
  • AdminConfig.modify(JVMID,[['initialHeapSize', '512'], ['maximumHeapSize', '1024'], ['verboseModeGarbageCollection', 'true'], ['genericJvmArguments', '-Xnoclassgc -Duser.timezone::GMT+05:30'], ['debugMode', 'true'], ['debugArgs', '-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777']])



Put one array into itself

Put one array into itself

#!/usr/bin/perl -w

use strict;

my @array2;

@array2 = (3579);
@array2 = (1, @array2, 11);
print "@array2\n";

Array Assignmengt

Put one array into another array as an element :


#!/usr/bin/perl -w

use strict;

my @array1 = (123);
my @array2;
@array2 = (@array1, 456);
print "@array2\n";