Monday, August 22, 2011

Http Server Error Message Exception KeyError Unable To Change Directory

After I configure http service.While I restart the service.
I got the following error message.
[root@rhel6 ~]# /etc/init.d/httpd start
Starting httpd:                            [FAILED]
1)read the log file
2)#cat /var/log/httpd/error_log | grep error
) in ignored
[Thu Feb 24 12:20:19 2011] [error] Exception KeyError: KeyError(140472509999072,) in ignored
[Thu Feb 24 12:20:19 2011] [error] Exception KeyError: KeyError(140472509999072,) in ignored
PROBLEM
Unable to find the python script
SOLUTION
1)create the Soft link for the python script
#ln -s /usr/local/lib/libpython2.6.so.1.0 /usr/lib64/libpython2.6.so.1.0
#ln -s /usr/local/bin/python2.6 /usr/bin/python2.6
Then try it, if you still face the error message.
Read the log message


2)#cat /var/log/httpd/error_log | grep error
ERROR MESSAGE
[Thu Feb 24 12:20:20 2011] [error] Unable to change directory to /root
SOLUTION
In these case /root is Present Working Directory PWD.
change the present working directory then try it.
Depend upon the log message we need to clear the problem.
read more "Http Server Error Message Exception KeyError Unable To Change Directory"

Install Package With Configure Make Make Install .tgz Command

Most of Linux Open Source Software Package come with .tgz tarball format.
These Packages install with three command
1)./configure
2)make
3)make install


./configure
a)configure it is just shell script
b)configure it check lot of dependency on the current system.
c)output it has short question with [YES/NO] answer.
d)if any of the major requirement is missing then it will not continue.
e)if it is fulfill there requirement,Then
it will build new Make file.
SAMPLE CONFIGURE OUTPUT
checking for memory.h... yes
checking whether struct hostent contains h_addr_list... yes
checking that we can build MPI programs with Fortran 77... no
MAKE
while we run the make command first it is look for makefile then it will build there program as per makefile instruction,
if the make run successfully, then it is almost finish.

MAKE INSTALL
it will find the Install in the makefile.
when run make command without any parameter makefile begin from the start.
But when we run make with Install Parameter then make it will search the label install in the file and run only that section. In these process it will copy some of the binary file to the /usr/local/bin so that all the user can run that command.

Configure Some of the Parameter

./configure --prefix=/opt/cluster
while compile --prefix option the Installation Important file move to the particular directory
14)while run ./configure --with-fc=0
If we want to disable some Feature like fortan compiler
Disable the Fortan complier
--with-fc=0
For MPI
--with-mpi=0
configure with help command
./configure --help
read more "Install Package With Configure Make Make Install .tgz Command"

How To Check Whether Tar backup Differ From the Original Source File Or Not

Using tar -df option we can find out the difference between tar backup and the original Source files. And we can check whether tar it take Backup complete or not.
it will check size,time,file present or not
Sample Output

size is differ
Mod time differs
Not found in archive >> backup.tar doesn't contain the file
No such file or directory >> backup.tar file it has file but not persent in source file
Syntax
#tar -dvf Backup.tar sourceDirectory*
#tar -dvf rhel5.tar rhel5/*
-d Difference
-v verbose
-f user Archive.
1)Our present working directory it should be current directory of source file
Example
#tar -dvf home.tar home/*
#tar -dvf /root/home.tar home/*>> These are Correct

2)Here we Don't Give Like That | Wrong Syntax
#tar -dvf /root/home.tar /home/*
Original Source Document it does not come with '/' like /root/home* (or) /home*
Example if the original source file is /root/rhel5 mean
our pwd should be /root/
Because while compress file it compress like
[root@master /]# tar -df home1.tar
home/
home/indraveer/
home/indraveer/.login.old
home/indraveer/.profile.old
it compress like.

3)#tar -tf backup.tar >> list the achieve files
4) How to exract the tar file to the particular Location
#tar -xvf scartch.bak -C /
#tar -xvf Sourcefile.tar -C DestinationDirectory
-C change Destination Directory
read more "How To Check Whether Tar backup Differ From the Original Source File Or Not"

Linux Folder Chkconfig Add Service Ubuntu Change Root Password Tee command

