Monday, March 31, 2014

Did you enter the wrong password multiple times in Weblogic Admin User? If answer is yes, then probably your account is locked for temporary period of time. If you tail the server log you can find the following error message. 

####     <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1395127313511>  

Message shows "User weblogic in security realm myrealm has had 5 invalid login attempts, locking account for 30 minutes." 

PROBLEM??? 

As the log mention issue should be resolved within 30 minutes, however if you do not want to wait that longer, then you need another admin account. There after you can use weblogic.Admin which is a command-line utility for managing WebLogic Server. Please follow the following steps: 

1. Make Sure that "weblogic.jar" is added in the CLASSPATH manually. You can do this or you can use the Script provided by WebLogic to do this. Script is available Here (<BEA_BOME>/<WL_HOME/server/bin/setWLSEnv.sh) 

cd /home/wls/bea/wlserver_10.3/server/bin/ 
. ./setWLSEnv.sh

NOTE: There are two Dots before the Script separated by a Single Space. First Dot represents that set the environment in the Current Shell and Second Dot represents that pick the Script from current Directory.

Output: 

CLASSPATH=/home/wls/bea/patch_wlw1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/wls/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/wls/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/wls/bea/jrockit_160_05/lib/tools.jar:/home/wls/bea/wlserver_10.3/server/lib/weblogic_sp.jar:/home/wls/bea/wlserver_10.3/server/lib/weblogic.jar:/home/wls/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/home/wls/bea/wlserver_10.3/server/lib/webservices.jar:/home/wls/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/wls/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:

PATH=/home/wls/bea/wlserver_10.3/server/bin:/home/wls/bea/modules/org.apache.ant_1.6.5/bin:/home/wls/bea/jrockit_160_05/jre/bin:/home/wls/bea/jrockit_160_05/bin:/usr/lib64/qt-3.3/bin:/usr/local/WebLogic/10.3.0.0/jrockit-R27.5.0-jdk1.6.0_03/bin:/usr/local/ant/1.6.5/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/home/wls/bea/jrockit_160_05/bin

Your environment has been set.

If you forget to add the jar in classpath you will receive the following message.

Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Admin
Caused by: java.lang.ClassNotFoundException: weblogic.Admin
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


2. Open a command Prompt (Shell Prompt) and then move to the <BEA_BOME>/<WL_HOME/server/bin directory and run the following Script.
 

