October 2025
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

October 2025
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

JAVA using More CPU

In a production environment profiling is not an option, we have seen several times that our CPU has reached almost 100%, we are running tomcat on Linux, so what is happening?

Fortunately, java comes with some great debugging tools, cooperating those tools with Linux built-in tools will let you know what is happening.

Here is what i am going to explain:

  • An introduction about java threads and its relation to what-so-called Linux LWP
  • A step-by-step
1- An introduction
as you may know, any java program starts when the JVM calls the main method, this creates a thread called the main thread and any thread you create using java code will be derived from the main thread (out-of-focus: it is always a good practice to give your threads a name, it is very useful in debugging, however, it is not required here) the same exact behavior occurs on the Linux level, the main thread for java means a process for the OS, and every thread you create using java the OS will create a Light-weight-process or LWP.
to cut it short, Java main thread = Linux process and Java thread = Linux LWP.
the idea here:
  • Ask Linux which LWP is eating the CPU.
  • Ask Java for a Thread Dump.
  • Map this LWP to a Java thread.
  • Get the part of code causing the issue.
2- A Step-By-Step:
  • Get the PID: the very first step is to know what is the Java process ID, we will use Linux tools ps and grep
    ps -A|grep java
    if you are running multiple java processes we can execute
    ps -ef|grep java
  • the next step is to get CPU usage per each LWP related to the main process, again we will use  ps  and  grep
    ps -eLo pid,lwp,nlwp,ruser,pcpu,stime,etime,args|grep {pid} > lwpthread.txt
    the file lwpthread.txt will contain some thing similar:

    PID NLWP SZ RUSER %CPU STIME ELAPSED COMMAND
    8234 8234 1110 admin 0.3 08:11 30:15 /usr/java/jdk1.6.0_24/bin/java
    8234 8245 1110 admin 99.0 08:45 10:15 /usr/java/jdk1.6.0_24/bin/java

    as you can see, we have an LWP(mapped to a java thread) eating the CPU, get the NLWP, that will be our lead in the next step.

  • the next step is to generate a java thread dump, there are two main ways to create a thread dump, the first one is to use the JDK tool jstack and pass the PID to it, the second way is to send a kill signal to the JVM, however in the first way you will have control over where you want to save the thread dump, while on the second way you will have the thread dump written on the java process standard output stream.
    as said, we are using tomcat, so the thread dump will be in catalina.out
    kill -3 {pid}
    the thread dump will be printed to the file with full stack trace. the file will contain the thread you are after, but first convert your LWP id from DEC to HEX so 8245 would be 2035, now open the thread dump with text editor and search for 2035, you will find something similar:
    "TP-Processor234786" daemon prio=10 tid=0x00002aaad8024800 nid=0x2035 runnable [0x00002aaadef29000]
    java.lang.Thread.State: RUNNABLE
    at java.util.HashMap.get(HashMap.java:303)
    at ......

and you are done!

Tomcat 8 clustering and Load Balancing Redhat Fedora and Centos

Drawing1
Let us build 3 node Tomcat 8 cluster  with Apache

web Server  – > 192.168.2.40

cluster2 -> 192.168.1.41
cluster3 -> 192.168.1.42

Web server is  CLUSTER1

The characteristics of this cluster are:

Session affinity: sessions are associated with single servers.
Failover: if a server dies, a connection will be directed to the nearest available server. (NOTE: sessions are not replicated)
Failback: when a server comes back online, it will rejoin the cluster.
Weighted load balancing: the load balancing can be controlled to take into account machine differences

rpm -ivh jdk-7u51-linux-i586.rpm

alternatives –install /usr/bin/java java /usr/java/jdk1.7.0_51/bin/java 2

alternatives –config java

java -version

mkdir /usr/tomcat

wget  http://mirror.nus.edu.sg/apache/tomcat/tomcat-8/v8.0.5/bin/apache-tomcat-8.0.5.tar.gz

[root@cluster1 tomcat]# ls
apache-tomcat-8.0.5
[root@cluster1 tomcat]# cd apache-tomcat-8.0.5/
[root@cluster1 apache-tomcat-8.0.5]# ls
bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp  webapps  work
[root@cluster1 apache-tomcat-8.0.5]# cd bin/
[root@cluster1 bin]# ls
bootstrap.jar       commons-daemon.jar            daemon.sh         setclasspath.sh  startup.sh            tool-wrapper.sh
catalina.bat        commons-daemon-native.tar.gz  digest.bat        shutdown.bat     tomcat-juli.jar       version.bat
catalina.sh         configtest.bat                digest.sh         shutdown.sh      tomcat-native.tar.gz  version.sh
catalina-tasks.xml  configtest.sh                 setclasspath.bat  startup.bat      tool-wrapper.bat
[root@cluster1 bin]# ./startup.sh
Using CATALINA_BASE:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_HOME:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_TMPDIR: /usr/tomcat/apache-tomcat-8.0.5/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/tomcat/apache-tomcat-8.0.5/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-8.0.5/bin/tomcat-juli.jar
Tomcat started.
[root@cluster1 bin]# ps -ef | grep java
root      1437     1 18 04:58 pts/2    00:00:01 /usr/bin/java -Djava.util.logging.config.file=/usr/tomcat/apache-tomcat-8.0.5/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/tomcat/apache-tomcat-8.0.5/endorsed -classpath /usr/tomcat/apache-tomcat-8.0.5/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-8.0.5/bin/tomcat-juli.jar -Dcatalina.base=/usr/tomcat/apache-tomcat-8.0.5 -Dcatalina.home=/usr/tomcat/apache-tomcat-8.0.5 -Djava.io.tmpdir=/usr/tomcat/apache-tomcat-8.0.5/temp org.apache.catalina.startup.Bootstrap start
root      1459  1319  0 04:58 pts/2    00:00:00 grep java
[root@cluster1 bin]#

[root@cluster2 software]# mv apache-tomcat-8.0.5 /usr/tomcat/
[root@cluster2 software]# ls
apache-tomcat-8.0.5-src.tar.gz  apache-tomcat-8.0.5.tar.gz  jdk-7u51-linux-i586.rpm
[root@cluster2 software]# cd /usr/tomcat/
[root@cluster2 tomcat]# ls
apache-tomcat-8.0.5
[root@cluster2 tomcat]# cd apache-tomcat-8.0.5/
[root@cluster2 apache-tomcat-8.0.5]# ls
bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp  webapps  work
[root@cluster2 apache-tomcat-8.0.5]# cd bin/
[root@cluster2 bin]# ls
bootstrap.jar       commons-daemon.jar            daemon.sh         setclasspath.sh  startup.sh            tool-wrapper.sh
catalina.bat        commons-daemon-native.tar.gz  digest.bat        shutdown.bat     tomcat-juli.jar       version.bat
catalina.sh         configtest.bat                digest.sh         shutdown.sh      tomcat-native.tar.gz  version.sh
catalina-tasks.xml  configtest.sh                 setclasspath.bat  startup.bat      tool-wrapper.bat
[root@cluster2 bin]# ./startup.sh
Using CATALINA_BASE:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_HOME:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_TMPDIR: /usr/tomcat/apache-tomcat-8.0.5/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/tomcat/apache-tomcat-8.0.5/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-8.0.5/bin/tomcat-juli.jar
Tomcat started.

[root@cluster2 bin]# ls
bootstrap.jar       commons-daemon.jar            daemon.sh         setclasspath.sh  startup.sh            tool-wrapper.sh
catalina.bat        commons-daemon-native.tar.gz  digest.bat        shutdown.bat     tomcat-juli.jar       version.bat
catalina.sh         configtest.bat                digest.sh         shutdown.sh      tomcat-native.tar.gz  version.sh
catalina-tasks.xml  configtest.sh                 setclasspath.bat  startup.bat      tool-wrapper.bat

[root@cluster2 bin]# ./version.sh
Using CATALINA_BASE:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_HOME:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_TMPDIR: /usr/tomcat/apache-tomcat-8.0.5/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/tomcat/apache-tomcat-8.0.5/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-8.0.5/bin/tomcat-juli.jar
Server version: Apache Tomcat/8.0.5
Server built:   Mar 24 2014 05:29:50
Server number:  8.0.5.0
OS Name:        Linux
OS Version:     2.6.32-431.5.1.el6.i686
Architecture:   i386
JVM Version:    1.7.0_51-b13
JVM Vendor:     Oracle Corporation
[root@cluster2 bin]# ps -ef |  grep java
root      1740     1  7 21:22 pts/0    00:00:01 /usr/bin/java -Djava.util.logging.config.file=/usr/tomcat/apache-tomcat-8.0.5/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/tomcat/apache-tomcat-8.0.5/endorsed -classpath /usr/tomcat/apache-tomcat-8.0.5/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-8.0.5/bin/tomcat-juli.jar -Dcatalina.base=/usr/tomcat/apache-tomcat-8.0.5 -Dcatalina.home=/usr/tomcat/apache-tomcat-8.0.5 -Djava.io.tmpdir=/usr/tomcat/apache-tomcat-8.0.5/temp org.apache.catalina.startup.Bootstrap start
root      1786  1315  0 21:23 pts/0    00:00:00 grep java

[root@cluster2 bin]#
tmp/    tomcat/
[root@cluster3 software]# mv apache-tomcat-8.0.5 /usr/tomcat/
[root@cluster3 software]# cd /usr/tomcat/
[root@cluster3 tomcat]# ls
apache-tomcat-8.0.5
[root@cluster3 tomcat]# cd apache-tomcat-8.0.5/
[root@cluster3 apache-tomcat-8.0.5]# ls
bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp  webapps  work
[root@cluster3 apache-tomcat-8.0.5]# cd bin/
[root@cluster3 bin]# ls
bootstrap.jar       commons-daemon.jar            daemon.sh         setclasspath.sh  startup.sh            tool-wrapper.sh
catalina.bat        commons-daemon-native.tar.gz  digest.bat        shutdown.bat     tomcat-juli.jar       version.bat
catalina.sh         configtest.bat                digest.sh         shutdown.sh      tomcat-native.tar.gz  version.sh
catalina-tasks.xml  configtest.sh                 setclasspath.bat  startup.bat      tool-wrapper.bat
[root@cluster3 bin]# ./startup.sh
Using CATALINA_BASE:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_HOME:   /usr/tomcat/apache-tomcat-8.0.5
Using CATALINA_TMPDIR: /usr/tomcat/apache-tomcat-8.0.5/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/tomcat/apache-tomcat-8.0.5/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-8.0.5/bin/tomcat-juli.jar
Tomcat started.

[root@cluster2 conf]# cp server.xml server.xml.org
[root@cluster2 conf]# pwd
/usr/tomcat/apache-tomcat-8.0.5/conf
[root@cluster2 conf]#

Web Server install on the server

[root@cluster1 ~]# yum install httpd*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.secureax.com
* epel: ftp.jaist.ac.jp
* extras: kartolo.sby.datautama.net.id
* updates: mirror.smartmedia.net.id
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package httpd.i686 0:2.2.15-29.el6.centos will be updated
—> Package httpd.i686 0:2.2.15-30.el6.centos will be an update
—> Package httpd-devel.i686 0:2.2.15-30.el6.centos will be installed
–> Processing Dependency: apr-util-devel for package: httpd-devel-2.2.15-30.el6.centos.i686
–> Processing Dependency: apr-devel for package: httpd-devel-2.2.15-30.el6.centos.i686
—> Package httpd-itk.i686 0:2.2.22-6.el6 will be installed
—> Package httpd-manual.noarch 0:2.2.15-30.el6.centos will be installed
—> Package httpd-tools.i686 0:2.2.15-29.el6.centos will be updated
—> Package httpd-tools.i686 0:2.2.15-30.el6.centos will be an update
–> Running transaction check
—> Package apr-devel.i686 0:1.3.9-5.el6_2 will be installed
—> Package apr-util-devel.i686 0:1.3.9-3.el6_0.1 will be installed
–> Processing Dependency: openldap-devel for package: apr-util-devel-1.3.9-3.el6_0.1.i686
–> Processing Dependency: expat-devel for package: apr-util-devel-1.3.9-3.el6_0.1.i686
–> Processing Dependency: db4-devel for package: apr-util-devel-1.3.9-3.el6_0.1.i686
–> Running transaction check
—> Package db4-devel.i686 0:4.7.25-18.el6_4 will be installed
–> Processing Dependency: db4-cxx = 4.7.25-18.el6_4 for package: db4-devel-4.7.25-18.el6_4.i686
–> Processing Dependency: libdb_cxx-4.7.so for package: db4-devel-4.7.25-18.el6_4.i686
—> Package expat-devel.i686 0:2.0.1-11.el6_2 will be installed
—> Package openldap-devel.i686 0:2.4.23-34.el6_5.1 will be installed
–> Processing Dependency: cyrus-sasl-devel >= 2.1 for package: openldap-devel-2.4.23-34.el6_5.1.i686
–> Running transaction check
—> Package cyrus-sasl-devel.i686 0:2.1.23-13.el6_3.1 will be installed
—> Package db4-cxx.i686 0:4.7.25-18.el6_4 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
Package                             Arch                      Version                                  Repository                  Size
=========================================================================================================================================
Installing:
httpd-devel                         i686                      2.2.15-30.el6.centos                     updates                    150 k
httpd-itk                           i686                      2.2.22-6.el6                             epel                       140 k
httpd-manual                        noarch                    2.2.15-30.el6.centos                     updates                    784 k
Updating:
httpd                               i686                      2.2.15-30.el6.centos                     updates                    828 k
httpd-tools                         i686                      2.2.15-30.el6.centos                     updates                     74 k
Installing for dependencies:
apr-devel                           i686                      1.3.9-5.el6_2                            base                       176 k
apr-util-devel                      i686                      1.3.9-3.el6_0.1                          base                        69 k
cyrus-sasl-devel                    i686                      2.1.23-13.el6_3.1                        base                       303 k
db4-cxx                             i686                      4.7.25-18.el6_4                          base                       605 k
db4-devel                           i686                      4.7.25-18.el6_4                          base                       6.6 M
expat-devel                         i686                      2.0.1-11.el6_2                           base                       121 k
openldap-devel                      i686                      2.4.23-34.el6_5.1                        updates                    1.1 M

Transaction Summary
=========================================================================================================================================
Install      10 Package(s)
Upgrade       2 Package(s)