Linux How to Open the folder IN the Same Window
Default Linux setting whenever we open the Folder it will open the New Folder.So it will increase the no of windows in the Desktop.it will create the Lot of complex to work.
To Make it user friendly.

1)Open the folder>
Edit>preference>Behavior>Always Open in Browser Windows.

2) How to add New service to chkconfig
#chkconfig --add ServiceName
Example
#chkconfig --add pbs

3) For Ubuntu version How to login to to the root
Actually All the Ubuntu version root is not enable using sudo command we can do the all the root Super User privilege.
#sudo command
#sudo passwd root
Using the above command we can update the ubuntu root password.


4)ls | tee ls.log
It will list out files and directory at the same time it will write to the output to the
ls.log file.
read more "Linux Folder Chkconfig Add Service Ubuntu Change Root Password Tee command"

Login Remote System ssh Without Password | Linux Redhat Rhel5

First we need to create rsa Key
1)#ssh-keygen -t rsa
-t rsa it will create the RSA(Rivest, Shamir and Adleman) Key
it will creat the key with file name "id_rsa.pub" under the current user Home Directory.
If it is root mean /root/.ssh/id_rsa.pub
if it is redhat mean /home/redhat/.ssh/id_rsa.pub
ssh-copy-id it will install public key to the remote machine
then copy the id to the remote system, For first time it will ask the password.
Next it will not ask the password.
#ssy-copy-id -i /root/.ssh/id_rsa.pub remoteuser@remoteip
2)#ssh-copy-id -i /root/.ssh/id_rsa.pub hpc@151.8.27.214
While Copy the key it will ask the Password For enter the Login credentials.
AFter copy completed.
3)then try to login from the remote sytem. It doesn't ask any of the password.
read more "Login Remote System ssh Without Password | Linux Redhat Rhel5"
Monday, August 15, 2011

NFS ERROR: NFS Server Hostname failed:RPC Error: Program not registered

server I configured with NFS.
/etc/export file I add the entry what are directories need to mount
In the client /etc/fstab add the entry to mount  directory from server to client
IN THE CLIENT
While I try with #mount command To check what are things are mounted.
server shared directory it is not mounted to the client. So I try to remount
#mount -a it will mount directory according to the /etc/fstab file
while I try thes I got the following error message

mount: mount to NFS server '128.150.72.58' failed: RPC Error: Program not registered
I check in the server whether rpc support nfs. Because rpc - Remote Procedure Call is required share nfs File System.
TROUBLESHOOTING ISSUE
1)rpcinfo -p
[root@master1 ~]# rpcinfo -p [ it will show portnumber what are thing related to rpc]
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 1006 status
100024 1 tcp 1009 status
100011 1 udp 739 rquotad
100011 2 udp 739 rquotad
100011 1 tcp 742 rquotad
100011 2 tcp 742 rquotad
100021 1 udp 54266 nlockmgr
100021 3 udp 54266 nlockmgr
100021 4 udp 54266 nlockmgr
100021 1 tcp 58009 nlockmgr
100021 3 tcp 58009 nlockmgr
100021 4 tcp 58009 nlockmgr
100005 1 udp 813 mountd
100005 1 tcp 816 mountd
100005 2 udp 813 mountd
100005 2 tcp 816 mountd
100005 3 udp 813 mountd
100005 3 tcp 816 mountd
From these troubleshooting I found NFS it is not associated with RPC.
SOLUTION
So,I restart the NFS service.
In the first time NFS is not shutdown properly.
so, I restart it again. then I try it
[root@master1 ~]# rpcinfo -p | grep nfs
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
So Here I confirm RPC Provide service to nfs.
Then in the client again I try to remount it with mount -a option.
it is mounted perfectly with out any issue.Then the problem has been clearled.
Mount to NFS Server Hostname failed:RPC Error: Program not registered.
read more "NFS ERROR: NFS Server Hostname failed:RPC Error: Program not registered"

How To Run Teamviewer Under Root User | exec: /opt/teamviewer/teamviewer//bin/wrapper:

while run team viewer From the root User I got the following error message
Team Viewer must not be executed as root! or team viewer will not open.
Actual team viewer shell script they write the shell script if we execute team viewer from the root user [ root user id=0 ] display the error message or it will not open. shell script located under /usr/bin/teamviewer
[root@rhel5 bin]# cat teamviewer

