Labels

Wednesday, March 27, 2013

How to Increasing the heap size (virtual memory) for JBoss in Quality Center

For Windows, you can increase the heap size by uninstalling/reinstalling the Quality Center Service and modifying the InstallJbossService.bat file. For Linux/Unix, you need to modify the run.sh file.
Recommended heap sizes, depending on the number of concurrent user sessions:
Small: 128 - 256MB ~ Up to 10 concurrent user sessions

Medium: 256 - 512MB ~ Up to 100 concurrent user sessions

Large: 512 - 1024MB ~ Up to 250 concurrent user sessions

Very Large: 1024 - 2048MB ~ Up to 350 concurrent user sessions
Notes:

The max value cannot be more than your max RAM size.

On any Windows 32-bit installation you cannot set a heap size larger than 1024 MB of RAM.

Uninstall/Reinstall QC Service for Windows:
Note: Verify that users are not working on Quality Center and Quality Center Service is stopped. 1. Open Command Prompt and navigate to "<Drive Letter:>\program files\Mercury Interactive\Quality Center\jboss\bin" folder.
Note: For Quality Center 9.0 and 9.2 the path is "<Drive Letter:>\program files\Mercury\Quality Center\jboss\bin"
           For Quality Center 10 the path is "<Drive Letter:>\program files\HP\Quality Center\jboss\bin

2. Execute the following command (this will uninstall the existing service):
   InstallJbossService.bat -uninstall
3.Edit the InstallJbossService.bat file.
Example:
If the heap memory is currently:
   set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m
increase the heap size as follows:
   set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m
4. Save and close the InstallJbossService.bat.
5. Execute the following command (this will install the service with the modified heap size parameter):
   InstallJbossService.bat -c default (-help shows options)
6. Verify that the service has been installed, Control Panel -> Administrative Tools -> Services.
7. Start the Quality Center Service.
8. Check that the Quality Center Debug Console shows heap size that was specified as available memory:

For Quality Center 9.0 and 9.2:
   http://hostname:8080/qcbin/servlet/tdservlet?method=debuginfo
   http://hostname:8080/sabin/servlet/tdsiteadminservlet?method=debuginfo

For Quality Center 10:
   http://hostname:8080/qcbin/debug

Notes:

If you are using a cluster environment, the hostname should be the cluster machine name, and you will need to apply the above steps to each cluster.

Also edit the run.bat file to ensure it is synchronized with the way the QC service runs.

Add the following parameter in site administration's 'Site Configuration' tab to grant access to the debug info log:
     Name: DISABLE_CONSOLE_DEBUG_INFO
     Value: N Modify the run.bat file:
1. On the application server, locate the JBoss bin folder under your TD for QC installation. By default, the location is <System Drive:>\Program Files\Mercury Interactive\Quality Center\JBoss\bin. Note: For Quality Center 9.0 and 9.2 the path is <System Drive:>\Program Files\Mercury\Quality Center\JBoss\bin.
           For Quality Center 10 the path is <System Drive:>\Program Files\HP\Quality Center\JBoss\bin
2. Edit the run.bat file (or run.sh for Linux/Unix).
Example:
If the heap memory is currently:
   set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m
increase the heap size as follows:
   set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m
3. Save and close the run.bat.
4. Execute the run.sh file only for Linux/Unix.

Tuesday, March 12, 2013

step by step how to Configure Apache Webserver with Weblogic Server

Step 1) Make sure the Apache server runs on port 8080.( This is because sometimes IIS, or some antivirus s/w runs on that port).This can be done by modifying the httpd.conf present at
D:\Program Files\Apache Group\Apache2\conf
Modify the Listen port to 8080
Listen 8080
Step 2) Copy the mod_wl_20.so from <bea_home>\wlserver_10.3\server\plugin\win\32 to
D:\Program Files\Apache Group\Apache2\modules
Step 3) Add these lines in the httpd.conf file
LoadModule weblogic_module modules/mod_wl_20.so
<Location />
SetHandler weblogic-handler
</Location>
<IfModule mod_weblogic.c>
WebLogicCluster localhost:7003,localhost:7005
Debug ON
WLLogFile c:/temp/wlproxy.log
WLTempDir c:/temp
</IfModule>
Step 4) Restart Apache and access the application deployed on the Cluster using
http://localhost:8080/YourApp
This will forward the request to the Weblogic Cluster

