npm install -g aws-azure-login --unsafe-perm
Technology Wavering
Saturday, March 28, 2020
Monday, August 24, 2015
Monday, February 24, 2014
SQL commands
Remove database single user mode
exec sp_dboption 'testdb01', 'single user', 'FALSE'
Set database to single user mode
ALTER DATABASE dbName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
Friday, December 28, 2012
Editing MQ qm.ini on iSeries
- Login to AS400 Session
- From the terminal, type command
edtf
- press f4
- Type \QMGR\UserData\mqm\qmgrs\QMGR.STG.BRMS-name\qm.ini and Enter
- Page down key to see the file contents
- Type I (character i) after which you want to insert a line
- Press f3 to save and exit
Thursday, August 2, 2012
Nexus password reset
Lost Nexus password?
1) SSH into Nexus server
2) Edit sonatype-work/nexus/conf/security.xml.
Change the password to
<password>f865b53623b121fd34ee5426c792e5c33af8c227</password>
Restart Nexus
The password will now be set to admin123
1) SSH into Nexus server
2) Edit sonatype-work/nexus/conf/security.xml.
Change the password to
<password>f865b53623b121fd34ee5426c792e5c33af8c227</password>
Restart Nexus
The password will now be set to admin123
Nexus LDAP Integration
LDAP integration (Active Directory)
1) Login into admin console -> Administration -> Server -> Security Settings
Security should be ON
Move all the Realms from Available Realms to Selected Realms and make sure OSS LDAP Authentication Realm is on the top of the list
Selected Realms
OSS LDAP Authentication Realm
Xml Authenticating Realm
Xml Authorizing Realm
Save the changes
2) Navigate to Security -> LDAP configuration
Protocol: ldap
Hostname: ldap server name or ip address
Port: 3268 or 389
Search Base: DC=mydomain,DC=com
Authentication Method: Simple Authentication
Username: Specify full DN of ldap bind ID
e.g. CN=myldapbindid,OU=My Service Accounts,OU=something,DC=mydomain,DC=com
Password: ldap-bind-id-password
Check Authentication to validate the connection
User Element Mapping.
Base DN: OU=something1, OU=something2
User Subtree: unchecked
Object Class: user
User ID Attribute: sAMAccountName
Real Name Attribute: displayname
E-Mail Attribute: mail
In my case, the users authenticating are under OU=something1, OU=something2,DC=mydomain,DC=com ldap group i.e., CN=ldapuser+Base DN+Search Base.
Group Element Mapping: Unchecked
Save the settings and check user mapping. If the values are correct, a subset of ldap records will be displayed at the bottom of the same screen.
3) Assigning Users
Navigate to Security -> Users -> Choose LDAP from dropdown -> Type ldapuserid in the search field.
The user should be successfully retrieved from your ldap.
Role management -> Add -> Nexus Administrator
Choose your desired role.
4) Login with your LDAP account and validate.
1) Login into admin console -> Administration -> Server -> Security Settings
Security should be ON
Move all the Realms from Available Realms to Selected Realms and make sure OSS LDAP Authentication Realm is on the top of the list
Selected Realms
OSS LDAP Authentication Realm
Xml Authenticating Realm
Xml Authorizing Realm
Save the changes
2) Navigate to Security -> LDAP configuration
Protocol: ldap
Hostname: ldap server name or ip address
Port: 3268 or 389
Search Base: DC=mydomain,DC=com
Authentication Method: Simple Authentication
Username: Specify full DN of ldap bind ID
e.g. CN=myldapbindid,OU=My Service Accounts,OU=something,DC=mydomain,DC=com
Password: ldap-bind-id-password
Check Authentication to validate the connection
User Element Mapping.
Base DN: OU=something1, OU=something2
User Subtree: unchecked
Object Class: user
User ID Attribute: sAMAccountName
Real Name Attribute: displayname
E-Mail Attribute: mail
In my case, the users authenticating are under OU=something1, OU=something2,DC=mydomain,DC=com ldap group i.e., CN=ldapuser+Base DN+Search Base.
Group Element Mapping: Unchecked
Save the settings and check user mapping. If the values are correct, a subset of ldap records will be displayed at the bottom of the same screen.
3) Assigning Users
Navigate to Security -> Users -> Choose LDAP from dropdown -> Type ldapuserid in the search field.
The user should be successfully retrieved from your ldap.
Role management -> Add -> Nexus Administrator
Choose your desired role.
4) Login with your LDAP account and validate.
Nexus Sonatype install
1) Install java-se-7
2) Download Nexus from http://www.sonatype.org/nexus/
3) Extract nexus-2.0.6-bundle.tar.gz to server location e.g. /opt
4) Start/Stop nexus commands
/apps/maven/nexus-2.0.6/bin/nexus start
/apps/maven/nexus-2.0.6/bin/nexus stop
5) Access nexus console
http://{ip_address}:8081/nexus
user: admin
password: admin123
2) Download Nexus from http://www.sonatype.org/nexus/
3) Extract nexus-2.0.6-bundle.tar.gz to server location e.g. /opt
4) Start/Stop nexus commands
/apps/maven/nexus-2.0.6/bin/nexus start
/apps/maven/nexus-2.0.6/bin/nexus stop
5) Access nexus console
http://{ip_address}:8081/nexus
user: admin
password: admin123
Tuesday, August 2, 2011
Wednesday, December 22, 2010
VMware Infrastructure client install
VMware infrastructure client install software can be downloaded from VM server URL
https://ip_addr_of_vm_server/client/VMware-viclient.exe
https://ip_addr_of_vm_server/client/VMware-viclient.exe
Tuesday, March 30, 2010
Joomla - Google Analytics Integration
Login to Joomla admin website
Ex: www.yourdomain.com/administrator
Navigate to Extensions -> Template Manager -> Select default template -> Edit -> Edit Template HTML
Locate </body> tag
Place Google Analytics tracking code before the </body> tag
Ex: www.yourdomain.com/administrator
Navigate to Extensions -> Template Manager -> Select default template -> Edit -> Edit Template HTML
Locate </body> tag
Place Google Analytics tracking code before the </body> tag
Thursday, March 18, 2010
Windows Admin Tool Pack to manage certs
1) Install Windows Server 2003 Service Pack 2 Administration Tools Pack for x86 editions (works for XP to)
http://www.microsoft.com/downloads/details.aspx?FamilyId=86B71A4F-4122-44AF-BE79-3F101E533D95&displaylang=en
2) Navigate to Programs -> Administrative tools -> Certification Authority
3) Right Click Certification Authority (Local) -> Retarget Certification Authority -> Another Computer -> Select desired Certificate Server -> Finish
4) Take required actions
Using Windows MMC to review certificates
Start -> Run -> mmc -> File -> Add/Remove Snap-in -> Standalone -> Snap-ins added to: Certificates -> Certificates -> Select the appropriate option (user, service or computer) -> Finish -> Close -> Ok
Expand the certificates section in Console Root -> Personal -> Look for certificates you are interested in.
If you want to look at the certificates imported into your browser, try selecting user in the above choices.
Friday, February 26, 2010
CISCO switch commands
show interfaces status
show running-config
show mac-address-table
show mac-address-table | include 588
Tuesday, February 23, 2010
WebSphere ADMR0104E Error
Problem:
WebSphere ADMR0104E: The system is unable to read document cells node-metadata.properties: java.io.IOException: Permission deniedSolution:
Change the ownership to right owner at the was install root or above and not just the cells directory. Restart the server.
Tuesday, January 12, 2010
WebSphere Portal Traces
Traces to troubleshoot URL mapping context after virtual portal creation:
com.ibm.wps.engine.Servlet=all:com.ibm.wps.services.vpmapping.*=all:
com.ibm.wps.command.vp.*=all:com.ibm.wps.portlets.managevirtualportals.*
=all
Traces to debug xmlaccess:
com.ibm.wps.command.xml.*=all
com.ibm.wps.engine.Servlet=all:com.ibm.wps.services.vpmapping.*=all:
com.ibm.wps.command.vp.*=all:com.ibm.wps.portlets.managevirtualportals.*
=all
Traces to debug xmlaccess:
com.ibm.wps.command.xml.*=all
Monday, January 11, 2010
Sybase EA Server 5.3 Provisioning / Hostname change
Following steps will help to save time from doing complete Sybase EA Server 5.3 installation from scratch if you already have a server configured. The steps will also help with hostname changes.
1. Copy the entire D:\Program Files\Sybase from existing server to new server.
2. Update the hostname in the following files
D:\Program Files\Sybase\EAServer\bin\setenv.bat
D:\Program Files\Sybase\EAServer\Repository\Server\Jaguar.props or your server props
D:\Program Files\Sybase\EAServer\SysMgmt\boot.xml
D:\Program Files\Sybase\EAServer\SysMgmt\eas.xml
3. Change com.sybase.jaguar.repository.id value to blank in D:\Program Files\Sybase\EAServer\Repository\Repository\id.props
com.sybase.jaguar.repository.id=
4. Reinstall the windows service.
1. Copy the entire D:\Program Files\Sybase from existing server to new server.
2. Update the hostname in the following files
D:\Program Files\Sybase\EAServer\bin\setenv.bat
D:\Program Files\Sybase\EAServer\Repository\Server\Jaguar.props or your server props
D:\Program Files\Sybase\EAServer\SysMgmt\boot.xml
D:\Program Files\Sybase\EAServer\SysMgmt\eas.xml
3. Change com.sybase.jaguar.repository.id value to blank in D:\Program Files\Sybase\EAServer\Repository\Repository\id.props
com.sybase.jaguar.repository.id=
4. Reinstall the windows service.
WebSphere Portal 6.1 Virtual Portal Creation
The below steps were validated in RHEL 5 64 bit environment
1. Export the configuration using xmlaccess from the existing virtual portal
./xmlaccess.sh -user wpsadmin -password {password} -url http://existingvp.test.com:10040/wps/config -in /opt/IBM/WebSphere/PortalServer/doc/xml-samples/Export.xml -out /home/wasadmin/newvp-export.xml
2. Create an empty virtual portal
Edit /opt/IBM/WebSphere/wp_profile/ConfigEngine/properties/wkplc.properties with the following values:
VirtualPortalTitle=Virtual Portal Cloning
VirtualPortalRealm=realm-vptest
VirtualPortalHostName=newvp.test.com
VirtualPortalContext={leave it empty}
VirtualPortalNlsFile={leave it empty}
VirtualPortalObjectId={leave it empty}
Run /opt/IBM/WebSphere/wp_profile/ConfigEngine/ConfigEngine.sh create-virtual-portal
3. Import the configuration using xmlaccess to new virtual portal
./xmlaccess.sh -user wpsadmin -password {password} -url http://newvp.test.com:10040/wps/config -in /home/wasadmin/newvp-export.xml -out /home/wasadmin/newvp-import-results.xml
Tips:
1) Manually edit the exported xml file for any changes.
2) If the update portlet fails for your custom portlets because of this message.
com.ibm.wps.command.xml.XmlCommandException: EJPXA0043E: An error occurred while creating or updating the resource. [url-mapping-context ....
com.ibm.wps.command.mappingurl.MappingURLCommandException: EJPEC0622E: A resource of a virtual portal can only be mapped to a context of the same virtual portal.
make the following change.
url-mapping-context action="update"
to
url-mapping-context action="locate"
3) Find and change existingvp.test.com to newvp.test.com in the exported xml file
1. Export the configuration using xmlaccess from the existing virtual portal
./xmlaccess.sh -user wpsadmin -password {password} -url http://existingvp.test.com:10040/wps/config -in /opt/IBM/WebSphere/PortalServer/doc/xml-samples/Export.xml -out /home/wasadmin/newvp-export.xml
2. Create an empty virtual portal
Edit /opt/IBM/WebSphere/wp_profile/ConfigEngine/properties/wkplc.properties with the following values:
VirtualPortalTitle=Virtual Portal Cloning
VirtualPortalRealm=realm-vptest
VirtualPortalHostName=newvp.test.com
VirtualPortalContext={leave it empty}
VirtualPortalNlsFile={leave it empty}
VirtualPortalObjectId={leave it empty}
Run /opt/IBM/WebSphere/wp_profile/ConfigEngine/ConfigEngine.sh create-virtual-portal
3. Import the configuration using xmlaccess to new virtual portal
./xmlaccess.sh -user wpsadmin -password {password} -url http://newvp.test.com:10040/wps/config -in /home/wasadmin/newvp-export.xml -out /home/wasadmin/newvp-import-results.xml
Tips:
1) Manually edit the exported xml file for any changes.
2) If the update portlet fails for your custom portlets because of this message.
make the following change.
url-mapping-context action="update"
to
url-mapping-context action="locate"
3) Find and change existingvp.test.com to newvp.test.com in the exported xml file
Tuesday, October 13, 2009
Changing admin password in WebSphere Portal and Quickr
Run the 'Changing password' task according to Info center instructions
Files to be checked (depending on WebSphere version)
security.xml
wkplc.properties
wpconfig.properties
wimconfig.xml
wmm.xml
wmmur.xml
wmmWasAdmin.xml
Please put appropriate LTPA password
User password encoder to generate correct encrypted strings.
Reset password in ldap
Files to be checked (depending on WebSphere version)
security.xml
wkplc.properties
wpconfig.properties
wimconfig.xml
wmm.xml
wmmur.xml
wmmWasAdmin.xml
Please put appropriate LTPA password
User password encoder to generate correct encrypted strings.
Reset password in ldap
Friday, October 9, 2009
Lotus Quickr DB2 start
To start db2 instance on Lotus Quickr, execute
/opt/IBM/Quickr/db2/instance/db2istrt
/opt/IBM/Quickr/db2/instance/db2istrt
Friday, August 14, 2009
Wednesday, July 29, 2009
WebSphere Portal Users and Groups listing
For WebSphere Portal 6.1 and above
Refer to wimconfig.xml for all settings
For WebSphere Portal below 6.1
Refer to wmm.xml
If you do not see any users under All authenticated portal users or groups, modify the search filter in the above corresponding file like searchFilter="" (empty without specifiying any values)
If your LDAP base has a lot of users, sometimes portal hangs. You can validate the users by searching using cn instead of viewing complete listing.
For clustered environments, refer to the above files both from Deployment Manager and Portal Server.
Refer to wimconfig.xml for all settings
For WebSphere Portal below 6.1
Refer to wmm.xml
If you do not see any users under All authenticated portal users or groups, modify the search filter in the above corresponding file like searchFilter="" (empty without specifiying any values)
If your LDAP base has a lot of users, sometimes portal hangs. You can validate the users by searching using cn instead of viewing complete listing.
For clustered environments, refer to the above files both from Deployment Manager and Portal Server.
Tuesday, June 30, 2009
Opening RDP session through HTML
a href="javascript:void(0)" language="VBS" onclick="LaunchRDP('your-server-name')
script language="VBScript"
Sub LaunchRDP(strServerName)
Set oShell = CreateObject("WScript.Shell")
oShell.run "mstsc /v:" & strServerName
Set oShell = Nothing
End Sub
script
script language="VBScript"
Sub LaunchRDP(strServerName)
Set oShell = CreateObject("WScript.Shell")
oShell.run "mstsc /v:" & strServerName
Set oShell = Nothing
End Sub
script
Datapower IP Change
xi50# configure terminal
Global configuration mode
xi50(config)# test hardware
[success] Backtrace file does not exist.
[success] MAC address of interface 'eth0' is 00:0a:4b:80:de:28.
[warning] Physical link on interface 'eth0' is down.
[success] Statistics for interface 'eth0' show no errors.
[success] MAC address of interface 'eth1' is 00:1b:21:0d:e3:ae.
[warning] Physical link on interface 'eth1' is down.
[success] Statistics for interface 'eth1' show no errors.
[success] MAC address of interface 'eth2' is 00:1b:21:0d:e3:af.
[warning] Physical link on interface 'eth2' is down.
[success] Statistics for interface 'eth2' show no errors.
[success] MAC address of interface 'mgt0' is 00:0a:4b:80:de:2c.
[success] Physical link on interface 'mgt0' is up.
[success] Statistics for interface 'mgt0' show no errors.
[success] Expected number of interfaces: 4 - Found: 4.
[success] The fan 'chassis-1' is ok.
[success] The fan 'chassis-2' is ok.
[success] The fan 'chassis-3' is ok.
[success] The fan 'chassis-4' is ok.
[success] The fan 'chassis-5' is ok.
[success] The fan 'chassis-6' is ok.
[success] The fan 'chassis-7' is ok.
[success] The fan 'chassis-8' is ok.
[success] Status of temperature reading 'Temperature CPU1' is ok.
[success] Status of temperature reading 'Temperature CPU2' is ok.
[success] Status of temperature reading 'Temperature System 1' is ok.
[success] Status of voltage reading 'Voltage +12' is ok.
[success] Status of voltage reading 'Voltage +3.3' is ok.
[success] Status of voltage reading 'Voltage +5' is ok.
[success] Battery status is OK.
[success] CPUs OK
[success] Status of crypto 'hardware2' is fully operational.
xi50(config)# int mgt0
Interface configuration mode (mgt0 )
xi50(config-if[eth4])# ip address your-ip-address/24
Operation succeeded
xi50(config-if[eth4])# ip default-gateway your-gateway-ip-address
Operation succeeded
xi50(config-if[eth4])# exit
xi50(config)# web-mgmt your-ip-address 9090
Web management: successfully started
xi50(config)# ssh your-ip-address
% Pending
SSH service listener enabled
xi50(config)# write memory
Overwrite previously saved configuration? [y/n]: y
Configuration saved successfully.
xi50(config)#
Global configuration mode
xi50(config)# test hardware
[success] Backtrace file does not exist.
[success] MAC address of interface 'eth0' is 00:0a:4b:80:de:28.
[warning] Physical link on interface 'eth0' is down.
[success] Statistics for interface 'eth0' show no errors.
[success] MAC address of interface 'eth1' is 00:1b:21:0d:e3:ae.
[warning] Physical link on interface 'eth1' is down.
[success] Statistics for interface 'eth1' show no errors.
[success] MAC address of interface 'eth2' is 00:1b:21:0d:e3:af.
[warning] Physical link on interface 'eth2' is down.
[success] Statistics for interface 'eth2' show no errors.
[success] MAC address of interface 'mgt0' is 00:0a:4b:80:de:2c.
[success] Physical link on interface 'mgt0' is up.
[success] Statistics for interface 'mgt0' show no errors.
[success] Expected number of interfaces: 4 - Found: 4.
[success] The fan 'chassis-1' is ok.
[success] The fan 'chassis-2' is ok.
[success] The fan 'chassis-3' is ok.
[success] The fan 'chassis-4' is ok.
[success] The fan 'chassis-5' is ok.
[success] The fan 'chassis-6' is ok.
[success] The fan 'chassis-7' is ok.
[success] The fan 'chassis-8' is ok.
[success] Status of temperature reading 'Temperature CPU1' is ok.
[success] Status of temperature reading 'Temperature CPU2' is ok.
[success] Status of temperature reading 'Temperature System 1' is ok.
[success] Status of voltage reading 'Voltage +12' is ok.
[success] Status of voltage reading 'Voltage +3.3' is ok.
[success] Status of voltage reading 'Voltage +5' is ok.
[success] Battery status is OK.
[success] CPUs OK
[success] Status of crypto 'hardware2' is fully operational.
xi50(config)# int mgt0
Interface configuration mode (mgt0 )
xi50(config-if[eth4])# ip address your-ip-address/24
Operation succeeded
xi50(config-if[eth4])# ip default-gateway your-gateway-ip-address
Operation succeeded
xi50(config-if[eth4])# exit
xi50(config)# web-mgmt your-ip-address 9090
Web management: successfully started
xi50(config)# ssh your-ip-address
% Pending
SSH service listener enabled
xi50(config)# write memory
Overwrite previously saved configuration? [y/n]: y
Configuration saved successfully.
xi50(config)#
Monday, June 29, 2009
Windows CPL commands
appwiz.cpl - Add or Remove programs
services.msc - Services Panel
compmgmt.msc - Computer Management
hdwwiz.cpl - Add Hardware Wizard
services.msc - Services Panel
compmgmt.msc - Computer Management
hdwwiz.cpl - Add Hardware Wizard
sysdm.cpl - System
Monday, June 22, 2009
SSL URL Validation through Java
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.net.URLConnection;
public class SSLConnection {
public void runTest( String url )
{
java.net.URL endpoint;
try
{
endpoint = new java.net.URL(url);
URLConnection connection = endpoint.openConnection();
InputStream in = new BufferedInputStream( connection.getInputStream() );
byte[] bytes = new byte[500];
int n = in.read(bytes, 0, 500 );
for ( int i = 0; i <>
System.out.print( new Character( (char) bytes[i] ) );
}
in.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}
public static void main( String[] args )
{
SSLConnection test = new SSLConnection();
System.out.println("Connect without proxy - Non secure" );
test.runTest("http://your_url_goes_here");
System.out.println("Connect without proxy - Secure" );
test.runTest("https://your_url_goes_here");
System.setProperty("http.proxyHost", "your_proxy_name");
System.setProperty("http.proxyPort", "your_proxy_port");
System.out.println("Connect with proxy - Non secure" );
test.runTest("http://your_url_goes_here");
System.out.println("Connect with proxy - Secure" );
test.runTest("https://your_url_goes_here");
}
}
Friday, June 19, 2009
Thursday, June 4, 2009
WebSphere 6.1 - JMX SOAP Connection Example
import java.util.Properties;
import com.ibm.websphere.management.AdminClient;
import com.ibm.websphere.management.AdminClientFactory;
public class JMXTest {
public static void main(String[] args) {
JMXTest jmxtest = new JMXTest();
jmxtest.execute();
}
public void execute() {
try {
Properties connectProps = new Properties();
connectProps.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);
connectProps.setProperty(AdminClient.CONNECTOR_HOST, "{hostname}");
connectProps.setProperty(AdminClient.CONNECTOR_PORT, "{8879 or your-soap-port");
connectProps.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
connectProps.setProperty(AdminClient.USERNAME, "{username}");
connectProps.setProperty(AdminClient.PASSWORD, "{password}");
connectProps.setProperty("javax.net.ssl.trustStore", "/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/etc/DummyClientTrustFile.jks");
connectProps.setProperty("javax.net.ssl.keyStore", "/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/etc/DummyClientKeyFile.jks");
AdminClient adminClient = null;
try
{
adminClient = AdminClientFactory.createAdminClient(connectProps);
System.out.println("Connected Successfully");
}
catch (Exception e)
{
System.out.println("Exception creating admin client: " + e);
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
}
Labels:
adminclient,
adminclientfactory,
jmx,
soap,
ssl,
websphere
Tuesday, May 26, 2009
DataPower XI150 Firmware upgrade steps
Login into data power
1) Administration -> File Management -> image: Actions -> Upload Firmware image
2) Administration -> System Control -> Shudown -> Select Reload Firmware -> Perform Shutdown
3) Administration -> System Control -> Boot Image -> Select Firmware image -> Perform Boot
Datapower will restart as part of steps 2 and 3 and you will have to relogin.
You can also perform continuous ping on data power IP to monitor its state (e.g. ping -t datapowerip) while performing steps 1 - 3.
Wednesday, May 20, 2009
WebSphere host lookup error
Problem:
ADMU0027E: An error occurred during federation
ADMU0036E: The Deployment Manager cannot lookup by name host {hostname} at address 127.0.0.1; rolling back to original configuration.
Solution:
Check the /etc/hosts file. Remove loop back address and add hostname with relevant server IP.
WebSphere SOAP Connection Errors
Problem:
WASX7023E: Error creating "SOAP" connection to host "{hostname}"; exception information: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted]
Solution:
Attempt to recreate the problem using wsadmin
./wsadmin.sh -conntype SOAP -host {hostname} -port {8879 or relevant port} -user {username} -password {password}
Copy the deployment manager Dummy*.jks files from /etc location to app server /etc location.
Try running the above wsadmin command
Tuesday, May 12, 2009
PCI Compliance
To satisfy PCI compliance requirements with IBM HTTP Server 6.1 / Apache 2.0.47, you will have to update httpd.conf with the following information.
If you are hosting SSL in F5 BigIP LTM, in the corresponding clientssl profile, add the following in CIPHER textbox which has the value DEFAULT.
ALL:!ADH:!LOW:!EXP:!SSLv2:!NULL:HIGH:MEDIUM:RSA:RC4:
TraceEnable off
FileETag MTime Size
UserDir disabled
Disable Mod status. Comment or remove the following line
-----------------------------------------------------------
#LoadModule status_module modules/mod_status.so
Disable SSLV2
---------------
SSLProtocolDisable SSLv2
Include the above line inside virtual host 443 section of each domain.
If you are hosting SSL in F5 BigIP LTM, in the corresponding clientssl profile, add the following in CIPHER textbox which has the value DEFAULT.
ALL:!ADH:!LOW:!EXP:!SSLv2:!NULL:HIGH:MEDIUM:RSA:RC4:
Friday, April 24, 2009
WebSphere 6.1 - JMX MBeans Query Example
Server side configuration
-------------------------
Set these parameters in Generic JVM arguments.
-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote
Specify these JVM custom properties
com.sun.management.jmxremote.authenticate false
com.sun.management.jmxremote.port 9004
com.sun.management.jmxremote.ssl false
Restart the server for the changes to take effect.
Java client program
-------------------
import java.util.Set;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
public class JMXTest {
public static void main(String[] args) {
JMXTest jmxtest = new JMXTest();
jmxtest.execute();
}
public void execute() {
MBeanServerConnection mbeanServerConnection = null;
JMXServiceURL serviceURL;
try {
serviceURL = new JMXServiceURL(
"service:jmx:rmi://{your_host_name}:2809/jndi/JMXConnector");
JMXConnector jmxConnector = JMXConnectorFactory.connect(serviceURL);
mbeanServerConnection = jmxConnector.getMBeanServerConnection();
System.out.println("Successfully Connected!");
String query = "WebSphere:type=IlrBresModel,*";
ObjectName queryName = new ObjectName(query);
Set s = mbeanServerConnection.queryNames(queryName, null);
if (!s.isEmpty())
System.out.println(s.iterator().next());
else
System.out.println("MBean was not found");
} catch (Exception e) {
e.printStackTrace();
}
}
}
You should also have these two jars in the class path for the Java program to run.
com.ibm.ws.runtime_6.1.0.jar
ws_runtime.jar
Otherwise, runtime exceptions will be thrown.
-------------------------
Set these parameters in Generic JVM arguments.
-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote
Specify these JVM custom properties
com.sun.management.jmxremote.authenticate false
com.sun.management.jmxremote.port 9004
com.sun.management.jmxremote.ssl false
Restart the server for the changes to take effect.
Java client program
-------------------
import java.util.Set;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
public class JMXTest {
public static void main(String[] args) {
JMXTest jmxtest = new JMXTest();
jmxtest.execute();
}
public void execute() {
MBeanServerConnection mbeanServerConnection = null;
JMXServiceURL serviceURL;
try {
serviceURL = new JMXServiceURL(
"service:jmx:rmi://{your_host_name}:2809/jndi/JMXConnector");
JMXConnector jmxConnector = JMXConnectorFactory.connect(serviceURL);
mbeanServerConnection = jmxConnector.getMBeanServerConnection();
System.out.println("Successfully Connected!");
String query = "WebSphere:type=IlrBresModel,*";
ObjectName queryName = new ObjectName(query);
Set s = mbeanServerConnection.queryNames(queryName, null);
if (!s.isEmpty())
System.out.println(s.iterator().next());
else
System.out.println("MBean was not found");
} catch (Exception e) {
e.printStackTrace();
}
}
}
You should also have these two jars in the class path for the Java program to run.
com.ibm.ws.runtime_6.1.0.jar
ws_runtime.jar
Otherwise, runtime exceptions will be thrown.
Friday, April 10, 2009
WebSphere 6.1 - Remove uninstallable enterprise apps
Problem:
WebSphere enterprise apps remain uninstalled after remove node.
Solution:
cd profile/config/cells/{cellname}/applications
Manually delete the ear directories.
Restart dmgr if necessary.
WebSphere enterprise apps remain uninstalled after remove node.
Solution:
cd profile/config/cells/{cellname}/applications
Manually delete the ear directories.
Restart dmgr if necessary.
Thursday, April 9, 2009
Microsoft Word Mathematical Equations
Tools -> Customize -> Commands -> Insert -> Equation Editor
Click on Equation Editor, drag and drop on the tool bar
Click on Equation Editor, drag and drop on the tool bar
Tuesday, April 7, 2009
WebSphere Portal Server 6.1.0.1 database transfer
Problem:
WebSphere Portal Server 6.1.0.1 database transfer fails with message: ORA-02158: invalid CREATE INDEX option
Solution:
Update {dbdomain}.space_mapping.properties files table spaces without the quotes
dbdomian.AI_APP.tablespace=TABLESPACE TBLSNAME
instead of
dbdomian.AI_APP.tablespace="TABLESPACE TBLSNAME"
WebSphere Portal Server 6.1.0.1 database transfer fails with message: ORA-02158: invalid CREATE INDEX option
Solution:
Update {dbdomain}.space_mapping.properties files table spaces without the quotes
dbdomian.AI_APP.tablespace=TABLESPACE TBLSNAME
instead of
dbdomian.AI_APP.tablespace="TABLESPACE TBLSNAME"
Thursday, April 2, 2009
Oracle list Indexes
select index_name, column_name, column_position from user_ind_columns where table_name='MYTABLENAME' order by index_name, column_position
Just replace the tablename
Just replace the tablename
Tuesday, December 16, 2008
BigIP LTM and Apache - Capturing Client IP in access log
Tracking end client IP in web server logs
-----------------------------------------
1) In BigIP, navigate to Local Traffic >> HTTP Profiles >> http
Enable "Insert XForwarded For" option
Update to save the configuration.
http profile is just an example. You should set this option for whatever profile the pool is using.
2) In Apache (or IBM HTTP Server) httpd.conf
LogFormat "\"%{X-Forwarded-For}i\" %h %v %l %u %t \"%r\" %>s %b" mycustom
CustomLog "/opt/IBM/HTTPServer/bin/rotatelogs /var/logs/test-443-access.log.%Y-%m-%d 86400"mycustom
The output access logfile should contain client IP
Decode BigIP cookie to identify pool member
How to decode BigIP LTM cookie to identify which pool member (web server IP) the request is routed to?
---------------------------------------------------------------------
HTTP headers in a transaction will have the BIGIP cookie information as below.
Cookie: BIGipServer{pool-name}-80=404007104.20480.0000
404007104 is the encoded IP address of a pool member
20480 is the encoded port number
IP address encoding
------------------
If the IP address is of format a.b.c.d, it is encoded as
d*256^3 + c*256^2 + b*256 +a
For example, IP address 192.168.20.24 is encoded as
24*256^3+20*256^2+168*256+192 = 404007104
Port encoding
---------------------------------------------------------------------
HTTP headers in a transaction will have the BIGIP cookie information as below.
Cookie: BIGipServer{pool-name}-80=404007104.20480.0000
404007104 is the encoded IP address of a pool member
20480 is the encoded port number
IP address encoding
------------------
If the IP address is of format a.b.c.d, it is encoded as
d*256^3 + c*256^2 + b*256 +a
For example, IP address 192.168.20.24 is encoded as
24*256^3+20*256^2+168*256+192 = 404007104
Port encoding
----------
The port is encoded by taking the two bytes that store the port and reversing them
Port 80 is encoded as 80 * 256 + 0 = 20480
Port 443 is encoded as 443 * 256 + 0 = 113408
The port is encoded by taking the two bytes that store the port and reversing them
Port 80 is encoded as 80 * 256 + 0 = 20480
Port 443 is encoded as 443 * 256 + 0 = 113408
Saturday, December 13, 2008
Thursday, December 11, 2008
Rotate IBM HTTP Server / Plugin logs
The script has been tested on Solaris environment
rotate_http_logs.sh
-----------------------------
#!/usr/bin/bash -x
# Define variables. These variables can also be defined in .profile and the profile can be sourced
HOST=servernamegoeshere
IHS_ROOT=/opt/IBM/HTTPServer
IHS_BIN=$IHS_ROOT/bin
IHS_CONF=$IHS_ROOT/conf
IHS_LOGS=$IHS_ROOT/logs
PLUGIN_ROOT=$IHS_ROOT/Plugins
PLUGIN_CONF=$PLUGIN_ROOT/config
PLUGIN_LOGS=$PLUGIN_ROOT/logs
# Rotate IBM HTTP Plugin Log
cd $PLUGIN_LOGS/$HOST
SOURCE_FILE=http_plugin.log
TARGET_FILE=http_plugin.log.`date +%Y-%m-%d`
cp $SOURCE_FILE $TARGET_FILE
touch $SOURCE_FILE
# Rotate IBM HTTP Access Log
cd $IHS_LOGS
SOURCE_FILE=error_log
TARGET_FILE=error_log.`date +%Y-%m-%d`
sudo touch $SOURCE_FILE
# Rotate IBM HTTP Error Log
SOURCE_FILE=access_log
TARGET_FILE=access_log.`date +%Y-%m-%d`
sudo touch $SOURCE_FILE
#sudo is used for web servers if the service is run as non root
Create a cron job
-------------------------
0 23 * * * /var/adm/scripts/rotate_http_logs.sh
rotate_http_logs.sh
-----------------------------
#!/usr/bin/bash -x
# Define variables. These variables can also be defined in .profile and the profile can be sourced
HOST=servernamegoeshere
IHS_ROOT=/opt/IBM/HTTPServer
IHS_BIN=$IHS_ROOT/bin
IHS_CONF=$IHS_ROOT/conf
IHS_LOGS=$IHS_ROOT/logs
PLUGIN_ROOT=$IHS_ROOT/Plugins
PLUGIN_CONF=$PLUGIN_ROOT/config
PLUGIN_LOGS=$PLUGIN_ROOT/logs
# Rotate IBM HTTP Plugin Log
cd $PLUGIN_LOGS/$HOST
SOURCE_FILE=http_plugin.log
TARGET_FILE=http_plugin.log.`date +%Y-%m-%d`
cp $SOURCE_FILE $TARGET_FILE
touch $SOURCE_FILE
# Rotate IBM HTTP Access Log
cd $IHS_LOGS
SOURCE_FILE=error_log
TARGET_FILE=error_log.`date +%Y-%m-%d`
sudo touch $SOURCE_FILE
# Rotate IBM HTTP Error Log
SOURCE_FILE=access_log
TARGET_FILE=access_log.`date +%Y-%m-%d`
sudo touch $SOURCE_FILE
#sudo is used for web servers if the service is run as non root
Create a cron job
-------------------------
0 23 * * * /var/adm/scripts/rotate_http_logs.sh
Monday, December 8, 2008
Setup Apache Name based hosting
NameVirtualHost *
<VirtualHost *>
DocumentRoot /opt/content/domain1/
ServerName http://www.domain1.com/
ErrorLog logs/domain1-error-log
CustomLog logs/domain1-access-log common
</VirtualHost >
<VirtualHost *>
DocumentRoot /opt/content/domain2/
ServerName http://www.domain2.com/
ErrorLog logs/domain2-error-log
CustomLog logs/domain2-access-log common
</VirtualHost >
<VirtualHost *>
DocumentRoot /opt/content/domain1/
ServerName http://www.domain1.com/
ErrorLog logs/domain1-error-log
CustomLog logs/domain1-access-log common
</VirtualHost >
<VirtualHost *>
DocumentRoot /opt/content/domain2/
ServerName http://www.domain2.com/
ErrorLog logs/domain2-error-log
CustomLog logs/domain2-access-log common
</VirtualHost >
Tuesday, November 18, 2008
Apache version of IBM HTTP server
To find the apache version of IBM HTTP Server,
/opt/IBM/HTTPServer/bin/apachectl -v
/opt/IBM/HTTPServer/bin/apachectl -v
Friday, October 17, 2008
WebSphere and Oracle 10g Data Source
Problem:
WebSphere 6.1 - Solaris 9 - java.sql.SQLException: java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
Solution:
It appears that there might be ojdbc jars from Oracle 9i reference somewhere inside the WebSphere classloader path. Update the jar references to Oracle 10g jdbc lib JARs.
Problem:
WebSphere 6.1 - Solaris 9 - java.sql.SQLException: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
Solution:
Update .profile for the account that runs WebSphere with the following.
LD_LIBRARY_PATH=$ORACLE_HOME/lib32
export $LD_LIBRARY_PATH
Exit the SSH session, relogin to Unix system and restart the WebSphere process
For 64 bit systems, LD_LIBRARY_PATH=$ORACLE_HOME/lib instead of lib32.
WebSphere 6.1 - Solaris 9 - java.sql.SQLException: java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
Solution:
It appears that there might be ojdbc jars from Oracle 9i reference somewhere inside the WebSphere classloader path. Update the jar references to Oracle 10g jdbc lib JARs.
Problem:
WebSphere 6.1 - Solaris 9 - java.sql.SQLException: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
Solution:
Update .profile for the account that runs WebSphere with the following.
LD_LIBRARY_PATH=$ORACLE_HOME/lib32
export $LD_LIBRARY_PATH
Exit the SSH session, relogin to Unix system and restart the WebSphere process
For 64 bit systems, LD_LIBRARY_PATH=$ORACLE_HOME/lib instead of lib32.
Friday, September 26, 2008
Welcome
Welcome to Technology Wavering!
Labels:
ajax,
jayanthi,
krishnamurthy,
technology,
technology wavering,
welcome
Subscribe to:
Posts (Atom)