#!/bin/sh
userid=$(id -u)
tv_ver="6"

if [ $userid = 0 ] # root user id is 0
then
echo TeamViewer must not be executed as root!
exit 1
fi
Here from the other resource they suggest to disable the line like adding Hash symbol # ,make the command line . From
Line: userid=$(id -u) to
Line: fi< But after change change while run the team viewer You will face the following error message. [root@localhost bin]# teamviewer /usr/bin/teamviewer: line 13: /opt/teamviewer/teamviewer//bin/wrapper: No such file or directory
/usr/bin/teamviewer: line 13: exec: /opt/teamviewer/teamviewer//bin/wrapper: cannot execute: No such file or directory
SOLUTION
It is better I will suggest just edit the uid is equal to 12 instead of 0 then try it you will get the team viewer even though if you are root user.
[user id 12 is the system user so it will not affect you any more].
/usr/bin/teamviewer: line 13: /opt/teamviewer/teamviewer//bin/wrapper: No such file or directory
/usr/bin/teamviewer: line 13: exec: /opt/teamviewer/teamviewer//bin/wrapper: cannot execute: No such file or directory
read more "How To Run Teamviewer Under Root User | exec: /opt/teamviewer/teamviewer//bin/wrapper:"

Restore Recreate Lost MBR Grub Boot Loader Linux

Problem - lost grub.conf & MBR Master Boot Record
In my system due to unclean shutdown, grub.conf and mbr are corrupted.So when I restart the system it is going to the grub window.I restart the Operating system using rescue mode.
After I loading we need to do the following things
SOLUTION Restore MBR grub loader
1)Find where the grub.conf file are located.
grub> find /boot/grub/stage1
(hd0,0)
2)Find the File system of the root partition
grub> root (hd0,0)
File system type is ext2fs, partition type 0x83
3)using setup command install grub.conf file
grub> setup (hd0,0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded
Done.
4)Now load the kernel and initrd
grub> kernel /boot/vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet
   [Linux-bzImage, setup=0x1e00, size=0x1c31b4]
grub> initrd /boot/vmlinuz-2.6.18-164.el5
Possible files are: vmlinuz-2.6.18-164.el5 vmlinuz-2.6.18-164.el5xen
There initrd these boot loader initialized a ram disk.
Finally type the #boot command it will boot your operating system.

Restore Grub trouble shooting related command
fsck.ext3 /dev/hda1 >>check the file system.
grub-install --root-directory=/mnt /dev/hda1 >> install grub boot loader
chroot /mnt/sysimage >> it will change the default root directory to /mnt/sysimage
mount -t ext2 /dev/hda2 /mnt/sysimage >> if hardisk unable to mount we can using these command
Login to the resuce mode for Linux redhat centos fedora to resolve the grub and mbr corrupted file.
grub> find /boot/grub/stage4
Error 15: File not found

if you get Error 15 File not found Then try with following command
grub> find (hd0,0)/boot/grub/stage1
(hd0,0)
grub>root (hd0,0)
grub>setup (hd0,0)
Error 15: File not found
grub>kernel (hd0,X)/boot/
/dev/sda1 will be hda(0,0)
/dev/sda2 will be hda(0,1)
/dev/sdb1 will be hda(1,0)
/dev/sdb2 will be hda(1,1).Error 15: File not found
read more "Restore Recreate Lost MBR Grub Boot Loader Linux"

Useful Linux KeyBoard Shortcut Hot Keys

1)ctrl+c -> kill the current process
2)ctrl+z -> kill the process to the background
3)ctrl+d -> Log out the current terminal
4)~ (tidle) refer to the home directory
cd ~/Desktop/
5)alt+f1 Access the K-menu (k-menu similar to star button in windows)
6)alt+print screen take the screen shot only to the current window
7)print Screen Take the snapshot for the entire window
8)ctrl+u - Delete the whole statement
9)ctrl+w - Delete the single word
10)ctrl+t - Swap the last two character
#dateconfig (or) system-con fig-date
#hwbrowser Give the Graphical window for Hardware Details
1 Byte = 8 Bit
1 Kilobyte = 1024 Bytes
1 Megabyte = 1048576 Bytes
1 Gigabyte = 1073741824 Bytes
Red hat Fedora Scientific Linux Keyboard Shortcut or Hot Keys.
read more "Useful Linux KeyBoard Shortcut Hot Keys"