Saturday, March 9, 2013

How to upgrade Java version from 1.6 to 1.7

Step 1: First download the tar file of java ( jre-7u5-linux-i586.tar.gz) using below URL

Step 2: tar -zxvf /Path to 'jre-7u5-linux-i586.tar.gz'/
 
Step 3: Move extracted folder to /usr/lib/jvm

#sudo cp -r jre1.7.0_05 /usr/lib/jvm/
Step 4: Install java now
#sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jre1.7.0_05/bin/java 3

 
Step 5: Now choose the upgraded java version from :-
#sudo update-alternatives –config java

 

We have to select 4 for my system.. choose :- /usr/lib/jvm/jdk1.7.0_04/bin/java
Step 6: Now create a soft link:-
#sudo ln -s /usr/lib/jvm/jre1.7.0_05/lib/i386/libnpjp2.so ~/.mozilla/plugins/

Step 7: Now check java version with the below command
#sudo java -version
you should get 1.7 java version in the output.

Tuesday, March 5, 2013

LDAP and how is it used by Weblogic server?

Lightweight Directory Access Protocol (LDAP) is a protocol that programs use to look up contact information from a server. Much like a relational database, every LDAP database (or directory) has a schema. An LDAP schema is implemented as a set of object class definitions and attribute definitions.
Some common terms used in LDAP are:
  • dc= domain component
  • o = organization
  • ou= organizational unit
  • cn= common name
  • dn= distinguished name
  • uid= user id
When you need to search for an entry in LDAP, you must provide the base of the search and a filter.
For example:
ldapsearch -b "dc=beasys,dc=com" uid=fred
This will return all the attributes of the user who has uid=fred as specified in the filter:
uid=fred,ou=People, dc=beasys,dc=com   //this is what is referred to as Full DN
objectClass=top
objectClass=person
objectClass=organizationalPerson
objectClass=inetorgperson
givenName=Fred
cn=Fred A
uid=fred
sn=A
creatorsName=uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot
modifiersName=uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot
createTimestamp=20040108160418Z
modifyTimestamp=20040108162837Z

This entry is seen in the LDAP tree as the following:

dc=beasys,dc=com
/     (root)          \
/                          \
/                             \
ou=people             ou=otherusers
/
uid=fred

WLS can read and search information from an external directory server, giving it the right configuration information to connect, bind, search (base and filter), etc.

For this you need to configure the following fields in WLS:
  • LDAP server host and port
  • Principal/password used to connect and make the search
  • User Base DN: used as a base when making a user search
  • User filter: used as a filter when making a user search
  • Group Base DN: used as a base when making a group search
  • Group filter: used as a filter when making a group search
  • Group membership filter: used as a filter when doing a search to find groups a user belongs to
Within these fields, you can find the following characters:
%u is replaced by the user id
%g is replaced by the group
%M is replaced by the Full DN of the user

When WLS needs to verify that a user exists and has privilege/role to access a resource, it connects to LDAP using the principal defined and then does a search on the user, verifies that it exists, and authenticates using its password. After that, it searches the groups the user belongs to.
Following is some concise pseudocode for the membership check algorithm:
check_membership(group g, principal p):
for each group g1 that contains p directly:
if g1 == g or check_membership(g, g1)
then return success
return failure

Once this is done, WLS verifies if the user that belongs to the groups found has the privilege/role to access the resource requested, and based on that either permits the access or denies it.

Common LDAP servers used in WLS

The common LDAP servers used in WLS (as authentication providers) are:
  • Default Authenticator (Embedded LDAP)
  • IPlanet
  • Active Directory
  • OpenLDAP
  • Novell

Thursday, February 14, 2013

How Secure Sockets Layer (SSL) will Works?

What Happens When a Browser Encounters SSL

  1. A browser attempts to connect to a website secured with SSL.
  2. The browser requests that the web server identify itself.
  3. The server sends the browser a copy of its SSL Certificate.
  4. The browser checks whether it trusts the SSL Certificate. If so, it sends a message to the server.
  5. The server sends back a digitally signed acknowledgement to start an SSL encrypted session.
  6. Encrypted data is shared between the browser and the server.

Encryption Protects Data During Transmission

