Thursday, June 19, 2008

cPanel compiling apache - No method to auto repair package system

My friends who use cPanel as their control panel, let me advise you first and foremost, don't use WHM to do sysadmin tasks. It will mess up the system once in a while and will leave you in dark. Similar situation happened with my friend, who was trying to compile PHP enabling the experimental PDO support through WHM. It messed up and all he could see was


!! No method to auto repair package system !!

!! Please visit http://www.cpanel.net/support/could_not_ensurepkgs.htm for help with this error. !!

!! Restoring original working apache !!


Apache stopped working. Examined a bit around 15 minutes to find out the solution. I was blindly looking around the httpd.conf and other similar configuration. But it was when I ran /scripts/easyapache, I could sniff the issue.

cPanel was not able to update the packages and problem lied in the yum updating the PDO package.A "ps -auxww | grep yum" told me the same. Process was having the status of T (or stopped). I continued the process by passing the signal 18 to it and everything and niffy after that "kill -18 PID"

Friday, May 02, 2008

SFTP and the Received message too long 1534226287 in a VPS

One of my clients, whom I act as a trainer and an admin, had an issue recently regarding the sftp. He created a vps (Lxlabs' HyperVM) named testvm with vpsid 120. The main hardware node IP be 192.168.0.1 . And the VPS IP be 192.168.0.101. He was trying to sftp testvm@192.168.0.1.

sftp testvm@192.168.0.1 was failing giving the message "Received message too long 1534226287" ;

It was a bit confusing for me, since it was a VPS and the shell assigned was /usr/bin/lxopenvz and I was not sure of the proper rc file it reads before switching the control to the vps. All I know was the shell is not verifying whether the $TERM is dump or not. And 1534226287 was translated to [roo (Decimal --> HEX --> ASCII)

So it was PS1 which is polluting the sftp stream. Spent 1 hour or so figuring out how to make it check the value of $TERM. And it was then I thought of trying the sftp root@192.168.0.101 (the VPS IP) and that worked. haha..

Client only needed to sftp to the VPS. He was not specific about sftping to root@VPS_IP or testvm@HN_IP. Spent one hour for just because of my absent mindedness. I should be more smart :-P

Monday, January 21, 2008

CyberQuiz aka IT quiz

Quizzing again.. A few information on IT industry in quiz format.

What is Wikiality.com

It is an Internet Encyclopedia dedicated to the Honorable Professor Dr. Stephen T Colbert, D.F.A and his creation truthiness

With which cyber major has Mayo Clinic set up a collaborative research facility "The Medical Imaging Informatics Innovation Centre (MI3C)" to improve the quality of patient care ?

IBM

What is 'Stevenote' ?

The colloquial term used for the keynote speeches by Steve Jobs, generally given at Apple events

Name the former CTO of the One Laptop Per Child Foundation who has started a new company called Pixel Qi to commercialize the technology for low priced laptops for poor children


Mary Lou Jepsen

With whom is Google jointly developing televisions that display internet content such as photos and videos


Panasonic

Who developed Postscript in 1985


Adobe

What 'spider' term is used for "the use of a table or structured list of URLs for Web sites (or words that hyperlink to Web sites) in order to help locate them ?

Arachnotaxis

The BlackBerry Pearl 8100 won the first BlackBerry to do way with what ?

A trackwheel. It was replaced by a miniature trackball.

What does Wikipedia define as "the act of taking a task traditionally performed by an employee or contractor and outsourcing it to an undefined generally large group of people in the form if an open call"

Crowdsourcing

In the context off spam what is spinging

Pinging from a splog to make recipients think that content of interest has been updated though that may not be the case.

Thursday, January 17, 2008

Where all standard deletion fails...

Long time, since I updated the blog eh ? A good..a bit challenging one, till I remembered the command, debugfs.

Issue

Location : One of my clients' VPS.
Concern : One of his vps clients is not restarting properly. Stucks at initializing the vzquota. Error message when doing 'vzctl start 738' is below


Starting VE ...
Initializing quota ...
vzquota : (error) quota check : lstat `photos.friendster.comphotos6968532886961_494183449s.jpg': No such file or directory
vzquota init failed [1]


Diagnosis

I couldn't find any files with the name photos.friendster.comphotos6968532886961_494183449s.jpg inside the vps, or when looking at /vz/private/738. Then did a

find . -name "*494183449s.jpg" inside the /vz/private/738. It returned me location as ./.trash/lsm/photos.friendster.comphotos6968532886961_494183449s.jpg

/me so happy. Ran
rm -f ./.trash/lsm/photos.friendster.comphotos6968532886961_494183449s.jpg
worked fine. But the problem persisted . Reason was though it didnt give any errors, it actually didnt delete the file. Ran a ls -l inside the directory lsm which showed output where it was question marks everywhere except for the name. AFAIK, name of a file is also stored in the directory info in the FS.

[root@vpsit lsm]# ls -l
total 0
?--------- ? ? ? ? ? photos.friendster.comphotos6968532886961_494183449s.jpg


So how can I fix this and make the vps start ? "rm -f filename" was not working.. neither a bigger command, "find . -exec rm -rf {} \;" nor even rm -rf /.trash or rm -rf /.trash/lsm. The directory delete was not working, since it was not empty. Tried unlink also.

[root@vpsit lsm]# find . -exec rm -f {} \;
rm: cannot remove `.' or `..'
find: ./photos.friendster.comphotos6968532886961_494183449s.jpg: No such file or directory


Then tried to turn off quota for vps ..so executed the vzquota off command and got the o/p as below

vzquota off 738
vzquota : (error) Can't open quota file for id 738, maybe you need to reinitialize quota: No such file or directory


So didnt want to initialize the quota by command, since it wont work for sure, just as in case when it starts the vps.

Temporary fix: turn off disk_quota parameter in /etc/sysconfig/vz and started the vps. Turned on the parameter later.

Permanent fix: you can't use fsck to fix this, on a live server. Not when you have to run the fsck in / itself. So fsck was not an option here. So next choice went to debugfs

here is what I did with debugfs

debugfs -w /dev/hda1
cd /vz/private/738/.trash/
unlink lsm


gone..and the issue is fixed. I dont see a proper solution anywhere in web for this ???? question marked cases of file deletion and hence this post.

I am tired of freelancing. Need to find some salaried job..Till next time..cya..

Monday, December 10, 2007

hypervm errors. Zend error

Failed loading /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so: /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied

Okay that was the message which I got during the hypervm stop. And the solution..

Simplest solution was to disable selinux. But proper solution can be using chcon to change the context

chcon -t texrel_shlib_t /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so
chcon "user_u:object_r:httpd_sys_content_t" /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so

should fix it.. I havent confirmed but hopefully proper solution will work.

Tuesday, December 04, 2007

Technical Quiz a.k.a Cyber Quiz

I am hereby starting a series of Quizing sessions to test yours and improving my knowledge, which I left updating since the last 3 years. These quizzes are not compiled by me, instead took from various sources, online and print. At a time the number of questions, wont exceed a max of 20.

So there you go, hovering the mouse over the Answer will give you the answers

  1. What is Google's open operating system for mobile phones called ?


    Answer

  2. Which telecom major is the biggest stakeholder in Symbian Ltd?

    Answer

  3. What is 'zoo' in context of security ?

    Answer

  4. Nigel Clifford is the CEO of .... ?

    Answer

  5. Who has Peter Dengate Thrush replaced as the Chairman of ICANN ?

    Answer

  6. What was founded in July 1990 by Mitch Kapor, John Gilmore, and John Perry Barlow ?

    Answer

  7. The graphics Processing Unit used in Nintendo's Wii video fame console is called ... ?

    Answer

  8. What in the context of Linux is "bash"

    Answer

  9. The maximum packet length of IP, including the IP header is ........................ bytes

    Answer

  10. What is 'Wardriving' ?

    Answer