Wednesday, December 22, 2010

Useful solaris command to view server availability

As you know,

ps -ef|grep java

it will provide you the following output,

admin 6412 15489 0 15:21:29 ? 92:18 /opt/weblogic-9.2.3/jdk150_12/bin/java -client -Xmx512m -XX:MaxPermSize=256m -c

we can not able to see the full java command which is used to start weblogic server, like server name and memory otpions, location of the server and classpath.

To get these information, you can use the following command,

$/usr/ucb/ps -auxww
This command will display all process in the solaris machine with whole java command including classpath, server options, java options, memroy settings.

from this you can search the process id of weblogic server by its server name ,
$/usr/ucb/ps -auxww|grep serverName

It will display only your weblogic server parameters from the all process.

In a solaris machine if multi java process running, then this command will help you to get your server paramerters by simple search options.


Saturday, December 18, 2010

Customize your weblogic server


We knew that, the following lines will start a weblogic server, here we can see how we can customize the settings for weblogic. Here setMyEnv.sh is a file will set the values for your weblogic server, it’s a text file which we can create.

#Start WebLogic server
. "./setMyEnv.sh"
echo Starting server...
nohup "${JAVA_HOME}/bin/java" ${JAVA_VM} ${MEM_ARGS} -cp ${CLASSPATH} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Dweblogic.ProductionModeEnabled=${PRODUCTION_MODE} -Djava.security.policy="${WL_HOME}/server/lib/weblogic.policy" weblogic.Server 1>>logs/weblogic-console.log 2>&1 &

some points about server startup script

. "./setEnv.sh" – first setEnv.sh file will be executed and the variables will be set then the remaining lines will be executed.


Normally the setMyEnv.sh will call commonEnv.sh of weblogic, the following variables will be set in setMyEnv.sh file,


${JAVA_VM} – It will provide the Java vendor, whether it is Java hot spot or JRockit
${MEM_ARGS} – It will provide the value for initial and maximum memory setting for your weblogic server, the value depends on your hardware and java vendor
${CLASSPATH} – It will provide the classpath Jar files which are required to run your application, here you can add your Library files.
${JAVA_OPTIONS} – There are some pre-defined options which you can pass to weblogic server


-Dweblogic.Domain=${WLS_DOMAINS}
Here you can specify the domain name


-Dweblogic.security.anonymousUserName=guest
User guest can enter into console of the weblogic for read operation

-Dweblogic.allow.lookup.weblogic.jndi=everyone

Any one can look up any JNDI name if they have initial context.

- Dweblogic.allow.lookup.weblogic.jndi.weblogic.management.home
=everyone

Any one can look up JNDI names for Management of weblogic server, like monitoring purpose


Configuration for SSL:
-Djavax.net.ssl.trustStore=${MY_APP_HOME}/ssl/MyAppTrustStore.jks


Here you can specify the certificates for ssl, automatically weblogic will create a keystore and ssl certificates configuration on the weblogic console.

The same way we can specify for keystore also.
-Djavax.net.ssl.keyStore=${ MY_APP_HOME }/ssl/MyAppKeyStore.jks


Configuration for JMS Bridge:
-Dweblogic.debug.DebugMessagingBridgeStartup=true


For Memory arguments:
MEM_ARGS="-Xmx512m -XX:MaxPermSize=512m"

For all weblog.Server options please refer the following site,
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/admin_ref/weblogicServer.html#wp1008628

License issue in weblogic

We migrated our application from old machine to new machine after that we got an issue, some users not able to access the application and they are getting a error message as
“web page not authenticated to display” and they got error code as 403.

We got the following log message in server log

#### DynamicListenThread[Default] <> <> <> <> <1292597967156> Connection rejected, the server license allows connections from only 5 unique IP addresses.

First we thought, its related to application license and we sent this to application team, but they told, its not their issue.

In the log message there is no application related information and there is a error code

We got the error code description from the following site,
http://download.oracle.com/docs/cd/E13222_01/wls/docs90/messages/Server.html


But we didn’t get any clue, why we are getting this issue. Then we tried to look into the license file of the weblogic.