SSH Login Error Message: MANPATH: Undefined variable man.csh

Server, When I Login From the Master to the client Node.
I got the following error message.d
[redhat5@master ~]$ ssh node6
Last login: Tue Jan 25 11:45:11 2011 from node1.modeling.in
MANPATH: Undefined variable.
[redhat5@node6 ~]$
Reason
MANPATH VARAIBLE is declare but these value is not assign.
SOLUTION
So create the man.csh file under the /etc/profile
csh refers to the C ShellSSH Login Error Message
#/etc/profile.d/man.csh
cat man.csh
if ($?MANPATH) then
setenv MANPATH "${MANPATH}:/usr/man"
else
setenv MANPATH "/usr/man"
endif
setenv command is used to set environment variable.
After create the file then again try it.
It will work perfectly.MANPATH: Undefined variable.


read more "SSH Login Error Message: MANPATH: Undefined variable man.csh"

Create New File System To New Partition No such file or directory

I create the New Partition under /dev/sda sata Hard disk(dev/sda3). After create the the partition using fdisk then while I create the file system using mkfs.ext3 command I got the following error message.
[root@node2 ~]# mkfs.ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda3 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
I try to mount with the following command
[root@node1 ~]# mount -t ext3 /dev/sda3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or other error
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)
In some cases useful info is found in syslog - try
dmesg | tail or so
PROBLEM
Linux Operating System It does not find the New Partition from the Hard Disk.
SOLUTIONActually From the resource they suggest me to restart the Operating System But, It will take time,
We can Avoid To restart the Server using
#partprobe using these command we can Update the partition Table.
So Linux Kernel it can find the New Partition.
Then we can create the file system with out reboot the system.
HereAfter Using mkfs command we can create the file system.
[root@node1 /]# partprobe
[root@node1 /]# mkfs.ext3 /dev/sdb2
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
36519936 inodes, 73021449 blocks
3651072 blocks (5.00%) reserved for the super user
...............  

ERROR MESSAGE
#mount /dev/sdb2 /mnt
After Mounting check using #df -T check whethere file system is created perfectly or Not.
#df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdb1 ext3 36904824 7261744 27738176 1% /mnt
[root@node2 ~]# mkfs.ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda3 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
I try to mount with the following command
[root@node1 ~]# mount -t ext3 /dev/sda3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or other error
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)
In some cases useful info is found in syslog - try
dmesg | tail or so
read more "Create New File System To New Partition No such file or directory"

VNCVIEWER Error Message: vncviewer unable to open display

I try to connect Remote system(GUI- Remote Desktop) through ssh for that Purpose I used VNC.
VNC - Virtual Network Computing,Remotely control another Computer Like Remote Desktop.
It is used to Trouble shooting the problem.While I try
[root@remote ~]# ssh 151.8.19.140
Last login: Tue Feb 1 15:47:03 2011 from 151.8.19.145
[root@ha2 ~]# vncserver
New 'ha2.hcl.in:5 (root)' desktop is ha2.hcl.in:5
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/ha2.hcl.in:5.log
[root@ha2 ~]# vncviewer :5
VNC Viewer Free Edition 4.1.2 for X - built Jan 26 2009 11:52:08
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
vncviewer: unable to open display "

ERROR MESSAGE
vncviewer: unable to open display
PROBLEM
while Login through ssh we Didn't enable the X11.
X11 refers to the GUI - Graphical User Interface
SOLUTION
while login though ssh use the option '-X' To enable X11.
-X enable X11
-x Disable X11.
Then it will work
[root@remote ~]# ssh -X 151.8.19.141
Last login: Tue Feb 1 10:18:55 2011 from 151.8.18.160
[root@ha1 ~]# vncserver
New 'ha1.hcl.in:4 (root)' desktop is ha1.hcl.in:4
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/ha1.hcl.in:4.log
[root@ha1 ~]# vncviewer :4
VNC Viewer Free Edition 4.1.2 for X - built Jan 26 2009 11:52:08
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Feb 1 10:19:26 2011
CConn: connected to host localhost port 5904
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Then I got the Graphical Window For the Remote System.
read more "VNCVIEWER Error Message: vncviewer unable to open display"

Flag counter

free counters