Tuesday, October 18, 2011

Patch 144325-01 failed to install due to a failure produced by pkgadd.

Patching the Solaris 10 Sparc to the latest patch level.
While patching the server I got this error and tried to search internet, Got some answers But they were contradicting each other.
Hence thought jotting down the issue here so that, this blog will act as a reference material for me and many other in case.....
1.
-bash-3.00$ metastat -c
d4 m 10GB d40 d41
d40 s 10GB c1t0d0s4
d41 s 10GB c1t1d0s4
d3 m 10GB d30 d31
d30 s 10GB c1t0d0s3
d31 s 10GB c1t1d0s3
d1 m 27GB d10 d11
d10 s 27GB c1t0d0s0
d11 s 27GB c1t1d0s0


metadb metadetach metadevadm
bash-3.00# metadetach d1 d11
d1: submirror d11 is detached
bash-3.00# metadetach d3 d31
d3: submirror d31 is detached
bash-3.00# metadetach d4 d41
d4: submirror d41 is detached
bash-3.00# metastat -c
d4 m 10GB d40
d40 s 10GB c1t0d0s4
d3 m 10GB d30
d30 s 10GB c1t0d0s3
d1 m 27GB d10
d10 s 27GB c1t0d0s0
d41 s 10GB c1t1d0s4
d31 s 10GB c1t1d0s3
d11 s 27GB c1t1d0s0

2. copy the output of various commands like...

# cat /etc/vfstab ; ulimit -a ; mount ; df -h ; sysdef -i; prtconf > /tmp/prepatch_`hostname`.txt

3. Boot the system in # init 0

4. at ok prompt ok boot -s

5 Assuming that the patches have already been copied to the desired location.

6. Once I hooked the script got the following error:

Approved patches will be installed in this order:

144325-01


Checking installed patches...
Executing prepatch script...
Verifying sufficient filesystem capacity (dry run method)...

Patch 144325-01 failed to install due to a failure produced by pkgadd.

See /var/sadm/patch/144325-01/log for details

Patchadd is terminating.

some of the post suggested to add the "install" account and "nobody"
account. this did not help. But while patching previous server I did not got this type of error, so just tried to recall what different I did here. Got it!

While copying the patches on the server to be patched I always created a dir with 777 permissions and will then delete, once done.

This time I had created a dir 766 and that was causing this error so ran.....

# chmod -R 777 /patch

# ./patchadd

that's it!

Happy patching.

Wednesday, August 31, 2011

Apache Tomcat 5.5.33 installation on RedHat Linux 5.4



Download the following 2 files from the

http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html

http://apache.mesi.com.ar/tomcat/tomcat-5/v5.5.33/bin/apache-tomcat-5.5.33.tar.gz

http://apache.mesi.com.ar/tomcat/tomcat-5/v5.5.33/bin/apache-tomcat-5.5.33-admin.tar.gz

[root@rajphx tmp]# pwd
/tmp

[root@rajphx tmp]# ls -ltr /tmp/

-rw-rw-r-- 1 test test 81030452 Aug 30 23:52 jdk-7-linux-i586.rpm
-rw-rw-r-- 1 test test 6531699 Aug 30 23:53 apache-tomcat-5.5.33.tar.gz

[root@rajphx tmp]# rpm -ivh jdk-7-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
plugin.jar...
javaws.jar...
deploy.jar...


Now....

Add following line once the jdk is installed. This rpm contains both JAVA runtime and development package.

vi /etc/java/java.conf

JAVA_HOME="/usr/java/jdk1.7.0"

# export JAVA_HOME=/usr/java/jdk1.7.0/

I have copied the apache tomcat tar file in the /opt/tomcat. This may vary as per the requirement.
May be you can install in /var as per the production requirement. But this depends.

[root@rajphx tomcat]# ls -l
total 10888
drwxr-xr-x 11 root root 4096 Aug 31 01:05 apache-tomcat-5.5.33
-rw-r--r-- 1 root root 2918400 Aug 31 01:04 apache-tomcat-5.5.33-admin.tar
-rw-r--r-- 1 root root 8205713 Aug 31 00:59 apache-tomcat-5.5.33.tar.gz



[root@rajphx bin]# ./startup.sh
Using CATALINA_BASE: /opt/tomcat/apache-tomcat-5.5.33
Using CATALINA_HOME: /opt/tomcat/apache-tomcat-5.5.33
Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-5.5.33/temp
Using JRE_HOME: /usr/java/jdk1.7.0/
Using CLASSPATH: /opt/tomcat/apache-tomcat-5.5.33/bin/bootstrap.jar
[root@rajphx bin]# ps -ef | grep tomcat
root 10390 1 99 01:00 pts/1 00:00:08 /usr/java/jdk1.7.0//bin/java -Djava.util.logging.config.file=/opt/tomcat/apache-tomcat-5.5.33/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/apache-tomcat-5.5.33/common/endorsed -classpath /opt/tomcat/apache-tomcat-5.5.33/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat/apache-tomcat-5.5.33 -Dcatalina.home=/opt/tomcat/apache-tomcat-5.5.33 -Djava.io.tmpdir=/opt/tomcat/apache-tomcat-5.5.33/temp org.apache.catalina.startup.Bootstrap start
root 10432 9365 0 01:00 pts/1 00:00:00 grep tomcat


