Thursday, January 15, 2009

Not enough server storage is available to process this command

Web service in windows was not running and error it was returning when restarting from Plesk control panel was that, "One or more dependencies failed to start".

I am no windows expert, but I knew about the existence of HTTP SSL as a dependency for Web service. So tried restarting HTTP SSL which returned with the error,

Not enough server storage is available to process this command
which meant, either the harddrive is full or the memory usage is high. Hardrive was 90% free :-P which meant to me, it's memory. So aligned the usage as per the memory usage and killed the killer DLL exe, "svchost.exe" and that brought the web services back to normal.

I didnt investigate further, but I hope the server is not compromised :-(

Saturday, January 10, 2009

How to start apache with debug level enabled and showing all the configurations it reads

How to start apache with debug level enabled and showing all the configurations it reads, there by showing each virtual host configurations.

httpd -e debug -k start -S -t

location of httpd may differ. It can be /usr/sbin/httpd or /usr/local/apache/bin/httpd . You know the control panels!! :D


Saturday, December 27, 2008

Renaming multiple files in Linux or unix boxes

I thought it was simple to do this. But I couldn't get rename command to work. I tried several methods found in google, quoted below, but at last it was the for loop and the regexes which came to help.

To rename all the files in a folder to .bak extension

for i in `ls -l | awk '{print $9}'`; do mv $i $i.bak; done


for i in `ls -1A` do mv $i $i.bak ; done

rename 's/\.bak$//' *.bak

Is said to remove the .bak extensions , though it didnt work for me.

To change all upper case file name to lowercase try this

rename 'y/A-Z/a-z/' *

Below command did help me to remove the .bak extensions on a series of files in a folder.

for f in *.bak ; do mv "$f" "${f%.bak}"; done

Wednesday, December 24, 2008

Recovering from corrupted RPM database

When accessing the yum command, the error we got was similar to this.

error: rpmdb: damaged header #67 retrieved -- skipping.
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
File "/usr/share/yum-cli/", line 82, in main
File "/usr/share/yum-cli/", line 206, in getOptionsConfig
File "/usr/lib/python2.4/site-packages/yum/", line 132, in doConfigSetup
self.conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/", line 598, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.4/site-packages/yum/", line 667, in _getsysver
hdr =

Solution is straight enough, to repair the RPM database. So how do we repair the RPM database. The straight forward method is to, remove the /var/lib/rpm/__db* and the run

rpm --rebuilddb
I believe I discussed this issue earlier in this blog itself. But that didn't fix in the first go and had to reissue the command again. And that time it did fix it.

Another solution to fix the issue is using the db_dump and db_load from the db4-utils package. This process involve re-building master package metadata file /var/lib/rpm/Packages

mv Packages Packages-BAKUP
db_dump Packages-BAKUP | db_load Packages
rpm -qa
rpm --rebuilddb

/usr/lib/rpm/rpmdb_verify Packages

That should fix it. Check out for yet another solution. Complicated and may not need it.

Saturday, December 20, 2008

Default Plesk Page on Windows machines

Issue was that the domain name was not in the Inetmgr (IIS configuration :-P)

D:\Program Files\SWsoft\Plesk\admin\bin>websrvmng.exe --reconfigure-vhost --vhos
The system cannot find the file specified. (COM Error 80070002) at add(photo.vis,, D:\inetpub\vhosts\\httpdocs\photo)

resulted in the above error.

Solution was to create a photo folder and run it again. It did fix the issue.

Thursday, December 11, 2008

Resetting Hypervm Slave password - remote_authentication_failed

HyperVMs pass had to be reset on a slave server due to the "remote_authentication_failed" error when accessing the slave node in the slave server.

If you are receiving this error, and when you can't reset the password on the slave server from hypervm, you can manually do this on the slave server using the following commands:

lphp.exe ../bin/common/resetpassword.php slave 'put_your_pass_here'

Now there will be situations where, you still not be able to do it. In this situation, get the slave password from the master node, by logging to shell and then entering these commands there

ls -l /usr/bin/hypervmdb

Make sure that it is having 755 permissions. Or else give it.

echo "select nname, realpass from pserver" | hypervmdb

It will show you a output similar to

nname realpass
localhost ~password1 !pass2 !pass3 +pass4 !pass5 pass6

Take the pass from that list and reset the password using the command I mentioned above (ofcourse in slave). It should work.