In the license file, its clearly mentioned that, servlet session for only 5 units.

component="Servlet Session"
cpus="unvalued"
expiration="never"
ip="any"
licensee="BEA Evaluation Customer"
serial="616351266349-2030864056716"
sessions="unlimited"
type="SDK"
units="5"
signature="MCwCFE7tDgaAw2zNpvoMIn0MqtUoBjk2AhR3TgeRWbb6sQWvRgrh8rCZyfG0Qg=="
/>

Root cause of the issue is weblogic license file.







We have updated the license file with the old weblogic installation.


component="Servlet Session"
cpus="unvalued"
expiration="never"
ip="any"
licensee="Customer"
serial="454493271161-2646859048"
sessions="unlimited"
signature="MC0CFLx94IvLftg7XVEvQIUeAjR0VFg3fR3XSQhT7Opi47Hgig="
type="RTK"
units="unlimited"
/>

Last time we have installed the demo version instead of rela product version.

We have upated the license file with the product version, issue resolved.

Wednesday, December 15, 2010

License for weblogic

After the acquision of weblogic from BEA, Oracle changed the license files too, oracle removed the Expiration Date for the license, after they removed the whole license file,

but license file will be useful to understand, what are the components, are used in weblogic, like,

whether this production contains the Clustered JMS or not ?,
and what is the version of EJB (1.0, 2.0, 2.1)is supporting ?

based on this, we can understand about product details. so it seems, oracle removed the license file, but oracle having a single license file,in their support site,

to list the components of weblogic server for all version...

to get your components list or license file, please use this URL,
http://www.oracle.com/us/support/licensecodes/bea/index.html

weblogic Interview Questions 2

1. What is meant by channeling and define the default channeling?
2. What is the advantage of cluster constraints?
3. Explain the role of machines in weblogic?
4. Define the importance of Node manager and write the procedure involved in configuring the node manager?
5. What is meant by Keep-alive (on) and Keep alive time-out in HTTP Server?
6. Explain the logging mechanism in weblogic?
7. Can we do partial deployment in weblogic cluster?please explain in detail..
8. Can we separate managed servers from the cluster? explain in detail?
9. Define the 2 phase commitment protocol?
10. Define the steps involved in FTP a file from your local desktop to client machine?
11. How do we monitor the weblogic application server health?
12. What is meant by JDBC statement cache and the default value?
13. What Is meant by default config archive and how many back-ups would be created?
14. What is meant by connection leak and how to set the default connection time out ?
15. What is the use of execute queues?
16. What is meant by dispatch policy?
17. How to check whether a cluster multicast address is available or not ?
18. What is the default location of the log files?

Tuesday, December 14, 2010

Weblogic Interview Questions


1. What are the versions of weblogic you have worked on?

2. Differences between 7.0 and 8.1, 8.1 and 9.0.

3. How do you upgrade from 8.1 to 9.0 or 9.1.

4. What is a cluster. How does a weblogic cluster work.

5. what do u know about jdbc connection pool, data source, multipool

6. how many applications have you managed.

7. what are the web servers you have worked on.

8. what would you do when a server is hung ?

9. what is load balancing and failover.

10. what is session state replication and how does weblogic manages it ?

11. what is jms used for.

12. what are the differences between queues and topics.

13. explain a production problem you have faced and how did you handle that. (answer to this question decides 50% of your chances to get the job)

14. how do you take thread dumps.

15. what are execute queues.

16. what do you know about them ?

There are some good questions on unix.

1. what is your level of comfort on unix?

2. what are the regular commands you use on unix.

3. what are the commands you can use to read a file.

4. how do you find whether a process is running or not.

5. how do find the network statistics, io statistics. memory utilization, cpu utilization.

6. do you have exp in writing shell scripts, perl and ant ?

There could be some java questions too.

1. what are ejbs and how many types.2. what is a servlet.

Introduction about this site


This site will provide the following information it will helpful to beginners and devlopers who is interested on weblogic administration,
From the experience of weblogic administration and different hands on with public training and corporate training, I am interested to post my experience on this site.
Please add your comments.

Followers