Web servers and web browsers rely on the Secure Sockets Layer (SSL) protocol to help users protect their data during transfer by create a uniquely encrypted channel for private communications over the public Internet. Each SSL Certificate consists of a key pair as well as verified identification information. When a web browser (or client) points to a secured website, the server shares the public key with the client to establish an encryption method and a unique session key. The client confirms that it recognizes and trusts the issuer of the SSL Certificate. This process is known as the "SSL handshake" and it begins a secure session that protects message privacy and message integrity.
Strong encryption, at 128 bits, can calculate 288 times as many combinations as 40-bit encryption. That's over a trillion times stronger. At current computing speeds, a hacker with the time, tools, and motivation to attack using brute force would require a trillion years to break into a session protected by an SGC-enabled certificate. To enable strong encryption for the most site visitors, choose an SSL Certificate that enables 128-bit minimum encryption for 99.9 percent of website visitors.

Credentials Establish Identity Online

Credentials for establishing identity are common: a driver’s license, a passport, a company badge. SSL Certificates are credentials for the online world, uniquely issued to a specific domain and web server and authenticated by the SSL Certificate provider. When a browser connects to a server, the server sends the identification information to the browser.
To view a websites’ credentials:
  • Click the closed padlock in a browser window
  • Click the trust mark (such as a Norton Secured Seal)
  • Look in the green address bar triggered by an Extended Validation (EV) SSL certificate

Authentication Generates Trust in Credentials

Trust of a credential depends on confidence in the credential issuer, because the issuer vouches for the credential’s authenticity. Certificate Authorities use a variety of authentication methods to verify information provided by organizations. Symantec, the leading Certificate Authority, is well known and trusted by browser vendors because of our rigorous authentication methods and highly reliable infrastructure. Browsers extend that trust to SSL Certificates issued by Symantec.

Extend Protection beyond HTTPS

Symantec SSL Certificates offer more services to protect your site and grow your online business. Our combination of SSL, vulnerability assessment and daily website malware scanning helps you provide site visitors with a safer online experience and extend security beyond https to your public-facing web pages. The Norton Secured Seal and Symantec Seal-in-Search technology help assure your customers

Monday, February 4, 2013

Java Heap Size Adjustment

If you observe an OutOfMemoryError in the garbage collection logs, try increasing the Java heap size to 80% of the physical memory you have available for the JVM.   Based on whether the old generation space or the permanent generation space is running out of memory, you adjust the sizes of heap spaces in this way[10]:

  • For old generation space OutOfMemoryErrors
    • increase -Xms and -Xmx
  • For permanent generation OutOfMemoryErrors
    • increase -XX:PermSize and -XX:MaxPermSize

Wednesday, January 23, 2013

Useful VI search and Replace Linux commands

Search

/word
Search word from top to bottom
?word
Search word from bottom to top
/jo[ha]n
Search john or joan
/\< the
Search the, theatre or then
/the\>
Search the or breathe
/\< the\>
Search the
/\< ¦.\>
Search all words of 4 letters
/\/
Search fred but not alfred or frederick
/fred\|joe
Search fred or joe
/\<\d\d\d\d\>
Search exactly 4 digits
/^\n\{3}
Find 3 empty lines
:bufdo /searchstr/
Search in all open files

Replace

:%s/old/new/g
Replace all occurences of old by new in file
:%s/old/new/gw
Replace all occurences with confirmation
:2,35s/old/new/g
Replace all occurences between lines 2 and 35
:5,$s/old/new/g
Replace all occurences from line 5 to EOF
:%s/^/hello/g
Replace the begining of each line by hello
:%s/$/Harry/g
Replace the end of each line by Harry
:%s/onward/forward/gi
Replace onward by forward, case unsensitive
:%s/ *$//g
Delete all white spaces
:g/string/d
Delete all lines containing string
:v/string/d
Delete all lines containing which didn’t contain string
:s/Bill/Steve/
Replace the first occurence of Bill by Steve in current line
:s/Bill/Steve/g
Replace Bill by Steve in current line
:%s/Bill/Steve/g
Replace Bill by Steve in all the file
:%s/\r//g
Delete DOS carriage returns (^M)
:%s/\r/\r/g
Transform DOS carriage returns in returns
:%s#<[^>]\+>##g
Delete HTML tags but keeps text
:%s/^\(.*\)\n\1$/\1/
Delete lines which appears twice
Ctrl+a
Increment number under the cursor
Ctrl+x
Decrement number under cursor
ggVGg?
Change text to Rot13