Total download size: 11 M
Is this ok [y/N]:
Downloading Packages:
(1/12): apr-devel-1.3.9-5.el6_2.i686.rpm                                                                          | 176 kB     00:00
(2/12): apr-util-devel-1.3.9-3.el6_0.1.i686.rpm                                                                   |  69 kB     00:00
(3/12): cyrus-sasl-devel-2.1.23-13.el6_3.1.i686.rpm                                                               | 303 kB     00:00
(4/12): db4-cxx-4.7.25-18.el6_4.i686.rpm                                                                          | 605 kB     00:00
(5/12): db4-devel-4.7.25-18.el6_4.i686.rpm                                                                        | 6.6 MB     00:12
(6/12): expat-devel-2.0.1-11.el6_2.i686.rpm                                                                       | 121 kB     00:00
(7/12): httpd-2.2.15-30.el6.centos.i686.rpm                                                                       | 828 kB     00:06
(8/12): httpd-devel-2.2.15-30.el6.centos.i686.rpm                                                                 | 150 kB     00:00
(9/12): httpd-itk-2.2.22-6.el6.i686.rpm                                                                           | 140 kB     00:00
(10/12): httpd-manual-2.2.15-30.el6.centos.noarch.rpm                                                             | 784 kB     00:03
(11/12): httpd-tools-2.2.15-30.el6.centos.i686.rpm                                                                |  74 kB     00:00
(12/12): openldap-devel-2.4.23-34.el6_5.1.i686.rpm                                                                | 1.1 MB     00:05
—————————————————————————————————————————————–
Total                                                                                                    331 kB/s |  11 MB     00:33
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : apr-devel-1.3.9-5.el6_2.i686                                                                                         1/14
Installing : expat-devel-2.0.1-11.el6_2.i686                                                                                      2/14
Installing : cyrus-sasl-devel-2.1.23-13.el6_3.1.i686                                                                              3/14
Installing : openldap-devel-2.4.23-34.el6_5.1.i686                                                                                4/14
Installing : db4-cxx-4.7.25-18.el6_4.i686                                                                                         5/14
Installing : db4-devel-4.7.25-18.el6_4.i686                                                                                       6/14
Installing : apr-util-devel-1.3.9-3.el6_0.1.i686                                                                                  7/14
Updating   : httpd-tools-2.2.15-30.el6.centos.i686                                                                                8/14
Updating   : httpd-2.2.15-30.el6.centos.i686                                                                                      9/14
Installing : httpd-devel-2.2.15-30.el6.centos.i686                                                                               10/14
Installing : httpd-manual-2.2.15-30.el6.centos.noarch                                                                            11/14
Installing : httpd-itk-2.2.22-6.el6.i686                                                                                         12/14
Cleanup    : httpd-2.2.15-29.el6.centos.i686                                                                                     13/14
Cleanup    : httpd-tools-2.2.15-29.el6.centos.i686                                                                               14/14
Verifying  : apr-util-devel-1.3.9-3.el6_0.1.i686                                                                                  1/14
Verifying  : openldap-devel-2.4.23-34.el6_5.1.i686                                                                                2/14
Verifying  : httpd-2.2.15-30.el6.centos.i686                                                                                      3/14
Verifying  : httpd-tools-2.2.15-30.el6.centos.i686                                                                                4/14
Verifying  : httpd-itk-2.2.22-6.el6.i686                                                                                          5/14
Verifying  : httpd-devel-2.2.15-30.el6.centos.i686                                                                                6/14
Verifying  : db4-devel-4.7.25-18.el6_4.i686                                                                                       7/14
Verifying  : db4-cxx-4.7.25-18.el6_4.i686                                                                                         8/14
Verifying  : expat-devel-2.0.1-11.el6_2.i686                                                                                      9/14
Verifying  : cyrus-sasl-devel-2.1.23-13.el6_3.1.i686                                                                             10/14
Verifying  : apr-devel-1.3.9-5.el6_2.i686                                                                                        11/14
Verifying  : httpd-manual-2.2.15-30.el6.centos.noarch                                                                            12/14
Verifying  : httpd-2.2.15-29.el6.centos.i686                                                                                     13/14
Verifying  : httpd-tools-2.2.15-29.el6.centos.i686                                                                               14/14

Installed:
httpd-devel.i686 0:2.2.15-30.el6.centos        httpd-itk.i686 0:2.2.22-6.el6        httpd-manual.noarch 0:2.2.15-30.el6.centos

Dependency Installed:
apr-devel.i686 0:1.3.9-5.el6_2               apr-util-devel.i686 0:1.3.9-3.el6_0.1      cyrus-sasl-devel.i686 0:2.1.23-13.el6_3.1
db4-cxx.i686 0:4.7.25-18.el6_4               db4-devel.i686 0:4.7.25-18.el6_4           expat-devel.i686 0:2.0.1-11.el6_2
openldap-devel.i686 0:2.4.23-34.el6_5.1

Updated:
httpd.i686 0:2.2.15-30.el6.centos                                httpd-tools.i686 0:2.2.15-30.el6.centos

Install MOD_JK

[root@cluster1 native]# yum groupinstall ‘Development Tools’

wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.40-src.tar.gz
tar -zxvf tomcat-connectors-1.2.40-src.tar.gz
cd tomcat-connectors-1.2.40-src
cd /root/software/tomcat-connectors-1.2.40-src/native
./buildconf.sh

./configure –with-apxs=/usr/sbin/apxs
make
libtool –finish /usr/lib/httpd/modules/
make install

httpd-jk.conf