java [<SSL trust options>] weblogic.Admin
        [ [-url | -adminurl] [<protocol>://]<listen-address>:<port>]
        -username <username> [-password <password>]
        <COMMAND> <ARGUMENTS>
       

Example: 


java weblogic.Admin -adminurl localhost:7001 -username admin2 -password password invoke -mbean Security:Name=myrealmUserLockoutManager -method clearLockout admin1

You will receive the message "OK" if command executed successfully.

Friday, March 28, 2014

Sometimes even if you deleted the large files for example log files created by Weblogic server, Apache Tomcat, Mysql and others disk space is not available in the system. It is because the file is being used by these applications and not able to release the space occupied by file.
In that case you have to identify the processes using these deleted files. To do so you can take the help of linux proc directory which is pseudo-file system used as an interface to kernel data structure. proc directory contains /proc/[pid]/fd subdirectory.
This subdirectory containing one entry for each file which  the  process  has open,  named  by  its  file descriptor, and which is a symbolic link to the actual file.  Thus, 0 is standard input, 1 standard output, 2 standard error etc.

Alright lets begin the work.
1. Type the following command in your bash shell

 ls -la /proc/*/fd/* 2>&1 | grep deleted  

Where
  • 2 is the default file descriptor for stderr.
  • 1 is the default file descriptor for stdout.
  • >& is shell syntax for "fold a file descriptor into another"
Here 2>&1 means redirect stderr(2) to stdout(1). At first, 2>1 may look like a good way to redirect stderr to stdout.  However, it will actually be interpreted as "redirect stderr to a file named 1". & indicates that what follows is a file descriptor and not a filename. So the construct becomes: 2>&

Output:
lrwx------ 1 root   root     64 Mar  7 03:20 /proc/1437/fd/3 -> /tmp/vmware-root/appLoader-1437.log (deleted)

lrwx------ 1 oracle oinstall 64 Mar  7 03:20 /proc/7550/fd/3 -> /tmp/vmware-oracle/appLoader-7550.log (deleted)

l-wx------ 1 root root 64 Mar 26 04:27 /proc/3675/fd/340 -> /usr/local/WebLogic/wlApps/mi/mi.8202/WebContent/WEB-INF/log/spring.log (deleted)


2. Here we identify 3 process ids 1437 ( from /proc/1437/fd/3), 7550 (from /proc/7550/fd/3) and 3675 (/proc/3675/fd/340) . We can grep these processes to identify which program actually using these files. Let's grep one process.

ps aux | grep 3675 
Output:
root      3675  0.5 14.8 5573700 2448684 ?     Sl   Mar03 200:54 /usr/local/WebLogic/10.3.0.0/jrockit-R27.5.0-jdk1.6.0_03/bin/java -jrockit -Xms2g -Xmx2g -Xverify:none -da -Dplatform.home=/usr/local/WebLogic/10.3.0.0/wlserver_10.3 -Dwls.home=/usr/local/WebLogic/10.3.0.0/wlserver_10.3/server -Dweblogic.home=/usr/local/WebLogic/10.3.0.0/wlserver_10.3/server -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/usr/local/WebLogic/10.3.0.0/patch_wlw1030/profiles/default/sysext_manifest_classpath:/usr/local/WebLogic/10.3.0.0/patch_wls1030/profiles/default/sysext_manifest_classpath:/usr/local/WebLogic/10.3.0.0/patch_cie660/profiles/default/sysext_manifest_classpath -Dweblogic.Name=mi.8202 -Djava.security.policy=/usr/local/WebLogic/10.3.0.0/wlserver_10.3/server/lib/weblogic.policy weblogic.Server

Output shows Weblogic Server version 10.3.0.0 using the file /usr/local/WebLogic/wlApps/mi/mi.8202/WebContent/WEB-INF/log/spring.log.

3. Now we have to kill this process to regain our space.
 kill -9 3675 

Monday, March 17, 2014

There are various ways to identify how long the widows system has been running . Some of the methods are listed below.

1) To find the uptime in graphical ways just open up Task Manager by right clicking the Taskbar and selecting Task Manager.


Click on the Performance tab of Task Manager and you will see the amount of up-time listed under the System section.


2) In Command line method Start Run (Windows Key + r) and type cmd and click ok. 


In command prompt type "systeminfo" without the quotes and hit enter. It will take some time to complete the analysis process and get the results.  In the list you will see the System Boot Time listed in mm/dd/yyyy hh:mm:ss AM/PM format. If  you want to list only boot time type systeminfo | find "Boot Time"



 3) We can also find the uptime using following commands.

net statistics server
net statistics workstation

net stats server
net stats workstation

net stats srv | find "Statistics"


Thursday, March 13, 2014

www.blogger.com is one of the widely known, Google’s hosted blogging platform, which also allow you to make money from the ads if your site mange to find a large enough audience to make it worthwhile. The default domain name provided by blogger is of pattern myblog.blogspot.com.  The best part with blogger is it will allow you to use your custom domain name and help you to brand your product. You can find a lot of articles which provide you the necessary information to use custom domain name for your blog with different domain provider.

This article mainly focuses on creating your custom domain with ohodomain.com  domain provider. When you purchase a domain from ohodomain.com,they assign an IP address (A record and CNAME record) for the domain. Hence, you need to change those records to point to your Blogger.com blog. This post can help you to change the A and CNAME records of your OhoDomain account.

The overall process include following steps:
1. Purchase a domain name from shop.ohodomain.com.
2. Create a domain in www.blogger.com.
3. Create A-record and CNAME entry in ohodomain.com

1. Purchase a domain name from shop.ohodomain.com
Process is very straight forward, go to the shop.ohodomain.com, register and purchase a domain name you wish to desire. Currently they accept e-sewa, NIBL and Paypal online payment method. If you want to purchase domain from Nepal, e-sewa and NIBL payment is the best option.

2. Create a domain in www.blogger.com.
Now go to the blogger.com, if you already have google account (One account. All of google, ya that's their motto.) no need to signup otherwise you have to create a google account. Once register create a blog from blogger dashboard.


Click on "New Blog" to create a blog


Now go to settings page of newly created blog.


Click on "Add custom domain" to point your "googlecustomblog.blogspot.com" to www.customdomain.com. Google will suggest you to create two CNAMEs entry on your domain registrar's

3. Create A-record and CNAME entry in ohodomain.com. Log on to ohodomain.com and search for domain you have created.

Click on "DNS Management" menu and finally click on "Manage DNS" section, where you can create A-record entry and CNAMEs entry.

ghs.google.com is same for all domain while second CNAMEs is different for each domain.
C-NAMEs
Enter your domain name in the format customdomain.com, and list the I.P. addresses shown below in the "A" section. You'll need to create four separate A-records which point to four different Google IPs.
216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21

A-Record

One last steps go to blogger setting page again and redirect customdomain.com to www.customdomain.com otherwise visitors who leave off the "www" will see an error page.


That's it you have done, obviously it took some times or may be 1-2 days to complete the whole process. 

Categories

.
Powered by Blogger.

Popular Posts

Like Us