Showing posts with label Troubleshooting. Show all posts
Showing posts with label Troubleshooting. Show all posts

Fix : rpmdb: unable to lock mutex: Invalid argument

If you are getting this message printed out repeatedly on the terminal screen while trying to install some packages using yum
 
# rpmdb: unable to lock mutex: Invalid argument
 
yum -y update glibc ( This works sometimes )
 
If that doesn not work then execute below command 
 
rpmdb --rebuilddb -vv

How to troubleshoot IP conflicts between Servers / Systems

when we have ip conflicts between two Systems/Servers and you dont know what server ping is responding. Just give below command it requires nmap to be installed

nmap -sV -O -v ipaddress

From the below i found that the response is coming from Server1.demo.com and more to it we
can also see what operating system it is running and what are the open ports of that server.

root@naresh:/home/cp# nmap -sV -O -v 192.168.1.12


Starting Nmap 5.00 ( http://nmap.org ) at 2011-11-14 15:27 IST
NSE: Loaded 3 scripts for scanning.
Initiating ARP Ping Scan at 15:27
Scanning 192.168.1.12 [1 port]

Completed ARP Ping Scan at 15:27, 0.02s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 15:27
Completed Parallel DNS resolution of 1 host. at 15:27, 0.03s elapsed
Initiating SYN Stealth Scan at 15:27
Scanning 192.168.1.12 [1000 ports]
Discovered open port 3306/tcp on 192.168.1.12
Discovered open port 111/tcp on 192.168.1.12
Discovered open port 80/tcp on 192.168.1.12
Discovered open port 25/tcp on 192.168.1.12
Discovered open port 8080/tcp on 192.168.1.12
Discovered open port 53/tcp on 192.168.1.12
Discovered open port 443/tcp on 192.168.1.12
Discovered open port 8009/tcp on 192.168.1.12
Discovered open port 2049/tcp on 192.168.1.12

Completed SYN Stealth Scan at 15:27, 0.04s elapsed (1000 total ports)
Initiating Service scan at 15:27
Scanning 9 services on 192.168.1.12

Completed Service scan at 15:28, 46.06s elapsed (9 services on 1 host)
Initiating OS detection (try #1) against 192.168.1.12
NSE: Script scanning 192.168.1.12.
NSE: Script Scanning completed.
Host 192.168.1.12 is up (0.000088s latency).
Interesting ports on 192.168.1.12:

Not shown: 991 closed ports
PORT     STATE SERVICE    VERSION
25/tcp   open  smtp       Postfix smtpd
53/tcp   open  tcpwrapped
80/tcp   open  http       Apache httpd 2.2.12 ((Ubuntu))
111/tcp  open  rpcbind
443/tcp  open  ssl/http   Apache httpd 2.2.12 ((Ubuntu))
2049/tcp open  rpcbind
3306/tcp open  mysql      MySQL 5.1.37-1ubuntu5.5
8009/tcp open  ajp13?
8080/tcp open  http       Apache Tomcat/Coyote JSP engine 1.1
MAC Address: 00:25:90:62:4B:62 (Super Micro Computer)
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.24 - 2.6.28
Uptime guess: 0.113 days (since Mon Nov 14 12:45:28 2011)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=197 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: Host:  Server1.demo.com

How to Restore Vyatta grub

 grub> linux /boot/vmlinuz root=/dev/sda1

 grub> initrd /boot/initrd

 grub> boot

once we boot OS using this commands, We have to re-install grub to make it perminant

grub-install /dev/sda

will install grub now just reboot and relax !!

Troubleshooting network Bandwidth Usage - Mahesh Patil ( Hexagrid.com )

a) dstat  -f             <==== Showed me that there is more network traffic on  eth1  when compared to eth0 and that too.. it is outgoing traffic.




b) iftop -i eth1        <====  Confirms what dstat says and also mentions  which IP is pulling Data from some 'X' location


c) nethogs eth1     <==== Shows which process is the culprit.  apache2 is the process using up the bandwidth in sending job.


 Once it was established that it was Apache process.. I stopped and restarted it.  Looks like what ever process was downloading data  got canceled and the network usage has come down to normal.

Tested with  the above commands again after apache restart to confirm same.

vnstat  <== good command to tell the usage.


solution for error: glib not found or too old

 sudo apt-get install libgtk1.2-dev

another error we get is


checking for glib-config... no
checking for GLIB - version >= 1.2.2... no
*** The glib-config script installed by GLIB could not be found
*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GLIB_CONFIG environment variable to the
*** full path to glib-config.
configure: error: *** GLIB >= 1.2.2 not installed - please install first ***





Solution for that is:

sudo apt-get install libglib2.0-0, libglib2.0-0-dev

or 

sudo apt-get install libglib*