<VirtualHost *:80>
ServerName cluster1.rmohan.com
JkMount /* lb
RewriteEngine On
</VirtualHost>

LoadModule jk_module modules/mod_jk.so

<IfModule jk_module>

# We need a workers file exactly once
# and in the global server
JkWorkersFile conf.d/workers.properties

# Our JK error log
# You can (and should) use rotatelogs here
JkLogFile logs/mod_jk.log

# Our JK log level (trace,debug,info,warn,error)
JkLogLevel info

# Our JK shared memory file
JkShmFile logs/mod_jk.shm

# Define a new log format you can use in any CustomLog in order
# to add mod_jk specific information to your access log.
# LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\” \”%{Cookie}i\” \”%{Set-Cookie}o\” %{pid}P %{tid}P %{JK_LB_FIRST_NAME}n %{JK_LB_LAST_NAME}n ACC %{JK_LB_LAST_ACCESSED}n ERR %{JK_LB_LAST_ERRORS}n BSY %{JK_LB_LAST_BUSY}n %{JK_LB_LAST_STATE}n %D” extended_jk

# This option will reject all requests, which contain an
# encoded percent sign (%25) or backslash (%5C) in the URL
# If you are sure, that your webapp doesn’t use such
# URLs, enable the option to prevent double encoding attacks.
# Since: 1.2.24
# JkOptions +RejectUnsafeURI

# After setting JkStripSession to “On”, mod_jk will
# strip all “;jsessionid=…” from request URLs it
# does *not* forward to a backend.
# This is useful, if all links in a webapp use
# URLencoded session IDs and parts of the static
# content should be delivered directly by Apache.
# Of course you can also do it with mod_rewrite.
# Since: 1.2.21
# JkStripSession On

# Start a separate thread for internal tasks like
# idle connection probing, connection pool resizing
# and load value decay.
# Run these tasks every JkWatchdogInterval seconds.
# Since: 1.2.27
JkWatchdogInterval 60

# Configure access to jk-status and jk-manager
# If you want to make this available in a virtual host,
# either move this block into the virtual host
# or copy it logically there by including “JkMountCopy On”
# in the virtual host.
# Add an appropriate authentication method here!
<Location /jk-status>
# Inside Location we can omit the URL in JkMount
JkMount jk-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
<Location /jk-manager>
# Inside Location we can omit the URL in JkMount
JkMount jk-manager
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>

# If you want to put all mounts into an external file
# that gets reloaded automatically after changes
# (with a default latency of 1 minute),
# you can define the name of the file here.
# JkMountFile conf/extra/uriworkermap.properties

# Example for Mounting a context to the worker “balancer”
# The URL syntax “a|b” instantiates two mounts at once,
# the first one is “a”, the second one is “ab”.
# JkMount /myapp|/* balancer

# Example for UnMounting requests for all workers
# using a simple URL pattern
# Since: 1.2.26
# JkUnMount /myapp/static/* *

# Example for UnMounting requests for a named worker
# JkUnMount /myapp/images/* balancer

# Example for UnMounting requests using regexps
# SetEnvIf REQUEST_URI “\.(htm|html|css|gif|jpg|js)$” no-jk

# Example for setting a reply timeout depending on the request URL
# Since: 1.2.27
# SetEnvIf Request_URI “/transactions/” JK_REPLY_TIMEOUT=600000

# Example for disabling reply timeouts for certain request URLs
# Since: 1.2.27
# SetEnvIf Request_URI “/reports/” JK_REPLY_TIMEOUT=0

# IMPORTANT: Mounts and virtual hosts
# If you are using VirtualHost elements, you
# – can put mounts only used in some virtual host into its VirtualHost element
# – can copy all global mounts to it using “JkMountCopy On” inside the VirtualHost
# – can copy all global mounts to all virtual hosts by putting
#   “JkMountCopy All” into the global server
# Since: 1.2.26

</IfModule>

uriworkermap.properties

# The ASF licenses this file to You under the Apache License, Version 2.0
# (the “License”); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# uriworkermap.properties – IIS
#
# This file provides sample mappings for example wlb
# worker defined in workermap.properties.minimal
# The general syntax for this file is:
# [URL]=[Worker name]

/ClusterWebApp/*=lb
/admin/*=lb
/manager/*=lb
/jsp-examples/*=lb
/servlets-examples/*=lb
/examples/*=lb

# Optionally filter out all .jpeg files inside that context
# For no mapping the url has to start with exclamation (!)

!/servlets-examples/*.jpeg=lb

#
# Mount jkstatus to /jkmanager
# For production servers you will need to
# secure the access to the /jkmanager url
#
/jk-manager=jk-status

[root@cluster1 conf.d]# cat workers.properties
worker.list=lb,jk-status

worker.node1.type=ajp13
worker.node1.host=192.168.1.41
worker.node1.port=8009
worker.node1.lbfactor=1

worker.node2.type=ajp13
worker.node2.host=192.168.1.42
worker.node2.port=8009
worker.node2.lbfactor=1

worker.lb.type=lb
worker.lb.balance_workers=node1, node2
worker.lb.method=Busyness

worker.jk-status.type=status

Deploy the war to test the loadbalancing

mkdir test

vi test.jsp

<html>
<body>
<%@ page import=”java.net.InetAddress” %>
<h1><font color=”red”>Session serviced by NODE_02</font></h1>
<table align=”center” border=”1″>
<tr>
<td>
Session ID
</td>
<td>
<%= session.getId() %></td>
</td>
<% session.setAttribute(“abc”,”abc”);%>
</tr>
<tr>
<td>
Created on
</td>
<td>
<%= session.getCreationTime() %>
</td>
</tr>
<tr>
<td>
Hostname:
</td>
<td>
<%
InetAddress ia = InetAddress.getLocalHost();
out.println(ia.getHostName());
%>
</td>
</tr>
</table>
</body>
</html>

jar cvf test.war .

cp test.war  /usr/tomcat/apache-tomcat-8.0.5/webapps

wget https://github.com/jaysensharma/MiddlewareMagicDemos/blob/master/ClusterTest_WebApp/ClusterWebApp.war?raw=true

mv ClusterWebApp.war?raw=true   ClusterWebApp.war

Need to the clustering Part on the tomcat server

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

Add in server.xml on both the tomcat server

<Cluster className=”org.apache.catalina.ha.tcp.SimpleTcpCluster”
channelSendOptions=”6″>

<Manager className=”org.apache.catalina.ha.session.BackupManager”
expireSessionsOnShutdown=”false”
notifyListenersOnReplication=”true”
mapSendOptions=”6″/>
<!–
<Manager className=”org.apache.catalina.ha.session.DeltaManager”
expireSessionsOnShutdown=”false”
notifyListenersOnReplication=”true”/>
–>
<Channel className=”org.apache.catalina.tribes.group.GroupChannel”>
<Membership className=”org.apache.catalina.tribes.membership.McastService”
address=”228.0.0.4″
port=”45564″
frequency=”500″
dropTime=”3000″/>
<Receiver className=”org.apache.catalina.tribes.transport.nio.NioReceiver”
address=”auto”
port=”5000″
selectorTimeout=”100″
maxThreads=”6″/>

<Sender className=”org.apache.catalina.tribes.transport.ReplicationTransmitter”>
<Transport className=”org.apache.catalina.tribes.transport.nio.PooledParallelSender”/>
</Sender>
<Interceptor className=”org.apache.catalina.tribes.group.interceptors.TcpFailureDetector”/>
<Interceptor className=”org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor”/>
<Interceptor className=”org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor”/>
</Channel>

<Valve className=”org.apache.catalina.ha.tcp.ReplicationValve”
filter=”.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt”/>

<Deployer className=”org.apache.catalina.ha.deploy.FarmWarDeployer”
tempDir=”/tmp/war-temp/”
deployDir=”/tmp/war-deploy/”
watchDir=”/tmp/war-listen/”
watchEnabled=”false”/>

<ClusterListener className=”org.apache.catalina.ha.session.ClusterSessionListener”/>
</Cluster>

After Addding restart the tomcat server

/usr/tomcat/apache-tomcat-8.0.5/bin/shutdown.sh
/usr/tomcat/apache-tomcat-8.0.5/bin/startup.sh

tail -f catalina.out

14-May-2014 02:24:35.084 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2543 ms
14-May-2014 02:24:37.319 INFO [Tribes-Task-Receiver-1] org.apache.catalina.tribes.io.BufferPool.getBufferPool Created a buffer pool with max size:104857600 bytes of type: org.apache.catalina.tribes.io.BufferPool15Impl
14-May-2014 02:24:37.908 INFO [Membership-MemberAdded.] org.apache.catalina.ha.tcp.SimpleTcpCluster.memberAdded Replication member added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1, 42}:5000,{192, 168, 1, 42},5000, alive=1212, securePort=-1, UDP Port=-1, id={-67 107 6 86 -126 -125 75 75 -81 40 118 14 106 -83 -104 -17 }, payload={}, command={}, domain={}, ]
14-May-2014 02:24:39.183 INFO [Tribes-Task-Receiver-3] org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MB (total)
Sent:0.00 MB (application)
Time:0.00 seconds
Tx Speed:0.14 MB/sec (total)
TxSpeed:0.14 MB/sec (application)
Error Msg:0
Rx Msg:2 messages
Rx Speed:0.00 MB/sec (since 1st msg)
Received:0.00 MB]

http://cluster1.rmohan.com/clusterjsp/HaJsp.jsp

Cluster – HA JSP Sample
HttpSession Information: •Served From Server: cluster1.rmohan.com
•Server Port Number: 80
•Executed From Server: cluster2.rmohan.com
•Executed Server IP Address: 192.168.1.41
•Session ID: 980075D2C3D0E9BC693C61CECFD43979.node2
•Session Created: Wed May 14 02:30:59 SGT 2014
•Last Accessed: Wed May 14 02:31:29 SGT 2014
•Session will go inactive in 1800 seconds

Enter session attribute data:

Name of Session Attribute:
Value of Sesion Attribute:

Data retrieved from the HttpSession:  •ada = ads
•2 = 2
•646 = 5656

INSTRUCTIONS •Add session data using the form. Upon pressing ADD SESSION DATA, the current session data will be listed.
•Click on RELOAD PAGE to display the current session data without adding new data.
•Click on CLEAR SESSION to invalidate the current session.

RHEL / CentOS Linux Install Core Development Tools

[root@cluster1 tomcat-connectors-1.2.40-src]# yum groupinstall ‘Development Tools’
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.secureax.com
* epel: ftp.jaist.ac.jp
* extras: kartolo.sby.datautama.net.id
* updates: mirror.smartmedia.net.id
Setting up Group Process
Checking for new repos for mirrors
Package 1:make-3.81-20.el6.i686 already installed and latest version
Package 1:pkgconfig-0.23-9.1.el6.i686 already installed and latest version
Package binutils-2.20.51.0.2-5.36.el6.i686 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package autoconf.noarch 0:2.63-5.1.el6 will be installed
—> Package automake.noarch 0:1.11.1-4.el6 will be installed
—> Package bison.i686 0:2.4.1-5.el6 will be installed
—> Package byacc.i686 0:1.9.20070509-7.el6 will be installed
—> Package cscope.i686 0:15.6-6.el6 will be installed
—> Package ctags.i686 0:5.8-2.el6 will be installed
—> Package cvs.i686 0:1.11.23-16.el6 will be installed
—> Package diffstat.i686 0:1.51-2.el6 will be installed
—> Package doxygen.i686 1:1.6.1-6.el6 will be installed
—> Package elfutils.i686 0:0.152-1.el6 will be installed
–> Processing Dependency: elfutils-libs(x86-32) = 0.152-1.el6 for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libdw.so.1(ELFUTILS_0.149) for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libdw.so.1(ELFUTILS_0.148) for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libdw.so.1(ELFUTILS_0.138) for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libdw.so.1(ELFUTILS_0.127) for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libdw.so.1(ELFUTILS_0.126) for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libdw.so.1(ELFUTILS_0.122) for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libdw.so.1 for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libasm.so.1(ELFUTILS_1.0) for package: elfutils-0.152-1.el6.i686
–> Processing Dependency: libasm.so.1 for package: elfutils-0.152-1.el6.i686
—> Package flex.i686 0:2.5.35-8.el6 will be installed
—> Package gcc.i686 0:4.4.7-4.el6 will be installed
–> Processing Dependency: libgomp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.i686
–> Processing Dependency: cpp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.i686
–> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-4.el6.i686
–> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-4.el6.i686
–> Processing Dependency: libgomp.so.1 for package: gcc-4.4.7-4.el6.i686
—> Package gcc-c++.i686 0:4.4.7-4.el6 will be installed
–> Processing Dependency: libstdc++-devel = 4.4.7-4.el6 for package: gcc-c++-4.4.7-4.el6.i686
–> Processing Dependency: libmpfr.so.1 for package: gcc-c++-4.4.7-4.el6.i686
—> Package gcc-gfortran.i686 0:4.4.7-4.el6 will be installed
–> Processing Dependency: libgfortran = 4.4.7-4.el6 for package: gcc-gfortran-4.4.7-4.el6.i686
–> Processing Dependency: libgfortran.so.3 for package: gcc-gfortran-4.4.7-4.el6.i686
—> Package gettext.i686 0:0.17-16.el6 will be installed
—> Package git.i686 0:1.7.1-3.el6_4.1 will be installed
–> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.el6_4.1.i686
–> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.i686
–> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.i686
—> Package indent.i686 0:2.2.10-7.el6 will be installed
—> Package intltool.noarch 0:0.41.0-1.1.el6 will be installed
–> Processing Dependency: perl(XML::Parser) for package: intltool-0.41.0-1.1.el6.noarch
–> Processing Dependency: gettext-devel for package: intltool-0.41.0-1.1.el6.noarch
—> Package libtool.i686 0:2.2.6-15.5.el6 will be installed
—> Package patch.i686 0:2.6-6.el6 will be installed
—> Package patchutils.i686 0:0.3.1-3.1.el6 will be installed
—> Package rcs.i686 0:5.7-37.el6 will be installed
—> Package redhat-rpm-config.noarch 0:9.0.3-42.el6.centos will be installed
—> Package rpm-build.i686 0:4.8.0-37.el6 will be installed
–> Processing Dependency: xz for package: rpm-build-4.8.0-37.el6.i686
–> Processing Dependency: lzma for package: rpm-build-4.8.0-37.el6.i686
–> Processing Dependency: /usr/bin/gdb-add-index for package: rpm-build-4.8.0-37.el6.i686
—> Package subversion.i686 0:1.6.11-10.el6_5 will be installed
–> Processing Dependency: perl(URI) >= 1.17 for package: subversion-1.6.11-10.el6_5.i686
–> Processing Dependency: libneon.so.27 for package: subversion-1.6.11-10.el6_5.i686
—> Package swig.i686 0:1.3.40-6.el6 will be installed
—> Package systemtap.i686 0:2.3-4.el6_5 will be installed
–> Processing Dependency: systemtap-devel = 2.3-4.el6_5 for package: systemtap-2.3-4.el6_5.i686
–> Processing Dependency: systemtap-client = 2.3-4.el6_5 for package: systemtap-2.3-4.el6_5.i686
–> Running transaction check
—> Package cloog-ppl.i686 0:0.15.7-1.2.el6 will be installed
–> Processing Dependency: libppl_c.so.2 for package: cloog-ppl-0.15.7-1.2.el6.i686
–> Processing Dependency: libppl.so.7 for package: cloog-ppl-0.15.7-1.2.el6.i686
—> Package cpp.i686 0:4.4.7-4.el6 will be installed
—> Package elfutils-libs.i686 0:0.152-1.el6 will be installed
—> Package gdb.i686 0:7.2-60.el6_4.1 will be installed
—> Package gettext-devel.i686 0:0.17-16.el6 will be installed
–> Processing Dependency: gettext-libs = 0.17-16.el6 for package: gettext-devel-0.17-16.el6.i686
–> Processing Dependency: libgettextpo.so.0 for package: gettext-devel-0.17-16.el6.i686
–> Processing Dependency: libgcj_bc.so.1 for package: gettext-devel-0.17-16.el6.i686
–> Processing Dependency: libasprintf.so.0 for package: gettext-devel-0.17-16.el6.i686
—> Package glibc-devel.i686 0:2.12-1.132.el6_5.1 will be installed
–> Processing Dependency: glibc-headers = 2.12-1.132.el6_5.1 for package: glibc-devel-2.12-1.132.el6_5.1.i686
–> Processing Dependency: glibc = 2.12-1.132.el6_5.1 for package: glibc-devel-2.12-1.132.el6_5.1.i686
–> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.132.el6_5.1.i686
—> Package libgfortran.i686 0:4.4.7-4.el6 will be installed
—> Package libgomp.i686 0:4.4.7-4.el6 will be installed
—> Package libstdc++-devel.i686 0:4.4.7-4.el6 will be installed
—> Package mpfr.i686 0:2.4.1-6.el6 will be installed
—> Package neon.i686 0:0.29.3-3.el6_4 will be installed
–> Processing Dependency: libproxy.so.0 for package: neon-0.29.3-3.el6_4.i686
–> Processing Dependency: libpakchois.so.0 for package: neon-0.29.3-3.el6_4.i686
–> Processing Dependency: libgnutls.so.26(GNUTLS_1_4) for package: neon-0.29.3-3.el6_4.i686
–> Processing Dependency: libgnutls.so.26 for package: neon-0.29.3-3.el6_4.i686
—> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
—> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be installed
—> Package perl-URI.noarch 0:1.40-2.el6 will be installed
—> Package perl-XML-Parser.i686 0:2.36-7.el6 will be installed
–> Processing Dependency: perl(LWP) for package: perl-XML-Parser-2.36-7.el6.i686
—> Package systemtap-client.i686 0:2.3-4.el6_5 will be installed
–> Processing Dependency: systemtap-runtime = 2.3-4.el6_5 for package: systemtap-client-2.3-4.el6_5.i686
–> Processing Dependency: zip for package: systemtap-client-2.3-4.el6_5.i686
–> Processing Dependency: libavahi-common.so.3 for package: systemtap-client-2.3-4.el6_5.i686
–> Processing Dependency: libavahi-client.so.3 for package: systemtap-client-2.3-4.el6_5.i686
—> Package systemtap-devel.i686 0:2.3-4.el6_5 will be installed
–> Processing Dependency: kernel-devel for package: systemtap-devel-2.3-4.el6_5.i686
—> Package xz.i686 0:4.999.9-0.3.beta.20091007git.el6 will be installed
—> Package xz-lzma-compat.i686 0:4.999.9-0.3.beta.20091007git.el6 will be installed
–> Running transaction check
—> Package avahi-libs.i686 0:0.6.25-12.el6 will be installed
—> Package gettext-libs.i686 0:0.17-16.el6 will be installed
—> Package glibc.i686 0:2.12-1.132.el6 will be updated
–> Processing Dependency: glibc = 2.12-1.132.el6 for package: glibc-common-2.12-1.132.el6.i686
—> Package glibc.i686 0:2.12-1.132.el6_5.1 will be an update
—> Package glibc-headers.i686 0:2.12-1.132.el6_5.1 will be installed
–> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.132.el6_5.1.i686
–> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.132.el6_5.1.i686
—> Package gnutls.i686 0:2.8.5-13.el6_5 will be installed
—> Package kernel-devel.i686 0:2.6.32-431.17.1.el6 will be installed
—> Package libgcj.i686 0:4.4.7-4.el6 will be installed
–> Processing Dependency: libart_lgpl >= 2.1.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: gtk2 >= 2.4.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libpangoft2-1.0.so.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libpangocairo-1.0.so.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libpango-1.0.so.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libgtk-x11-2.0.so.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libgdk_pixbuf-2.0.so.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libgdk-x11-2.0.so.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libfreetype.so.6 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libfontconfig.so.1 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libcairo.so.2 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libatk-1.0.so.0 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libasound.so.2(ALSA_0.9) for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libasound.so.2 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libXtst.so.6 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libXrender.so.1 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libXrandr.so.2 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libSM.so.6 for package: libgcj-4.4.7-4.el6.i686
–> Processing Dependency: libICE.so.6 for package: libgcj-4.4.7-4.el6.i686
—> Package libproxy.i686 0:0.3.0-4.el6_3 will be installed
–> Processing Dependency: libproxy-python = 0.3.0-4.el6_3 for package: libproxy-0.3.0-4.el6_3.i686
–> Processing Dependency: libproxy-bin = 0.3.0-4.el6_3 for package: libproxy-0.3.0-4.el6_3.i686
—> Package pakchois.i686 0:0.4-3.2.el6 will be installed
—> Package perl-libwww-perl.noarch 0:5.833-2.el6 will be installed
–> Processing Dependency: perl-HTML-Parser >= 3.33 for package: perl-libwww-perl-5.833-2.el6.noarch
–> Processing Dependency: perl(HTML::Entities) for package: perl-libwww-perl-5.833-2.el6.noarch
–> Processing Dependency: perl(Compress::Zlib) for package: perl-libwww-perl-5.833-2.el6.noarch
—> Package ppl.i686 0:0.10.2-11.el6 will be installed
—> Package systemtap-runtime.i686 0:2.3-4.el6_5 will be installed
—> Package zip.i686 0:3.0-1.el6 will be installed
–> Running transaction check
—> Package alsa-lib.i686 0:1.0.22-3.el6 will be installed
—> Package atk.i686 0:1.30.0-1.el6 will be installed
—> Package cairo.i686 0:1.8.8-3.1.el6 will be installed
–> Processing Dependency: libpng12.so.0(PNG12_0) for package: cairo-1.8.8-3.1.el6.i686
–> Processing Dependency: libpng12.so.0 for package: cairo-1.8.8-3.1.el6.i686
–> Processing Dependency: libpixman-1.so.0 for package: cairo-1.8.8-3.1.el6.i686
–> Processing Dependency: libX11.so.6 for package: cairo-1.8.8-3.1.el6.i686
—> Package fontconfig.i686 0:2.8.0-3.el6 will be installed
—> Package freetype.i686 0:2.3.11-14.el6_3.1 will be installed
—> Package glibc-common.i686 0:2.12-1.132.el6 will be updated
—> Package glibc-common.i686 0:2.12-1.132.el6_5.1 will be an update
—> Package gtk2.i686 0:2.20.1-4.el6 will be installed
–> Processing Dependency: libtiff >= 3.6.1 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libtiff.so.3 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2) for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libjpeg.so.62 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libjasper.so.1 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libcups.so.2 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libXinerama.so.1 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libXi.so.6 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libXfixes.so.3 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libXext.so.6 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libXdamage.so.1 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libXcursor.so.1 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: libXcomposite.so.1 for package: gtk2-2.20.1-4.el6.i686
–> Processing Dependency: hicolor-icon-theme for package: gtk2-2.20.1-4.el6.i686
—> Package kernel-headers.i686 0:2.6.32-431.17.1.el6 will be installed
—> Package libICE.i686 0:1.0.6-1.el6 will be installed
—> Package libSM.i686 0:1.2.1-2.el6 will be installed
—> Package libXrandr.i686 0:1.4.0-1.el6 will be installed
—> Package libXrender.i686 0:0.9.7-2.el6 will be installed
—> Package libXtst.i686 0:1.2.1-2.el6 will be installed
—> Package libart_lgpl.i686 0:2.3.20-5.1.el6 will be installed
—> Package libproxy-bin.i686 0:0.3.0-4.el6_3 will be installed
—> Package libproxy-python.i686 0:0.3.0-4.el6_3 will be installed
—> Package pango.i686 0:1.28.1-7.el6_3 will be installed
–> Processing Dependency: libthai >= 0.1.9 for package: pango-1.28.1-7.el6_3.i686
–> Processing Dependency: libthai.so.0(LIBTHAI_0.1) for package: pango-1.28.1-7.el6_3.i686
–> Processing Dependency: libthai.so.0 for package: pango-1.28.1-7.el6_3.i686
–> Processing Dependency: libXft.so.2 for package: pango-1.28.1-7.el6_3.i686
—> Package perl-Compress-Zlib.i686 0:2.021-136.el6 will be installed
–> Processing Dependency: perl(IO::Uncompress::Gunzip) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.i686
–> Processing Dependency: perl(IO::Compress::Gzip::Constants) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.i686
–> Processing Dependency: perl(IO::Compress::Gzip) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.i686
–> Processing Dependency: perl(IO::Compress::Base::Common) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.i686
–> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.021 for package: perl-Compress-Zlib-2.021-136.el6.i686
—> Package perl-HTML-Parser.i686 0:3.64-2.el6 will be installed
–> Processing Dependency: perl(HTML::Tagset) >= 3.03 for package: perl-HTML-Parser-3.64-2.el6.i686
–> Processing Dependency: perl(HTML::Tagset) for package: perl-HTML-Parser-3.64-2.el6.i686
–> Running transaction check
—> Package cups-libs.i686 1:1.4.2-50.el6_4.5 will be installed
—> Package hicolor-icon-theme.noarch 0:0.11-1.1.el6 will be installed
—> Package jasper-libs.i686 0:1.900.1-15.el6_1.1 will be installed
—> Package libX11.i686 0:1.5.0-4.el6 will be installed
–> Processing Dependency: libX11-common = 1.5.0-4.el6 for package: libX11-1.5.0-4.el6.i686
–> Processing Dependency: libxcb.so.1 for package: libX11-1.5.0-4.el6.i686
—> Package libXcomposite.i686 0:0.4.3-4.el6 will be installed
—> Package libXcursor.i686 0:1.1.13-6.20130524git8f677eaea.el6 will be installed
—> Package libXdamage.i686 0:1.1.3-4.el6 will be installed
—> Package libXext.i686 0:1.3.1-2.el6 will be installed
—> Package libXfixes.i686 0:5.0-3.el6 will be installed
—> Package libXft.i686 0:2.3.1-2.el6 will be installed
—> Package libXi.i686 0:1.6.1-3.el6 will be installed
—> Package libXinerama.i686 0:1.1.2-2.el6 will be installed
—> Package libjpeg-turbo.i686 0:1.2.1-3.el6_5 will be installed
—> Package libpng.i686 2:1.2.49-1.el6_2 will be installed
—> Package libthai.i686 0:0.1.12-3.el6 will be installed
—> Package libtiff.i686 0:3.9.4-10.el6_5 will be installed
—> Package perl-Compress-Raw-Zlib.i686 1:2.021-136.el6 will be installed
—> Package perl-HTML-Tagset.noarch 0:3.20-4.el6 will be installed
—> Package perl-IO-Compress-Base.i686 0:2.021-136.el6 will be installed
—> Package perl-IO-Compress-Zlib.i686 0:2.021-136.el6 will be installed
—> Package pixman.i686 0:0.26.2-5.1.el6_5 will be installed
–> Running transaction check
—> Package libX11-common.noarch 0:1.5.0-4.el6 will be installed
—> Package libxcb.i686 0:1.8.1-1.el6 will be installed
–> Processing Dependency: libXau.so.6 for package: libxcb-1.8.1-1.el6.i686
–> Running transaction check
—> Package libXau.i686 0:1.0.6-4.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
Package                              Arch                 Version                                           Repository             Size
=========================================================================================================================================
Installing:
autoconf                             noarch               2.63-5.1.el6                                      base                  781 k
automake                             noarch               1.11.1-4.el6                                      base                  550 k
bison                                i686                 2.4.1-5.el6                                       base                  626 k
byacc                                i686                 1.9.20070509-7.el6                                base                   44 k
cscope                               i686                 15.6-6.el6                                        base                  130 k
ctags                                i686                 5.8-2.el6                                         base                  142 k
cvs                                  i686                 1.11.23-16.el6                                    base                  699 k
diffstat                             i686                 1.51-2.el6                                        base                   29 k
doxygen                              i686                 1:1.6.1-6.el6                                     base                  2.3 M
elfutils                             i686                 0.152-1.el6                                       base                  214 k
flex                                 i686                 2.5.35-8.el6                                      base                  279 k
gcc                                  i686                 4.4.7-4.el6                                       base                  8.2 M
gcc-c++                              i686                 4.4.7-4.el6                                       base                  4.3 M
gcc-gfortran                         i686                 4.4.7-4.el6                                       base                  4.1 M
gettext                              i686                 0.17-16.el6                                       base                  1.8 M
git                                  i686                 1.7.1-3.el6_4.1                                   base                  4.5 M
indent                               i686                 2.2.10-7.el6                                      base                  112 k
intltool                             noarch               0.41.0-1.1.el6                                    base                   58 k
libtool                              i686                 2.2.6-15.5.el6                                    base                  564 k
patch                                i686                 2.6-6.el6                                         base                   96 k
patchutils                           i686                 0.3.1-3.1.el6                                     base                   94 k
rcs                                  i686                 5.7-37.el6                                        base                  169 k
redhat-rpm-config                    noarch               9.0.3-42.el6.centos                               base                   59 k
rpm-build                            i686                 4.8.0-37.el6                                      base                  128 k
subversion                           i686                 1.6.11-10.el6_5                                   updates               2.2 M
swig                                 i686                 1.3.40-6.el6                                      base                  1.1 M
systemtap                            i686                 2.3-4.el6_5                                       updates                26 k
Installing for dependencies:
alsa-lib                             i686                 1.0.22-3.el6                                      base                  369 k
atk                                  i686                 1.30.0-1.el6                                      base                  194 k
avahi-libs                           i686                 0.6.25-12.el6                                     base                   54 k
cairo                                i686                 1.8.8-3.1.el6                                     base                  319 k
cloog-ppl                            i686                 0.15.7-1.2.el6                                    base                   93 k
cpp                                  i686                 4.4.7-4.el6                                       base                  3.4 M
cups-libs                            i686                 1:1.4.2-50.el6_4.5                                base                  326 k
elfutils-libs                        i686                 0.152-1.el6                                       base                  197 k
fontconfig                           i686                 2.8.0-3.el6                                       base                  186 k
freetype                             i686                 2.3.11-14.el6_3.1                                 base                  363 k
gdb                                  i686                 7.2-60.el6_4.1                                    base                  2.3 M
gettext-devel                        i686                 0.17-16.el6                                       base                  153 k
gettext-libs                         i686                 0.17-16.el6                                       base                  110 k
glibc-devel                          i686                 2.12-1.132.el6_5.1                                updates               978 k
glibc-headers                        i686                 2.12-1.132.el6_5.1                                updates               616 k
gnutls                               i686                 2.8.5-13.el6_5                                    updates               340 k
gtk2                                 i686                 2.20.1-4.el6                                      base                  3.3 M
hicolor-icon-theme                   noarch               0.11-1.1.el6                                      base                   40 k
jasper-libs                          i686                 1.900.1-15.el6_1.1                                base                  136 k
kernel-devel                         i686                 2.6.32-431.17.1.el6                               updates               8.7 M
kernel-headers                       i686                 2.6.32-431.17.1.el6                               updates               2.9 M
libICE                               i686                 1.0.6-1.el6                                       base                   52 k
libSM                                i686                 1.2.1-2.el6                                       base                   36 k
libX11                               i686                 1.5.0-4.el6                                       base                  590 k
libX11-common                        noarch               1.5.0-4.el6                                       base                  192 k
libXau                               i686                 1.0.6-4.el6                                       base                   24 k
libXcomposite                        i686                 0.4.3-4.el6                                       base                   20 k
libXcursor                           i686                 1.1.13-6.20130524git8f677eaea.el6                 base                   28 k
libXdamage                           i686                 1.1.3-4.el6                                       base                   18 k
libXext                              i686                 1.3.1-2.el6                                       base                   34 k
libXfixes                            i686                 5.0-3.el6                                         base                   23 k
libXft                               i686                 2.3.1-2.el6                                       base                   54 k
libXi                                i686                 1.6.1-3.el6                                       base                   35 k
libXinerama                          i686                 1.1.2-2.el6                                       base                   20 k
libXrandr                            i686                 1.4.0-1.el6                                       base                   36 k
libXrender                           i686                 0.9.7-2.el6                                       base                   29 k
libXtst                              i686                 1.2.1-2.el6                                       base                   29 k
libart_lgpl                          i686                 2.3.20-5.1.el6                                    base                   63 k
libgcj                               i686                 4.4.7-4.el6                                       base                   17 M
libgfortran                          i686                 4.4.7-4.el6                                       base                  243 k
libgomp                              i686                 4.4.7-4.el6                                       base                  121 k
libjpeg-turbo                        i686                 1.2.1-3.el6_5                                     updates               177 k
libpng                               i686                 2:1.2.49-1.el6_2                                  base                  184 k
libproxy                             i686                 0.3.0-4.el6_3                                     base                   39 k
libproxy-bin                         i686                 0.3.0-4.el6_3                                     base                  8.1 k
libproxy-python                      i686                 0.3.0-4.el6_3                                     base                  8.4 k
libstdc++-devel                      i686                 4.4.7-4.el6                                       base                  1.6 M
libthai                              i686                 0.1.12-3.el6                                      base                  183 k
libtiff                              i686                 3.9.4-10.el6_5                                    updates               339 k
libxcb                               i686                 1.8.1-1.el6                                       base                  114 k
mpfr                                 i686                 2.4.1-6.el6                                       base                  153 k
neon                                 i686                 0.29.3-3.el6_4                                    base                  120 k
pakchois                             i686                 0.4-3.2.el6                                       base                   21 k
pango                                i686                 1.28.1-7.el6_3                                    base                  350 k
perl-Compress-Raw-Zlib               i686                 1:2.021-136.el6                                   base                   70 k
perl-Compress-Zlib                   i686                 2.021-136.el6                                     base                   45 k
perl-Error                           noarch               1:0.17015-4.el6                                   base                   29 k
perl-Git                             noarch               1.7.1-3.el6_4.1                                   base                   28 k
perl-HTML-Parser                     i686                 3.64-2.el6                                        base                  109 k
perl-HTML-Tagset                     noarch               3.20-4.el6                                        base                   17 k
perl-IO-Compress-Base                i686                 2.021-136.el6                                     base                   69 k
perl-IO-Compress-Zlib                i686                 2.021-136.el6                                     base                  135 k
perl-URI                             noarch               1.40-2.el6                                        base                  117 k
perl-XML-Parser                      i686                 2.36-7.el6                                        base                  224 k
perl-libwww-perl                     noarch               5.833-2.el6                                       base                  387 k
pixman                               i686                 0.26.2-5.1.el6_5                                  updates               206 k
ppl                                  i686                 0.10.2-11.el6                                     base                  1.3 M
systemtap-client                     i686                 2.3-4.el6_5                                       updates               3.4 M
systemtap-devel                      i686                 2.3-4.el6_5                                       updates               1.4 M
systemtap-runtime                    i686                 2.3-4.el6_5                                       updates               187 k
xz                                   i686                 4.999.9-0.3.beta.20091007git.el6                  base                  137 k
xz-lzma-compat                       i686                 4.999.9-0.3.beta.20091007git.el6                  base                   16 k
zip                                  i686                 3.0-1.el6                                         base                  252 k
Updating for dependencies:
glibc                                i686                 2.12-1.132.el6_5.1                                updates               4.3 M
glibc-common                         i686                 2.12-1.132.el6_5.1                                updates                14 M

Transaction Summary
=========================================================================================================================================
Install     100 Package(s)
Upgrade       2 Package(s)

Total download size: 107 M
Is this ok [y/N]:y

ssh_exchange_identification: Connection closed by remote host

[root@cluster1 ~]# ssh 192.168.1.41
ssh_exchange_identification: Connection closed by remote host

 

Problem is need to check the /etc/hosts.allow  /etc/hosts.deny

Just enter;

echo ‘SSHD: ALL’ >> /etc/hosts.allow

It sorted it out for me

Tomcat and Keystore

Keystore and cacerts

Steps:

1. list the existing keys, the default file is .keystore under /usr/local/tomcat folder
# cd /usr/local/tomcat
# keytool -list -v -storepass changeit

2. delete the existing keys( key alias :tomcat)
# cd /usr/local/tomcat
# keytool -delete -alias tomcat -storepass changeit

3. generate self-signed key
# keytool -h for usage
# keytool -genkey -alias tomcat -keysize 1024 -validity 3650 -keypass changeit -storepass changeit
What is your first and last name?
[Unknown]: rmohan
What is the name of your organizational unit?
[Unknown]: IS
What is the name of your organization?
[Unknown]: rmohan
What is the name of your City or Locality?
[Unknown]: Singapore
What is the name of your State or Province?
[Unknown]: Singapore
What is the two-letter country code for this unit?
[Unknown]: SG
Is CN=rmohan, L=Singapore, ST=Singapore, C=SG correct?
[no]: yes
for above self-generated key to work without SSL warning, you need to import to ca certs file

4. list the existing CA certificates from /usr/local/jdk/jre/lib/security/cacerts
# cd /usr/local/jdk/jre/lib/security
# keytool -list -v -keystore cacerts

5. in order to add self-signed key to cacerts, export it first from .keystore file
# keytool -export -alias rmohan -keypass changeit -storepass changeit -file /tmp/rmohan.der

6. then import to cacerts file under /usr/local/jdk/jre/lib/security/cacerts
# cd /usr/local/jdk/jre/lib/security
# keytool -import -alias rmohan -trustcacerts -keystore cacerts -file /tmp/rmohan.der -storepass changeit

note: add this key to trusted cacerts and give alias as rmohan
you can add one more, but have to give the different alias name
7. you can delete the existing cacert key:
# cd /usr/local/jdk/jre/lib/security
#keytool -delete -keystore cacerts -alias rmohan

8. import a openssl generated self signed pem format certificate from openldap server into ca certs file on tomcat server (for ldaps connection from tomcat server to openldap server)

# cd /usr/local/jdk/jre/lib/security
# keytool -import -alias rmohan -trustcacerts -keystore cacerts -file /tmp/rmohan.pem -storepass changei
References:
1. convert pem to der format

openssl x509 -in cacert.pem -inform PEM -out cacert.der -outform DER

Tomcat could not run through SSL due to jsse.invalid_ssl_conf

SEVERE: Error initializing endpoint
java.io.IOException: jsse.invalid_ssl_conf
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:817)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:522)
    ...
Caused by: javax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.
    at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.checkEnabledSuites(SSLServerSocketImpl.java:310)
    at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:255)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:813)
    ...
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8443]]
LifecycleException:  Protocol handler initialization failed: java.io.IOException: jsse.invalid_ssl_conf
    at org.apache.catalina.connector.Connector.initialize(Connector.java:1024)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
    ...

Cause

This error might be caused of certain things such as, the keystoretype is not defined in server.xml thus the JSSE could not recognized the keystore as the keystore is not on default type which is JKS. Other thing is the certificate has not be imported to keystore that is generated by  keytool as it does not let you import an existing private key for which you already have a certificate.

Resolution

  1. You need to define the keystoreType to server.xml as the default one is JKS. For example under your server.xml would become like this.

    <Connector port="8443" maxHttpHeaderSize="8192"
                       maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                       enableLookups="false" disableUploadTimeout="true"
                       acceptCount="100" scheme="https" secure="true"
                       clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
                       URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"
                       keystoreFile="<MY_CERTIFICATE_LOCATION>" keystoreType="PKCS12"/> 

 

Import private key and certificate into Java Key Store (JKS)

Apache Tomcat and many other Java applications expect to retrieve SSL/TLS certificates from a Java Key Store (JKS). Jave Virtual Machines usually come with keytool  to help you create a new key store.

Keytool helps you to:

  • create a new JKS with a new private key
  • generate a Certificate Signung Request (CSR) for the private key in this JKS
  • import a certificate that you received for this CSR into your JKS

Keytool does not let you import an existing private key for which you already have a certificate. So you need to do this yourself, here’s how:

Let’s assume you have a private key (key.pem) and a certificate (cert.pem), both in PEM format as the file names suggest.

PEM format is ‘kind-of-human-readable’ and looks like e.g.

-----BEGIN CERTIFICATE-----
Ulv6GtdFbjzLeqlkelqwewlq822OrEPdH+zxKUkKGX/eN
.
. (snip)
.
9801asds3BCfu52dm7JHzPAOqWKaEwIgymlk=
----END CERTIFICATE-----

Convert both, the key and the certificate into DER format using openssl :

openssl pkcs8 -topk8 -nocrypt -in key.pem -inform PEM -out key.der -outform DER
openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER

Now comes the tricky bit, you need something to import these files into the JKS. ImportKey will do this for you, get the ImportKey.java (text/x-java-source, 6.6 kB, info) source or the compiled (Java 1.5 !) ImportKey.class (application/octet-stream, 3.3 kB,info) and run it like[gview file=”http://rmohan.com/wp-content/uploads/2014/05/ImportKey.zip”]

user@host:~$ java ImportKey key.der cert.der
Using keystore-file : /home/user/keystore.ImportKey
One certificate, no chain.
Key and certificate stored.
Alias:importkey  Password:importkey

Now we have a proper JKS containing our private key and certificate in a file called keystore.ImportKey, using ‘importkey’ as alias and also as password. For any further changes, like changing the password we can use keytool.

  1. Convert your private key and certificate from the PEM format into DER (PKCS8, not PKCS12):
    openssl pkcs8 -topk8 -nocrypt -in myhost.key -inform PEM -out myhost.key.der -outform DER
    openssl x509 -in myhost.crt -inform PEM -out myhost.crt.der -outform DER
  2. Modify the ImportKey.java to set a passphrase for the keystore and an alias to access your certificate.
  3. Compile it into a class file:
    javac ImportKey.java
  4. Run it to import your key and certificate:
    java ImportKey myhost.key.der myhost.crt.der

The application then creates a file keystore.ImportKey which holds a combination of your certificate and private key that you can put into your application directory, e.g. underconf/keystore.

You do not need to add any intermediate certificate authorities to the keystore.

Set up your server.xml

You are now ready to use your certificate. Modify your server.xml inside the application directory and add a Connector entry like this:

<Connectorport="8443"maxHttpHeaderSize="8192"maxThreads="150"minSpareThreads="25"maxSpareThreads="75"enableLookups="false"disableUploadTimeout="true"acceptCount="100"scheme="https"secure="true"clientAuth="false"sslProtocol="TLS"SSLEnabled="true"URIEncoding="UTF-8"keystorePass="secret123456"keystoreFile="conf/keystore"keyAlias="private_key"/>
  • Providing the keystoreFile and keystorePass (the password you chose above) tells the application how to access the keystore.
    If you encountered the “java.io.IOException: jsse.invalid_ssl_conf” exception before, this is most likely the answer to it.
  • Setting the keyAlias (you put it into the ImportKey.java) hints which key to use.
    If you got an exception like “java.io.IOException: Alias name foobar does not identify a key entry” you were providing an existing name but only a certificate without a private key.
  • You can also modify those settings later by using the corresponding keytool commands.

Now you should be able to restart your application and access it via SSL on port 8443. If it does not come up (maybe only listening on non-SSL ports) check the logs for any of the above exceptions.

Important: Remove any world and group permissions on the server.xml to keep your passphrase hidden from other users/applications on the server. You may want to chmod your keystore, too.

chmod g-rwx,o-rwx server.xml keystore

List of Run Commands in Windows 7 and 8

These run commands are available for almost all settings available in Windows control panel.

Note : most part of these commands are compatible with Windows 7, Vista e Windows XP.

As someone has kindly reported, some commands are not compatible between different versions. Please check the commands and use the correct ones for your version of the operating system. Technical feedbacks are always appreciated, please send me any info that it helpful to improve this article.

Funzioni Comandi
Open Documents Folder documents
Open Videos folder videos
Open Downloads Folder downloads
Open Favorites Folder favorites
Open Recent Folder recent
Open Recent Folder logoff
Open Pictures Folder pictures
Windows Sideshow control.exe /name Microsoft.WindowsSideshow
Windows CardSpace control.exe /name Microsoft.cardspace
Windows Anytime Upgrade WindowsAnytimeUpgradeui
Taskbar and Start Menu control.exe /name Microsoft.TaskbarandStartMenu
Troubleshooting control.exe /name Microsoft.Troubleshooting
User Accounts control.exe /name Microsoft.UserAccounts
Adding a new Device devicepairingwizard
Add Hardware Wizard hdwwiz
Advanced User Accounts netplwiz
Advanced User Accounts azman.msc
Backup and Restore sdclt
Bluetooth File Transfer fsquirt
Calculator calc
Certificates certmgr.msc
Change Computer Performance Settings systempropertiesperformance
Change Data Execution Prevention Settings systempropertiesdataexecutionprevention
Change Data Execution Prevention Settings printui
Character Map charmap
ClearType Tuner cttune
Color Management colorcpl
Command Prompt cmd
Component Services comexp.msc
Component Services dcomcnfg
Computer Management compmgmt.msc
Computer Management compmgmtlauncher
Connessione proiettore di rete netproj
Connect to a Projector displayswitch
Control Panel control
Create A Shared Folder Wizard shrpubw
Create a System Repair Disc recdisc
Credential Backup and Restore Wizard credwiz
Data Execution Prevention systempropertiesdataexecutionprevention
Date and Time timedate.cpl
Default Location locationnotifications
Device Manager devmgmt.msc
Device Manager hdwwiz.cpl
Device Pairing Wizard devicepairingwizard
Diagnostics Troubleshooting Wizard msdt
Digitizer Calibration Tool tabcal
DirectX Diagnostic Tool dxdiag
Disk Cleanup cleanmgr
Disk Defragmenter dfrgui
Disk Management diskmgmt.msc
Display dpiscaling
Display Color Calibration dccw
Display Switch displayswitch
DPAPI Key Migration Wizard dpapimig
Driver Verifier Manager verifier
Ease of Access Center utilman
EFS Wizard rekeywiz
Event Viewer eventvwr.msc
Fax Cover Page Editor fxscover
File Signature Verification sigverif
Font Viewer fontview
Game Controllers joy.cpl
Getting Started gettingstarted
IExpress Wizard iexpress
Getting Started irprops.cpl
Install or Uninstall Display Languages lusrmgr
Internet Explorer iexplore
Internet Options inetcpl.cpl
iSCSI Initiator Configuration Tool iscsicpl
Language Pack Installer lpksetup
Local Group Policy Editor gpedit.msc
Local Security Policy secpol.msc
Local Users and Groups lusrmgr.msc
Location Activity locationnotifications
Magnifier magnify
Malicious Software Removal Tool mrt
Manage Your File Encryption Certificates rekeywiz
Math Input Panel mip
Microsoft Management Console mmc
Microsoft Support Diagnostic Tool msdt
Mouse main.cpl
NAP Client Configuration napclcfg.msc
Narrator narrator
Network Connections ncpa.cpl
New Scan Wizard wiaacmgr
Notepad notepad
ODBC Data Source Administrator odbcad32
ODBC Driver Configuration odbcconf
On-Screen Keyboard osk
Paint mspaint
Pen and Touch tabletpc.cpl
People Near Me collab.cpl
Performance Monitor perfmon.msc
Performance Options systempropertiesperformance
Phone and Modem telephon.cpl
Phone Dialer dialer
Power Options powercfg.cpl
Presentation Settings presentationsettings
Print Management printmanagement.msc
Printer Migration printbrmui
Printer User Interface printui
Private Character Editor eudcedit
Problem Steps Recorder psr
Programs and Features appwiz.cpl
Protected Content Migration dpapimig
Region and Language intl.cpl
Registry Editor regedit
Registry Editor 32 regedt32
Remote Access Phonebook rasphone
Remote Desktop Connection mstsc
Resource Monitor resmon
Resultant Set of Policy rsop.msc
SAM Lock Tool syskey
Screen Resolution desk.cpl
Securing the Windows Account Database syskey
Services services.msc
Set Program Access and Computer Defaults computerdefaults
Share Creation Wizard shrpubw
Shared Folders fsmgmt.msc
Snipping Tool snippingtool
Sound mmsys.cpl
Sound recorder soundrecorder
SQL Server Client Network Utility cliconfg
Sticky Notes stikynot
Stored User Names and Passwords credwiz
Sync Center mobsync
System Configuration msconfig
System Configuration Editor sysedit
System Information msinfo32
System Properties sysdm.cpl
System Properties (Advanced Tab) systempropertiesadvanced
System Properties (Computer Name Tab) systempropertiescomputername
System Properties (Hardware Tab) systempropertieshardware
System Properties (Remote Tab) systempropertiesremote
System Properties (System Protection Tab) systempropertiesprotection
System Restore rstrui
Task Manager taskmgr
Task Scheduler taskschd.msc
Trusted Platform Module (TPM) Management tpm.msc
User Account Control Settings useraccountcontrolsettings
Utility Manager utilman
Version Reporter Applet winver
Volume Mixer sndvol
Windows Action Center wscui.cpl
Windows Activation Client slui
Windows Anytime Upgrade Results windowsanytimeupgraderesults
Windows CardSpace infocardcpl.cpl
Windows Disc Image Burning Tool isoburn
Windows DVD Maker dvdmaker
Windows Easy Transfer migwiz
Windows Explorer explorer
Windows Fax and Scan wfs
Windows Features optionalfeatures
Windows Firewall firewall.cpl
Windows Firewall with Advanced Security wf.msc
Windows Journal journal
Windows Media Player wmplayer
Windows Memory Diagnostic Scheduler mdsched
Windows Mobility Center mblctr
Windows Picture Acquisition Wizard wiaacmgr
Windows PowerShell powershell
Windows PowerShell ISE powershell_ise
Windows Remote Assistance msra
Windows Repair Disc recdisc
Windows Script Host wscript
Windows Update wuapp
Windows Update Standalone Installer wusa
Versione Windows winver
WMI Management wmimgmt.msc
WordPad write
XPS Viewer xpsrchvw

 

System32 Files Explained

This list is the work of many people who give this information. I collected them and finally compled them into one list. In the near future I will also add a list with all CPL and other very interesting files. If you have addition, please let me know and I will update the list.

acctres.dll (Microsoft Internet Account Manager Resources) – Needed to open Outlook Express. If you do not want users to be able to use Outlook Express, it is an easy way to delete this file.

aclui.dll (Security Descriptor Editor) – Needed to enable Registry Editor.

ACTIVEDS.DLL (ADs Router Layer DLL) – Needed to open the Event viewer and Services Viewer

actxprxy.dll (ActiveX Interface Marshaling Library) – Essential to Internet Explorer. This DLL keeps track on Active X modules

ADVAPI32.DLL (Advanced Windows 32 Base API) – Needed to boot to Windows. Provides access to the fundamental resources available to a Windows system. Included are things like file systems, devices, processes and threads, access to the Windows registry, and error handling.

ADVPACK.DLL (Advpack Library) – Needed by Microsoft Update. This DLL builds up the Windows Update menu and accesses the updates list in the registry.

apphelp.dll (Application Compatibility Client Library)- This DLL came with service pack 3 and it enables the Microsoft management console to work.

ASYCFILT.DLL – Allows applications to communicate between each other using Object Linking and Embedding (OLE).

ATL.DLL (ATL Module for Windows XP (Unicode) – Needed by Microsoft Update. Also needed to open Event and Services Viewers. And needed by Outlook Express. Without this file Outlook Express will not open. You will receive this message when you click on the Outlook Express shortcut: Outlook Express could not be started because MSOE.DLL could not be found. Outlook Express may not be installed correctly.

ATTRIB.EXE (Attribute Utility) – Displays or changes file attributes (read-only, archive, hidden, or system).

AUDIOSRV.DLL (Windows Audio Service) – Needed to hear sound on your computer. Main Service file for Windows Audio.

AUTHZ.DLL (Authorization Framework) – Needed to boot to Windows.

AUTOCHK.EXE (Auto Check Disk) – Needed to boot to Windows. Launches automatically during Windows XP bootup if a volume is marked with bad clusters, error blocks, or otherwise damaged).

avifil32.dll (Microsoft AVI File support library).

BASESRV.DLL (Windows NT BASE API Server DLL) – Needed to boot to Windows.

BATMETER.DLL (Battery Meter Helper DLL) – Power Options in Control Panel.

bootvid.dll (VGA Boot Driver) – Needed to boot to Windows.

BROWSELC.DLL (Shell Browser UI Library) – IE Toolbar will look messed up without it, and you cannot right-click access “Customize” without it.

BROWSEUI.DLL (Shell Browser UI Library) – Needed to boot to Windows.

CABINET.DLL (Microsoft® Cabinet File API) – Microsoft Update. Also needed to access Properties of Devices in Device Manager.

cabview.dll (Cabinet File Viewer Shell Extension) – Needed to view inside .cab files.

CDM.DLL (Windows Update CDM Stub)

certcli.dll (Microsoft® Certificate Services Client) – Display Properties of devices in Device Manager.

CFGMGR32.DLL (Configuration Manager Forwarder DLL) – Part of CHKDSK.

CHKDSK.EXE (Check Disk) – Part of CHKDSK. A disk inspection tool that can search for and repair disk errors.

clb.dll (Column List Box) – Needed to open Registry Editor.

CLUSAPI.DLL (Cluster API Library) – Needed to access Disk Management in Computer Management. Also needed by Microsoft Update to install February 20, 2006 update for Windows Media Player 10. An application programming interface (API) is the interface that a computer system, library or application provides in order to allow requests for service to be made of it by other computer programs, and/or to allow data to be exchanged between them.

CMD.EXE (Command Prompt) – Enables execute of a batch file. An executable that provides the command prompt (MS-DOS shell interpreter) for Windows NT.

COMCTL32.DLL (Common Controls Library) – Needed to boot to Windows. Provides the functionality to create and manage screen windows and most basic controls, such as buttons and scrollbars, receive mouse and keyboard input, and other functionality associated with the GUI part of Windows. Gives applications access to some advanced controls provided by the operating system. These include things like status bars, progress bars, toolbars and tabs.

COMDLG32.DLL (Common Dialogs DLL) – Needed to boot to Windows. Provides applications the standard dialog boxes for opening and saving files, choosing color and font, etc.

corpol.dll (Microsoft COM Runtime Execution Engine) – Microsoft Update.

CRYPT32.DLL (Crypto API32) – Needed to boot to Windows.

CRYPTDLL.DLL (Cryptography Manager) – Needed to boot to Windows.

cryptsvc.dll (Cryptographic Services) – Cryptographic Services, which is needed by Microsoft Update. Also needed to access Properties of Disk Drives.

CRYPTUI.DLL (Microsoft Trust UI Provider) – Needed to boot to Windows.

CSRSRV.DLL (Client Server Runtime Process) – Needed to boot to Windows.

CSRSS.EXE (Client-Server Runtime Server Subsystem) – Needed to boot to Windows. Used to maintain the Win32 system environment console and other essential functions.

d3d8thk.dll (Microsoft Direct3D OS Thunk Layer) – Needed by ConvertXtoDVD.

d3d9.dll (Microsoft Direct3D) – If you update to NVIDIA display drivers version 93.71, the d3d9.dll is used by NVIDIA so that you can manually adjust Brightness, Contrast, Gamma and Image sharpening in Display Properties -> Settings -> Advanced -> NVIDIA Unknown (or your designated graphics card, depending upon whether or not you’ve chosen to delete the nvapi.dll) -> select Color Correction -> under “Apply color changes to:” click on the drop arrow to the right of the box and select “Overlay”.

DBGHELP.dll (Windows Image Helper) – Windows Media Player 11. Without it, when you click on something to play, a message tells you to re-install Windows Media Player. Also needed to install WMP11.

DCIMAN32.DLL (DCI Manager) – Websites with streaming media.

ddraw.dll (Microsoft DirectDraw) – DVD Playback with Windows Media Player and NVDVD Player.

ddrawex.dll (Direct Draw Ex)

desk.cpl (Desktop Control Panel) – Display Properties Control Panel applet.

devenum.dll (Device enumeration) – Needed by Windows Media Player and NVDVD Player.

devmgmt.msc (Computer Management Console) – Needed to access Device Manager.

devmgr.dll (Device Manager MMC Snapin) – Needed to access Device Manager.

DHCPCSVC.DLL (DHCP Client Service) – Needed for Internet connectivity. Main Service file for DHCP Client.

dinput.dll (Microsoft DirectInput) – Needed by ffdshow.

dmocx.dll (TreeView OCX) – Needed to access Device Manager.

DNSAPI.DLL (DNS Client API DLL) – Needed to boot to Windows.

DolbyHph.dll (Dolby Headphone Engine) – Installed and needed by NVDVD Player.

dpcdll.dll (Dpcdll Module) – Needed to boot to Windows. Product Code activation.

dsound.dll (DirectSound) – Needed by Windows Media Player and NVDVD Player.

dssenh.dll (Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider) – Needed by Internet Explorer. Also needed by Microsoft Update.

duser.dll (Windows DirectUser Engine) – Needed by Add/Remove Module. Also, if you delete this file Windows will display the classic logoff and logon prompts. However, you can boot to Windows without it.

dxtmsft.dll (DirectX Media — Image DirectX Transforms)

dxtrans.dll (DirectX Media — DirectX Transform Core)

ELS.DLL (Event Viewer Snapin) – Needed by Event Viewer.

ESENT.DLL (Server Database Storage Engine) – Microsoft Update. Also needed to access Properties of Disk Drives.

EVENTLOG.DLL (Event Logging Service) – Needed by Event Viewer. Without this file present it will take a very long time for your system to boot to Windows.

EVENTVWR.EXE (Event Viewer Microsoft Management Console) – Needed by Event Viewer. Main Service file for Event Log.

eventvwr.msc (Event Viewer Microsoft Management Console) – Needed by Event Viewer.

filemgmt.dll (Services and Shared Folders) – Needed by Services Viewer.

fmifs.dll (FM IFS Utility DLL) – Part of CHKDSK.

FNTCACHE.DAT (Font Cache) – If deleted, Windows will rebuild a new FNTCACHE.DAT the next time you reboot your system. If you use SVS or SWV, and you copied fonts from a layer to the base, delete this file. Next boot it will be rebuilded and that solves a lot of the fonts problems. (Added to DinamiQs software to keep fonts in the layers without the need to rebuild everytime)

fontext.dll .(Windows Font Folder) – Needed to maintain selected view of Font Folder, and also needed to display the default icon for .TTF Fonts

framebuf.dll (Framebuffer Display Driver) – Needed so graphics in Safemode don’t look all screwed up.

GDI32.DLL (GDI Client DLL) – Needed to boot to Windows. Provides the functionality for outputting graphical content to monitors, printers and other output devices.

GRPCONV.EXE (Group Convert) – Needed for some programs to install. Converts Microsoft Windows 3.x and Microsoft Windows for Workgroups Program Manager groups into Start Menu items.

hal.dll (Hardware Abstraction Layer) – Needed to boot to Windows.

hccoin.dll (USB Coinstaller) – Needed by Intel Chipset INF Update Utility.

hid.dll (Hid User Library) – Needed by Sound and Video Card driver installations. HID stands for Human Interface Device, a type of computer device that interacts directly with and takes input from humans.

html.iec (Microsoft HTML Converter) – Needed to be able to copy text from a Webpage and paste it to Wordpad.

icmp.dll (ICMP DLL) – Needed in order to install the PCPitStop Utility for computer checkup and diagnostics on the PC Pitstop Website. Also needed by TCPOptimizer. ICMP (Internet Control Message Protocol) is used when networking. It ensures the integrity of information being sent across a network.

ieframe.dll (Internet Explorer) – Essential to Internet Explorer 7. (Installed by Internet Explorer 7.)

ieframe.dll.mui (Internet Explorer) – Needed by Internet Explorer 7 Toolbar. (Installed by Internet Explorer 7.)

iepeers.dll (Internet Explorer Peer Objects) – Needed to watch Yahoo Movie Trailers.

iertutil.dll (Run time utility for Internet Explorer) – Needed to start explorer.exe with Internet Explorer 7 installed on your system. The explorer.exe (located in the C:\WINDOWS folder), manages the Windows Graphical Shell including the Start Menu, Taskbar, Desktop, and File Manager. Without it running, the graphical interface for Windows will disappear. (The iertutil.dll is installed by Internet Explorer 7.)

ieui.dll (Internet Explorer UI Engine) – Essential to Internet Explorer 7. (Installed by Internet Explorer 7.)

ifsutil.dll (IFS Utility DLL) – Part of CHKDSK.

IMAGEHLP.DLL (Windows NT Image Helper) – Needed to boot to Windows.

imgutil.dll (IE plugin image decoder support DLL). Belongs to Internet Explorer – Needed so you don’t see red x’s in place of some images

imm32.dll (Windows XP IMM32 API Client DLL) – You cannot enter System Properties without the imm32.dll or the usp10.dll present.

inetcomm.dll (Microsoft Internet Messaging API) – Without this file Outlook Express will not open. You will receive this message when you click on the Outlook Express shortcut: Outlook Express could not be started because MSOE.DLL could not be found. Outlook Express may not be installed correctly. Additionally, the inetcomm.dll is needed in order to save a Webpage as an offline Webpage with an .mht extension. Also needed to save an offline Webpage with an .mht extension are the inetres.dll and the MSOERT2.DLL (Outlook Express files), and theMSHTML.TLB (Internet Explorer file).

inetcpl.cpl .(Internet Control Panel) – Internet Options Control Panel applet.

inetcplc.dll (Internet Control Panel) – Needed to access Internet Options.

inetres.dll (Microsoft Internet Messaging API Resources) – Without this file Outlook Express will not open. You will receive this message when you click on the Outlook Express shortcut: Outlook Express could not be started because MSOERES.DLL could not be found. Outlook Express may not be installed correctly. Additionally, the inetres.dll is needed in order to save a Webpage as an offline Webpage with an .mht extension. Also needed to save an offline Webpage with an .mht extension are the inetcomm.dll and the MSOERT2.DLL (Outlook Express files), and the MSHTML.TLB (Internet Explorer file).

IPHLPAPI.DLL (IP Helper API) – Needed to boot to Windows.

iuengine.dll (Windows Update Control Engine) – Needed by Microsoft Update.

JSCRIPT.DLL (Microsoft ® JScript) – Needed by Microsoft Update. Also needed by Services Viewer.

kbdus.dll (United States Keyboard Layout) – Needed to boot to Windows. You may need a different KBD*.DLL depending on your system.

kdcom.dll (Kernel Debugger HW Extension DLL) – Needed to boot to Windows.

kernel32.dll (Windows NT BASE API Client DLL) – Needed to boot to Windows. Provides access to the fundamental resources available to a Windows system. Included are things like file systems, devices, processes and threads, access to the Windows registry, and error handling.

ksproxy.ax – Installed by Sound Card driver installations from either the XP installation CD, or a cab file in C:\WINDOWS\Driver Cache\i386. The installation will ask for the “ksuser.dll.” Once located, the “ksproxy.ax” will be installed along with the “ksuser.dll to C:\WINDOWS\system32.

ksuser.dll (User CSA Library) – Needed by Windows Media Player and NVDVD Player. Installed by Sound Card driver installations from either the XP installation CD, or a cab file in C:\WINDOWS\Driver Cache\i386. The installation will ask for the “ksuser.dll.” Once located, the “ksuser.dll” will be installed along with the “ksproxy.ax” to C:\WINDOWS\system32.

l3codeca.acm (MPEG Layer-3 Audio Codec for MSACM) – Needed by Windows Media Player to play .mp3 music files, and also needed to be able to rip music CDs to the .mp3 format.

l3codecp.acm (MPEG Audio Layer-3 Codec for MSACM) – Needed by Windows Media Player to be able to rip music CDs to the .mp3 format.

LegitCheckControl.dll (Windows Genuine Advantage Validation) – Needed by Microsoft Update. This file is replaced once or twice a year to check for piracy key’s

licdll.dll (Licdll Module) – Needed by Windows Update.

LOGONUI.EXE (Windows Logon User Interface). The user interface that appears when Windows XP first starts – If you delete this file, Windows will display the classic logoff and logon prompts. However, you can boot up to Windows without it. With resourcehacker this executable can be customised to create custom ctrl-alt-del menu’s

LSASRV.DLL (LSA Server DLL) – Needed to boot to Windows.

LSASS.EXE (LSA Security Service) – Needed to boot to Windows. The Local Security Authority server process.

LZ32.DLL (LZ Expand/Compress API DLL) – Needed to properly display the default icon for .ttf extension fonts.

mcicda.dll (MCI driver for cdaudio devices) – Needed by Windows Media Player burning and ripping processes.

MFC42.DLL (MFCDLL Shared Library – Retail Version).

mfc42u.dll (MFCDLL Shared Library – Retail Version) – Needed to open Event and Services Viewers. Needed to access Device Manager. And also needed by Wordpad.

MFPLAT.dll (Media Foundation Platform) – To even open Windows Media Player 11.

MLANG.DLL (Multi Language Support DLL) – Essential to Internet Explorer.

MMC.EXE (Microsoft Management Console) – Needed to open Event and Services Viewers. Also needed to access Device Manager.

mmcbase.dll (MMC Base DLL) – Needed by Event and Services Viewers. Also needed to access Device Manager.

mmcndmgr.dll (MMC Node Manager DLL) – Needed by Event and Services Viewers. Also needed to access Device Manager.

mpg4dmod.dll (Corona Windows Media MPEG-4 S Video Decoder) – Needed to be able to adjust the brightness in Windows Media Player for certain videos.

MPR.DLL (Multiple Provider Router DLL) – Needed to boot to Windows.

MPRAPI.DLL (Windows NT MP Router Administration DLL). After installing Internet Explorer 7, this file is one of five system32 files needed to open Internet Options: MPRAPI.DLL, msrating.dll, rasapi32.dll, rasdlg.dll andrasman.dll. Additionally needed to open Network Connections in Control Panel.

MSACM32.dll (Microsoft ACM Audio Filter) – Needed to open Audio tab in Sound and Audio Device properties. You cannot view or change multimedia properties without this file. Also needed to hear sound in Windows Pinball Game.

MSACM32.DRV (Microsoft Sound Mapper) – Needed to hear sound in Windows Pinball Game.

MSASN1.DLL (ASN.1 Runtime APIs) – Needed to boot to Windows.

msconfig.exe (System Configuration Utility). Designed to help you troubleshoot problems with your computer. MSCONFIG can also be used to ensure that your computer boots faster and crashes less – In PART 5 I moved msconfig.exe to the system32 folder from C:\WINDOWS\pchealth\helpctr\binaries before I deleted the pchealth folder and its contents.

MSCTFIME.IME (Microsoft Text Frame Work Service IME). Installed with Internet Explorer 7 – If this file is not present your system could lockup while working at your Desktop.

msdmo.dll (DMO Runtime) – Without the msdmo.dll present, Windows Media Player will not play…anything. Also, the msdmo.dll is very much needed by Websites with streaming media.

msdxm.ocx (Windows Media Player 2 ActiveX Control) – Needed by too many Websites with streaming media to not keep this file installed on my system. The msdxm.ocx (DirectX file) and the wmpdxm.dll (Windows Media Player file) work together. The msdxm.ocx is also needed to start Media Player 6.4 (mplayer2.exe).

msftedit.dll (Rich Text Edit Control, v4.1) – Needed by Wordpad. Contains functions for the Rich Text Edit control version 4.1.

MSGINA.DLL (Windows NT Logon GINA DLL) – Needed to boot to Windows. Loads Logon User Interface.

mshtml.dll (Microsoft ® HTML Viewer) – Needed by Internet Explorer.

MSHTML.TLB (Microsoft ® MSHTML Typelib) – Needed in order to save a Webpage as an offline Webpage with an .mht extension. Also needed to save an offline Webpage with an .mht extension are the inetcomm.dll, theinetres.dll and the MSOERT2.DLL (Outlook Express files).

MSHTMLED.DLL (Microsoft ® HTML Editing Component) – Gives you the ability to edit HTML. An example of this would be when you edit one of your posts on some forums. You wouldn’t be able to do that without this file.

mshtmler.dll (Microsoft ® HTML Editing Component’s Resource DLL) – Needed to insert a picture in E-mail using Outlook Express.

MSI.DLL (Windows Installer) – Needed by Windows Installer. Also needed by PerfectDisk 6. (PerfectDisk 8 does not need the MSI.DLL.)

msident.dll (Microsoft Identity Manager) – Needed by Outlook Express.

msidle.dll (User Idle Monitor) – Needed by Microsoft Update.

msidntld.dll (Microsoft Identity Manager) – Needed by Outlook Express.

MSIEXEC.EXE (Windows Installer) – Main Service File for Windows Installer. Windows Installer uses the information within .MSI files that are provided with some applications, and installs, repairs, or removes software using this information. Note: You can view these .MSI (Windows Installer File) files within the C:\WINDOWS\Installer folder.

msihnd.dll – Needed by Windows Installer.

MSIMG32.DLL (GDIEXT Client DLL) – Without this file present, upon booting to Windows, you will need to click OK on a Logon Message in order to enter Windows.

msisip.dll (MSI Signature SIP Provider) – Windows Installer file. SIP stands for Session Initiation Protocol.

msls31.dll (Microsoft Line Services library file) – Essential to Internet Explorer.

MSOEACCT.DLL (Microsoft Internet Account Manager) – Needed by Outlook Express.

MSOERT2.DLL (Microsoft Outlook Express RT Lib) – Needed by Outlook Express. Additionally, the MSOERT2.DLL is needed in order to save a Webpage as an offline Webpage with an .mht extension. Also needed to save an offline Webpage with an .mht extension are the inetcomm.dll and the inetres.dll (Outlook Express files), and the MSHTML.TLB (Internet Explorer file).

MSPAINT.EXE (Microsoft Paint) – A basic graphics creation and viewing tool.

MSPATCHA.DLL (Microsoft® Patch Engine) – Needed by Microsoft Update.

MSPRIVS.DLL (Microsoft Privilege Translations) – Needed to boot to Windows.

msrating.dll (Internet Ratings and Local User Management DLL). After installing Internet Explorer 7, this file is one of five system32 files needed to open Internet Options: MPRAPI.DLL, msrating.dll, rasapi32.dll, rasdlg.dll andrasman.dll.

MSV1_0.DLL (Microsoft Authentication Package v1.0) – Needed to boot to Windows.

MSVBVM60.DLL (Visual Basic Virtual Machine) – Contains program code used to run programs that are written in the Visual Basic programming language. As one example, CCleaner, a very popular program needs this file.

MSVCP60.DLL (Microsoft ® C++ Runtime Library) – Needed to boot to Windows.

msvcp71.dll (Microsoft® C++ Runtime Library) – Installed by Acronis True Image 10.

msvcr71.dll (Microsoft® C Runtime Library) – Installed by Acronis True Image 10.

MSVCRT.DLL (Windows NT CRT DLL) – Needed to boot to Windows.

msvfw32.dll (Microsoft Video for Windows DLL) – Needed to open Windows Media Player.

MSWSOCK.DLL (Microsoft Windows Sockets 2.0 Service Provider) – Essential to Internet Explorer.

MSXML3.DLL (MSXML 3.0 SP 5) – Needed by Event and Services Viewers. Also needed to access Device Manager.

MSXML3R.DLL (XML Resources) – Needed by Event and Services Viewers. Also needed to access Device Manager.

muweb.dll (Microsoft Update Web Control) – Installed by Microsoft Update Software.

mydocs.dll (My Documents Folder UI) – Needed to properly display the My Documents Icon.

NCOBJAPI.DLL – Needed to boot to Windows.

NDDEAPI.DLL (Network DDE Share Management APIs) – Needed to boot to Windows.

NETAPI32.DLL (Net Win32 API DLL) – Needed to boot to Windows.

newdev.dll (Add Hardware Device Library) – Needed by Sound and Video Card driver installations. I’m sure other hardware device driver installations need it too.

normaliz.dll (Unicode Normalization DLL) – Needed to start explorer.exe with Internet Explorer 7 installed on your system. The explorer.exe (located in the C:\WINDOWS folder), manages the Windows Graphical Shell including the Start Menu, Taskbar, Desktop, and File Manager. Without it running, the graphical interface for Windows will disappear. (The normaliz.dll is installed by Internet Explorer 7.)

NOTEPAD.EXE (Notepad) – Notepad text-editing utility.

NTDLL.DLL (NT Layer DLL) – Needed to boot to Windows.

NTDSAPI.DLL (NT5DS Library) Needed to boot to Windows

NTOSKRNL.EXE (NT Kernel & System). Windows XP operating system Kernel – Needed to boot to Windows

nv4_disp.dll (NVIDIA Compatible Windows 2000 Display driver) – Essential for Display Adapter. And needed to boot to Windows.

nvcod.dll – NVIDIA Driver CoInstaller

nvcpl.dll – NVIDIA Display Properties Extension

nvdisp.nvu –

nvshell.dll – NVIDIA Desktop Explorer

nvudisp.exe (NVIDIA Uninstaller Utility) – Needed by NVIDIA to uninstall older drivers before installing new drivers during the updating process.

occache.dll (Object Control Viewer) – Needed to view icon for ActiveX objects in Downloaded Program Files. Otherwise the ActiveX objects show up as .ini files.

ODBC32.DLL (Microsoft Data Access – ODBC Driver Manager) – Needed to boot to Windows.

ODBCINT.DLL (Microsoft Data Access – ODBC Resources) – Needed to boot to Windows.

OLE32.DLL (Microsoft OLE for Windows) – Needed to boot to Windows.

oleacc.dll – Active Accessibility Core Component

oleaccrc.dll – Active Accessibility Resource DLL

OLEAUT32.DLL – Needed to boot to Windows.

oledlg.dll (Microsoft Windows™ OLE 2.0 User Interface Support) – Needed to open NVDVD Player. Also needed by Wordpad.

olepro32.dll – Needed to open NVDVD Player.

OLETHK32.DLL (Microsoft OLE for Windows) – Needed by Nero.

PDBoot.exe (PerfectDisk Boot Time Defragmentation) – Needed by PerfectDisk.

pidgen.dll (Pid3.0 generation) – Needed by Microsoft Update. During Windows setup the pidgen.dll produces a PID (Product Identification) from the serial number entered.

pngfilt.dll (IE PNG plugin image decoder). Belongs to Internet Explorer – Needed so you don’t see red x’s in place of some images.

POWRPROF.DLL (Power Profile Helper DLL) – Along with the powercfg.cpl, needed to enter Power Options where you can adjust how you want your computer to power down. Without this file present, you will receive an error when opening Properties for your Keyboard. However, the Properties for Keyboard will eventually open.

PROFMAP.DLL (Userenv) – Needed to boot to Windows.

PSAPI.DLL (Process Status Helper) – Needed to boot to Windows.

qasf.dll (DirectShow ASF Support) – Needed to play WMA music files and WMV video files with Media Player Classic, a third-party media player. GASF stands for Advanced Systems Format (formerly Advanced Streaming Format), Microsoft’s proprietary digital audio/digital video container format, especially meant for streaming media. The most common file types contained within an ASF file are Windows Media Audio (WMA) and Windows Media Video (WMV).

qdvd.dll (DirectShow DVD Playback Runtime) – Needed For DVD Playback with Windows Media Player and NVDVD Player.

qmgr.dll (Background Intelligent Transfer Service) – Needed by Microsoft Update. Main Service file for Background Intelligent Transfer.

rasdlg.dll (Remote Access Common Dialog API).

rasman.dll (Remote Access Connection Manager)

REGAPI.DLL (Registry Configuration API) – Needed to boot to Windows.

REGSVR32.EXE (Microsoft© Register Server) – You can use the Regsvr32 tool (Regsvr32.exe) to Register and UnRegister object linking and embedding (OLE) controls such as dynamic-link library (DLL) or ActiveX Controls (OCX) files that are self-registerable.

riched20.dll (Rich Text Edit Control, v3.0) – Needed by Event Viewer. Contains functions for the Rich Text Edit control versions 2.0 and 3.0.

riched32.dll (Wrapper Dll for Richedit 1.0) – Needed by Event Viewer. Contains functions for the Rich Text Edit control version 1.0.

RPCRT4.DLL (Remote Procedure Call Runtime) – Needed to boot to Windows.

RPCSS.DLL (Distributed COM Services) – Needed to boot to Windows. Main Service file for Remote Procedure Call (RPC).

RSAENH.DLL (Microsoft Enhanced Cryptographic Provider) – Needed to boot to Windows. The RSAENH.DLL is needed to accurately check license for Windows.

rshx32.dll (Security Shell Extension) – The Rshx32.dll controls the Security tab in Properties of files and folders. (To be able to see the Security tab in XP Home Edition you must be in Safemode.)

RTUTILS.DLL (Routing Utilities) – Needed by Websites with streaming media.

RUNDLL32.EXE (Run DLL) – Used to run DLL files from a command line.

RUNONCE.EXE (Run Once) – Used to perform tasks as defined in the RunOnce Registry key.

SAMLIB.DLL (SAM Library DLL) – Needed to boot to Windows.

SAMSRV.DLL (SAM Server DLL) – Needed to boot to Windows.

SC.EXE (A tool to aid in developing services for Windows NT). Communicates with the Service Controller and installed services. The SC.exe retrieves and sets control information about Services.

SCESRV.DLL (Windows Security Configuration Editor Engine) – Needed to boot to Windows.

SCHANNEL.DLL (TLS / SSL Security Provider) – Needed by Internet Explorer. Also needed by Microsoft Update.

SECUR32.DLL (Security Support Provider Interface) – Needed to boot to Windows.

sendmail.dll (Send Mail). The sendmail.dll is a library file used for sending mail via Websites.

services.exe (Services and Controller app) – Needed to boot to Windows. Main Service file for Plug and Play.

services.msc (Services Viewer) – Needed by Services Viewer.

SETUPAPI.DLL (Windows Setup API) – Needed to boot to Windows.

SFC.DLL (Windows File Protection) – Needed by Microsoft Update.

SFC_OS.DLL (Windows File Protection) – You can boot to Windows without this file, but not without first having to click OK on an error that appears telling you the SFC_OS.DLL cannot be found.

sfcfiles.dll (Windows 2000 System File Checker) – Needed to display Properties button in Control Panel > Keyboard > Hardware without receiving an error.

SHDOCLC.DLL (Shell Doc Object and Control Library) – Needed to be able to access right-click options while right-clicking on a Webpage.

SHDOCVW.DLL (Shell Doc Object and Control Library) – Needed to boot to Windows.

SHELL32.DLL (Windows Shell Common Dll) – Needed to boot to Windows.

shellstyle.dll (Windows Shell Style Resource Dll) – If you choose to use the Windows Classic theme, and delete the Themes folder and its contents, you will still need the shellstyle.dll that is in the system32 folder in order to gain access to the Add or Remove Programs panel.

SHFOLDER.DLL (Shell Folder Service) – Needed by Microsoft Update.

shgina.dll (Windows Shell User Logon) – Needed to restart your computer from your Desktop. Further, once you delete or move this file from the system32 folder–even if you put it back–you still won’t be able to restart from your Desktop.

shimgvw.dll (Windows Picture and Fax Viewer) – Needed to display saved image files.

SHLWAPI.DLL (Shell Light-weight Utility Library) – Needed to boot to Windows. Allows applications to access the functionality provided by the operating system shell, as well as change and enhance it.

shsvcs.dll (Windows Shell Services Dll) – Main Service file for Shell Hardware Detection.

SHUTDOWN.EXE (Remote Shutdown Tool). Allows shutdowns and restarts on local or remote PCs.

SMSS.EXE (Windows NT Session Manager) – Needed to boot to Windows. Used to establish the Windows XP environment during bootup.

SNAPAPI.DLL (Acronis Snapshot Dynamic Link Library) – Installed by Acronis True Image.

SNDVOL32.EXE (Volume Control) – A GUI (Graphical User Interface) volume application.

stdole2.tlb (Microsoft OLE 3.50 for Windows NT™ and Windows 95™ Operating Systems) – After deleting the stdole2.tlb and rebooting your system, you may be unable to launch the Search Assistant.

stdole32.tlb (Microsoft OLE 2.1 for Windows NT™ Operating System). When you delete one or both thestdole32.tlb or the stdole2.tlb from the system32 folder, when installing a program that uses InstallShield, you may receive the following error message: The install Shield engine “ikernel.exe” could not be launched -Error loading type library /dll.

storprop.dll (Property Pages for Storage Devices) – Needed to view Advanced Settings tab in Primary IDE Channel and Secondary IDE Channel under IDE ATA/ATAPI controllers in Device Manager.

SVCHOST.EXE (Generic Host Process for Win32 Services) – Needed to boot to Windows.

SXS.DLL (Fusion 2.5) – Needed to boot to Windows.

sysdm.cpl (System Applet for the Control Panel) – System Properties Control Panel applet.

syssetup.dll (Windows NT System Setup) – Needed to display Properties button in Control Panel > Keyboard > Hardware without receiving an error.

TAPI32.DLL (Microsoft® Windows™ Telephony API Client DLL) – TAPI32.DLL is needed by streaming media on many sites.

TASKMGR.EXE (Task Manager) – The Task Manager application.

themeui.dll (Windows Theme API) – Needed by Display Properties.

timedate.cpl (Time Date Control Panel Applet) – Date and Time Properties Control Panel applet.

ULIB.DLL (File Utilities Support DLL) – Part of CHKDSK.

umpnpmgr.dll (User-mode Plug-and-Play Service) – Needed to boot to Windows.

untfs.dll (NTFS Utility DLL) – Part of CHKDSK.

url.dll (Internet Shortcut Shell Extension DLL) – Displays default “e” icon for Internet Shortcuts and the one displayed in your Explorer Toolbar Address Bar.

urlmon.dll (OLE32 Extensions for Win32) – Essential to Internet Explorer.

usbui.dll (USB UI Dll) – Needed to display Advanced tab in USB Universal Host Controller Properties, and Power tab in USB Root Hub Properties in Device Manager.

user32.dll (Windows XP USER API Client DLL) – Needed to boot to Windows.

userenv.dll (Userenv) – Needed to boot to Windows.

USERINIT.EXE (User Initialization) – Needed to boot to Windows. Used to establish the operating environment for a user after logon.

usp10.dll (Uniscribe Unicode script processor) – You cannot enter System Properties without the usp10.dll or the imm32.dll present.

UXTHEME.DLL (Microsoft UxTheme Library) – Needed to boot to Windows. Main Service file for Themes.

vbscript.dll (Microsoft ® VBScript) – Needed by some Websites with streaming media. Also needed by Yahoo Chat.

vdmdbg.dll (VDMDBG.DLL) – Needed to access Task Manager.

VERSION.DLL (Version Checking and File Installation Libraries) – Needed to boot to Windows.

WATCHDOG.SYS (Watchdog Driver) – Needed to boot to Windows.

WDMAUD.DRV (WDM Audio driver mapper) – Needed by Windows Media Player. Also needed to hear sound in Windows Pinball Game.

webcheck.dll (Web Site Monitor) – Needed by Microsoft Update. You will need the webcheck.dll to install the new Microsoft Update software.

WIN32K.SYS (Multi-User Win32 Driver) – Needed to boot to Windows.

WINHTTP.DLL (Windows HTTP Services) – Needed by Microsoft Update. In Vista this DLL is needed to open Wireless configuration dialogbox

WININET.DLL (Internet Extensions for Win32) – Needed to boot to Windows. Internet Explorer file.

WINLOGON.EXE (Windows NT Logon Application) – Needed to boot to Windows. Windows logon manager. Handles the login and logout procedures. With resourcehacker this file can be altered to control logon procedures and to alter the tasks that it follows.

WINMM.DLL (MCI API DLL). Needed by Windows Media Player.

WINSCARD.DLL (Microsoft Smart Card API) – Needed by Microsoft Update.

WINSPOOL.DRV (Windows Spooler Driver).

WINSRV.DLL (Windows Server DLL) – Needed to boot to Windows.

WINSTA.DLL (Winstation Library) – Needed to boot to Windows.

WINTRUST.DLL (Microsoft Trust Verification APIs). Needed to boot to Windows.

WLDAP32.DLL (Win32 LDAP API DLL) – Needed to boot to Windows.

WLNOTIFY.DLL (Common DLL to receive Winlogon notifications) – Needed by Microsoft Update.

wmadmod.dll (Windows Media Audio Decoder) – Needed by Windows Media Player to play .WMA music files.

wmadmoe.dll (Windows Media Audio Encoder/Transcoder) – Needed by Windows Media Player ripping process.

WMASF.DLL (Windows Media ASF DLL) – Needed by Windows Media Player.

WMI.DLL (WMI DC and DP functionality) – Needed to access Device Manager.

wmnetmgr.dll (Windows Media Network Plugin Manager DLL) – Needed to watch Yahoo Movie Trailers.

WMP.DLL (Windows Media Player Core) – Needed to open Windows Media Player.

wmpdxm.dll (Windows Media 6.4 Player Shim) – Needed by too many Websites with streaming media to not keep this file installed on my system.

wmpeffects.dll (Windows Media Player Effects) – Needed for visual effects while playing music with Windows Media Player 11.

WMPLOC.DLL (Windows Media Player) – Needed to open Windows Media Player.

wmpps.dll (Windows Media Player Proxy Stub Dll) – Needed to rip music CDs using Windows Media Player 11 with file-name information intact, such as the name of the artist, album, song title. Without the wmpps.dll file present, the file-name information it will read and write as “01 Unknown Artist Track 1”. Also needed to burn .WMA files to a CD using WMP11.

wmpshell.dll (Windows Media Player Launcher) – Without the wmpshell.dll present WMP cannot remember that it’s supposed to open your media files. The Open With dialog box will open instead, asking you to choose a program you want to use to open the file.

WMVCORE.DLL (Windows Media Playback/Authoring DLL) – Needed to watch Yahoo Movie Trailers.

WMVDECOD.dll (Windows Media Video Decoder) – Needed to watch MSNBC videos online, and to watch Yahoo Movie Trailers with Windows Media Player 11 installed on your system.

wpa.dbl Windows Product Activation (WPA) – Needed to boot to Windows.

WS2_32.DLL (Windows Socket 2.0 32-Bit DLL) – Needed to boot to Windows.

WS2HELP.DLL (Windows Socket 2.0 Helper for Windows NT) – Needed to boot to Windows.

WSHTCPIP.DLL (Windows Sockets Helper DLL) – Essential to Internet Explorer

WSOCK32.DLL (Windows Socket 32-Bit DLL) – Needed for Internet Connectivity. Winsock (short for Windows Sockets) is a specification that defines how Windows network software should access network services, especially TCP/IP.

WTSAPI32.DLL (Windows Terminal Server SDK APIs) – Needed both to view the Automatic Updates tab in System Properties, and by Microsoft Update. Also needed to enter System Properties by right-clicking on My Computer and selecting Properties without receiving this error: This application has failed to start because WTSAPI32.DLL was not found. Re-installing the application may fix this. However, System Properties will open after clicking OK on the error message even without this file present.

wuaucpl.cpl (Automatic Updates Control Panel). Automatic Updates Control Panel applet – Needed by Microsoft Update.

wuapi.dll.mui (Windows Update Client API) – Needed by Microsoft Update.

WUAUCLT.EXE (Windows Update). An auto-update client – Needed by Microsoft Update.

wuauclt1.exe (Windows Update AutoUpdate Client) – Needed by Microsoft Update.

wuaucpl.cpl (Automatic Updates Control Panel applet) – Needed by Microsoft Update.

wuaucpl.cpl.mui (Automatic Updates Control Panel) – Needed by Microsoft Update.

wuaueng.dll (Windows Update AutoUpdate Engine) – Needed by Microsoft Update.

wuaueng.dll.mui (Windows Update Agent) – Needed by Microsoft Update.

WUAUENG1.DLL (Windows Update AutoUpdate Engine) – Needed by Microsoft Update.

wuauserv.dll (Windows Update AutoUpdate Service) – Needed by Microsoft Update. Main Service file for Automatic Updates.

WUCLTUI.DLL (Windows Update Client UI Plugin) – Needed by Microsoft Update.

wucltui.dll.mui (Windows Update Client UI Plugin) – Needed by Microsoft Update.

wupdmgr.exe (Windows Update Manager for NT) – Needed by Microsoft Update.

WUPS.DLL (Windows Update client proxy stub) – Needed by Microsoft Update.

wups2.dll (Windows Update client proxy stub 2) – Needed by Microsoft Update.

WUWEB.DLL (Windows Update Web Control) – Needed by Microsoft Update.

xmllite.dll (Microsoft XmlLite Library) – Needed by Internet Explorer 7 Toolbar. (Installed by Internet Explorer 7.)

xpsp1res.dll (Service Pack 1 Messages) – Needed to open Add/Remove Programs from the Control Panel.

XPSP2RES.DLL (Service Pack 2 Messages) – Needed to boot to Windows.

zipfldr.dll (Compressed (zipped) Folders) – Needed to package files in Compressed (zipped) form.

Prevents Screensaver and PC Locking

Well, I work on two PCs and group policy sets our screensaver and locking timeout. Quite often I would be working on PC1 for a few minutes and then PC2 would lock, so when I want to go back to PC2, I would unlock it. Then while I am on PC2, PC1 would lock. I found myself unlocking my PCs several times a day and it started to get annoying. I am all in favor of security and still lock my PCs when I leave my desk, but this little utility keeps them active while I am sitting here.

How does it work?

It is very simple. All it does is move your mouse one pixel to the left, and then one pixel to the right every 30 seconds. This tiny bit of movement is invisible to the user, but is enough to make Windows think that someone is using the PC.[gview file=”http://rmohan.com/wp-content/uploads/2014/05/NoSleep_0.zip”]

OpenSSL vulnerabilities

What is SSL?

SSL is a popular encryption technology to protect user privacy information transmitted via the Internet. When a user visits a secure Web site, such as Gmail.com, you will see a “lock” in the next URL address, show that you communicate information on the site is encrypted.

??This “lock” indicates that a third party can not read any communication of information between you and the site. In the background, through SSL encrypted data can be decrypted only recipient. If criminals monitor the user’s conversation, we can only see a bunch of random string, and can not understand email, Facebook posts, credit card numbers or other private information of the specific content.

SSL was first launched by Netscape in 1994, has been adopted by all major browsers since the 1990s. In recent years, many large network services have been the default use of this technology to encrypt data. Today, Google , Yahoo and Facebook are using the default SSL to encrypt their websites and web services.

 

What is a “bleeding heart” loophole?

Most SSL-encrypted websites using open source software package called for OpenSSL. This week, researchers announced that there are serious loopholes in the software, communications and information may result in the user’s exposure to the listener. OpenSSL has existed about two years ago this defect.

Works: SSL standard contains a heartbeat option that allows a computer to connect one end of the SSL issue a brief message, verify that the computer and the other end is still online, and get feedback. The researchers found that the heart can send a malicious message through clever means to deceive the computer and the other end of the disclosure of confidential information. The computer may be affected thereby deceived, and send the information in the server’s memory.

??The impact of the vulnerability so big?

Great, because there are a lot of private information is stored in server memory. Princeton University computer scientist Ed Phil Teng (Ed Felten) said that the attacker can use this technology through pattern matching sort of information, and to find keys, passwords, and credit card number and other personal information.

Lost credit card numbers and passwords much harm, believed to have been self-evident. But the consequences may be more severe stolen keys. This is a set of codes used to organize the information server encrypted information. If an attacker access to the server’s private key, you can read any of the information received, and even fake server using the key to deceive users into disclosing passwords and other sensitive information.

??Who found this problem?

The vulnerability was conducted by researchers Codenomicon and Google security sector independent discovery. In order to minimize the impact, the researchers have the OpenSSL team and other key insiders launched a co-publication of the issue before it is ready for repair program.

??Who can use the “bleeding heart” loophole?

“For people who understand this vulnerability to take advantage of them is not difficult.” Phil Teng said. Exploit the vulnerability of software on the Internet there are many, although the software is not as easy to use iPad application, but anyone with basic programming skills can learn to use it.

Of course, the value of this vulnerability is perhaps the largest intelligence agencies, they have enough infrastructure to expand the scale of user traffic interception. We know that the U.S. National Security Agency (hereinafter referred to as “NSA”) has signed a secret agreement with the U.S. carriers can enter to the Internet backbone. Users may think, SSL encryption technology, such as Gmail and Facebook on the site to protect them from eavesdropping, but it can make use of NSA “bleeding heart” loophole to obtain the private key to decrypt the communication of information.

Although it is not certain, but if the NSA before the “bleeding heart” vulnerability has been discovered this vulnerability made public, it is not surprising. OpenSSL is one of today’s most widely used encryption software, so you can be sure that, NSA security experts have been very carefully studied its source code. ‘

??How many sites are affected?

There is no specific statistics, but found that the vulnerability researchers noted that two of today’s most popular web server Apache and nginx uses OpenSSL. Overall, about two thirds of both total global server site. SSL is also used in other Internet software, such as desktop email clients and chat software.

The researchers found that the vulnerability has been notified a few days ago OpenSSL team and key stakeholders. This allows OpenSSL vulnerability to the day of the publication released a fixed version.To solve this problem, you need to install the latest version of the major sites OpenSSL soon as possible.

??Yahoo spokesman said: “Our team has been Yahoo’s major assets (including the Yahoo home page, Yahoo Search, Yahoo Mail, Yahoo Finance, Yahoo Sports, Yahoo cuisine, Yahoo Technology, Flickr and Tumblr) successful deployment of appropriate remedial measures We are currently working to repair measures for its deployment to other sites. “

Google said: “We have evaluated the SSL vulnerability, and critical services to Google patched.” Facebook said publicly at the time of the vulnerability, the company has solved this problem.

Microsoft spokesman said: “We are concerned about reports of OpenSSL problem if indeed affect our equipment and services, we will take the necessary measures to protect the user..”

??Users should be how to deal with this problem?

Unfortunately, if you visited the affected sites, users can not take any measures to protect themselves. Administrator of the affected site software needs to be upgraded in order to provide adequate protection for the user.

However, once the affected site to repair this problem, the user can change the password to protect themselves. The attacker may have intercepted the user’s password, but the user can not know whether their password has been stolen by others.

 

To be honest, I found the OpenSSL bleeding heart loophole for those who declare surprised. When I heard their statement, I think 64 KB of data is not enough to deduce the private key data as a class. At least on x86, the heap is to address the high growth, so I think it can only be read pointer pl read the newly allocated memory areas, such as regional pointer bp points. Storing the private key distribution and other information in the memory area allocated to the memory area as early as pointers pl points, so an attacker can not read those sensitive data.

 

 

Soon to be upgraded OpenSSL 1.0.1g version to fix the vulnerability.

Multiple Cisco products incorporate a version of the OpenSSL package affected by a vulnerability that could allow an unauthenticated, remote attacker to retrieve memory in chunks of 64 kilobytes from a connected client or server.

The vulnerability is due to a missing bounds check in the handling of the Transport Layer Security (TLS) heartbeat extension. An attacker could exploit this vulnerability by implementing a malicious TLS or Datagram Transport Layer Security (DTLS) client, if trying to exploit the vulnerability on an affected server, or a malicious TLS or DTLS server, if trying to exploit the vulnerability on an affected client. An exploit could send a specially crafted TLS or DTLS heartbeat packet to the connected client or server. An exploit could allow the attacker to disclose a limited portion of memory from a connected client or server for every heartbeat packet sent. The disclosed portions of memory could contain sensitive information that may include private keys and passwords.