Sunday, October 14, 2012

WARNING: Re-reading the partition table failed with error 16: Device or resource busy

WARNING: Re-reading the partition table failed with error 16: Device or resource busy

We will see this error from RHEL6 on words. This error is due to the partition table changes are not updated to kernel. When ever we change the partition table and try to save the table changes we get this error. Even you will get the following error as well

The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

when you see this error and executing partprobe command can not do anything, in RHEL5 based partprobe is the command to update the partition table changes to kernel, but from 6 we have to use partx command to update the partition table changes to kernel. 

Use below command to update the partition table changes.

partx -a /dev/sda

This will update the partition table changes of /dev/sda hard disk to the kernel.

Try to run above command two times, because first time it will try to sync previous partition table changes.

Hope this helps some one.

Wednesday, October 3, 2012

Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

This error will occurs if the user do not have permissions to connect to virt-manager or virtviewer tools.
To resolve this issue execute below commands

Step1: Conform if your root user account have permissions or not

virsh -c qemu:///system list

if you dont see any issue from root user, try to execute the same command with normal user where you want to start virt-viewer or virt-manager. If you see any issues such as "failed to connect socket" issue with normal user then he should be member of libvirtd group first. Follow below procedure.

Step2: Add the user account as secondary group member to libvirtd group

Note: Before doing anything keep in mind that this user may be member of many other already existing groups so add this user account to them as well.

usermod -G libvirtd,group2,group3 -a username

Step3: Now we have to change the settings in /etc/libvirt/libvirtd.conf. Open /etc/libvirt/libvirtd.conf as root and search for following lines and remove the comments for that lines.
vi /etc/libvirt/libvirtd.conf
Now remove comments from the lines which contains below info.

unix_sock_group = "libvirtd"
unix_sock_ro_perms = "0777"
 unix_sock_rw_perms = "0770"

With the first line we are mentioning that libvirtd group is allowed to very one and r/o and r/w permissions for all the users who belongs to this group.

Hope this helps some one.

(98)Address already in use: make_sock: could not bind to address no listening sockets available

Solution for (98)Address already in use: make_sock error

The error

(98)Address already in use: make_sock: could not bind to address no listening sockets available

is commonly seen when we are starting a network related service such as Apache(httpd), DNS(bind) squid etc.

When and Why this error occurs?

This error occurs when service tried to bind that particular port to the IP address. In other words for example there is service ABC running on port 443 and you tried to start some other service XYZ on the same port with out knowing that ABC service is running on that 443 port.

Technical details?

When ever you want to run a network related service we have to bind this service to a port and IP address so that once its assigned what ever packets coordinated to that service are routed through this port.

What about Solution?

Step1: First you have to check what service is running on that IP address by using nmap port mapping tool.

From the above error I am taking my IP as


Sample output nmap localhost

Starting Nmap 5.21 ( ) at 2012-10-03 12:35 IST
Nmap scan report for
Host is up (0.0000090s latency).
Not shown: 997 closed ports
53/tcp   open  domain
443/tcp  open  sshd
3689/tcp open  rendezvous

Nmap done: 1 IP address (1 host up) scanned in 0.25 seconds

Step2: Once you find the service name which occupies the port try to stop if the service is not required.

service sshd stop

Step3: Now start your Apache service and this error will vanish.

Tuesday, October 2, 2012

All about Linux and Open source errors with their solutions

The idea of this blog is simple. This is totally meant for the errors which are seen daily when we are configuring some servers, applications, tools etc. I felt there is no dedecated blog which deals only with errors related to Linux, Unix and open source tools which work on Linux/Unix based flavors. This site is for those people who are looking for the errors they are seeing on day to day activities.

What you will see in this blog?

All about errors and their solutions so that you no need to scratch your head on what went wrong in creating this error?

Can any one contribute to this site?
Yes, All are welcome. A person in this world will never come across all the problems faced by other users. So it should be corroborated way rather than one man army.

Surendra Anne.