Now accessthe apache tomcat by typing this in your browser window.

http://192.168.1.332:8080/

Friday, June 24, 2011

How to find the heap size in weblogic 10.2 ?

I had this question asked by one of our developer. reaserched on Internet But could not find the straight answer. The output I was trying to get was on command line
with JAVA, looks like there is a java program available on internet. But did not wanted to put that on the server, as I am not a JAVA developer :-)

The simple way i found the information is:
Go to the actual installation path of Weblogic and find the files ending by extension .ini OR .cf. I am not sure if this is application specific. And grep

bash-3.00$ grep -i MaxPermSize *

HEAP="-Xms512m -Xmx768m -XX:NewSize=86m -XX:MaxPermSize=256m"

so you need to be in the folder where the configuration files of the Weblogic are residing.

Tuesday, July 27, 2010

Running VNC Server as non-root user - solaris 10



I could not find the info associated with running VNCServer as a non-root user on the internet hence I thought sharing this with you guys.

The Operating system is solaris 10 X86.

-bash-3.00$ uname -a
SunOS unknown 5.10 Generic_141445-09 i86pc i386 i86pc

bash-3.00# pkginfo | grep -i vnc
system SUNWvncviewer VNC viewer client
system SUNWxvnc X11/VNC server

1. Login as normal application user.

2. Sun Microsystems Inc. SunOS 5.10 Generic January 2005
-bash-3.00$ id
uid=1234(rajapp) gid=1000(users)
-bash-3.00$ pwd
/apps/users/rajapp
-bash-3.00$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth: creating new authority file /apps/users/rajapp/.Xauthority

New 'unknown:2 (rajapp)' desktop is unknown:2

Creating default startup script /apps/users/rajapp/.vnc/xstartup
Starting applications specified in /apps/users/rajapp/.vnc/xstartup
Log file is /apps/users/rajapp/.vnc/unknown:2.log

3. Make sure that the process is running -

-bash-3.00$ ps -ef | grep -i vnc
root 2204 1 0 17:20:16 ? 0:00 vncconfig -iconic
root 2200 1 0 17:20:12 ? 0:07 Xvnc :1 -desktop unknown:1 () -auth //.Xauthority -geometry 1024x768 -depth 16
rajapp 2375 1 0 17:46:40 pts/2 0:06 Xvnc :2 -desktop unknown:2 (rajapp) -auth /apps/users/rajapp/.Xauthority -geome
rajapp 2379 1 0 17:46:45 pts/2 0:00 vncconfig -iconic

4. open vncviewer on your windows desktop and enter the hostname OR Ip address as follows hostname:2, ipaddress:2 you can try both ways if the hostname is not set.









It would be great if this post helps you any ways.

Thanks. thats it for today.

Monday, June 7, 2010

Installng RSYNC version 3.0.7 on SunOS 5.10 X86.

While installing RSYNC on Solaris 10 X86, I kept getting the following error message. I searched on internet but did not fnd the straight answer hence I am posting this stuff here.

bash-3.00# rsync
bash-3.00# rsyncld.so.1: rsync: fatal: libgcc_s.so.1: open failed: No such file or directoryKilled
Killed

To take care of this error make sure that you have following packages installed on your system using 'pkgadd' command.

1.rsync-3.0.7-sol10-x86-local. 2.libiconv-1.13.1-sol10-x86-loca. 3.libgcc-3.4.6-sol10-x86-local

$gunzip rsync-3.0.7-sol10-x86-local.gz
$pkgadd -d rsync-3.0.7-sol10-x86-local

$gunzip libiconv-1.13.1-sol10-x86-local.gz
$pkgadd -d libiconv-1.13.1-sol10-x86-local

$gunzip libgcc-3.4.6-sol10-x86-local.gz
$pkgadd -d libgcc-3.4.6-sol10-x86-local

-----------------------------------------------------------


The above packages can be obtained from sunfreeware.com.

You can find RSYNC installed in /usr/local/bin/rsync.

bash-3.00# rsync -version
rsync version 3.0.7 protocol version 30

------------------------------------------------------------

Friday, December 11, 2009

Unix / Linux System Admin tasks

Hello Readers, This was a pending task I always wanted to start blogging, so that I will post what ever system admin activities like Installation, Configuration, Troubleshooting etc.. I am doing every day. This way it would be a sort of tracking page for me and others who are intrested for reference. So lets start..............