LendKey

Monday, February 23, 2009

Nagios killed all web sites created by virtualmin

I have a bunch of domains running on a Linux box. They are managed by VirtualMin. Each site has its own user name, group and home folder.
For example, site www.infolexllc.com under VirtualMin has user name and groups infolex as well as home folder /home/infolex.
The document root of the site is /home/infolex/public_html.
Everything was working great until I installed Nagios, hoping it could help me monitor status of my server.
But after Nagios was installed, all my sites on this server became unaccessible. when I pointed my browser to:
http://www.infolexllc.com
I got 403 error saying there's no permission to access the site.

I remember I ran into similar issue on a client's server before. So I found log I wrote down about two years ago. Looks like Nagios somehow removed user apache from group apache. Therefore, Apache server lost access right to website's document root which was owned by apache.apache.

So I guess similar thing must happened to my server also. I checked owner of /home/infolex/public_html, it's infolex.infolex.

I check groups apache belongs to, they are:
apache, nagois, nagiocmd


So I added apache back top group infolex by:
/usr/sbin/usermod -a -G infolex apache


I did the same to all other virtual hosts on the same server.

Then restart Apache. Everything is back to work!

I'm still having problem with Nagois itself so far. Will post more if I ran into anything worth to share.

Monday, February 16, 2009

Google Gear slows down WIFI?!

Man! if you read my previous post, you already know I have been fighting WIFI slowness on my Mac for many days.

I installed a 16Mbps Comcast business broadband service about two weeks ago. Since then, I noticed my MacBook Pro's WIFI speed drops down to only 100Kbps almost all the time. It's only good for a very short period of time after I restart router, blindly changed some setting on my MacBook Pro or router.
There were many times I thought the problem got resolved, I even posted a BLOG to celebrate it :). But after a few more minutes, the problem always comes back! My hair got almost pulled out completely and my mind became crazy!

Finally from last night, I noticed ping time in my network was very unreliable:

64 bytes from 192.168.0.5: icmp_seq=1757 ttl=64 time=0.933 ms
64 bytes from 192.168.0.5: icmp_seq=1758 ttl=64 time=1095.138 ms
64 bytes from 192.168.0.5: icmp_seq=1759 ttl=64 time=102.211 ms
64 bytes from 192.168.0.5: icmp_seq=1760 ttl=64 time=1451.482 ms
64 bytes from 192.168.0.5: icmp_seq=1761 ttl=64 time=467.000 ms
64 bytes from 192.168.0.5: icmp_seq=1762 ttl=64 time=1859.467 ms
64 bytes from 192.168.0.5: icmp_seq=1763 ttl=64 time=861.624 ms
64 bytes from 192.168.0.5: icmp_seq=1764 ttl=64 time=1.828 ms


I started thinking maybe I should try close all application one at a time and see if any of them had any impact on the thing.
So I left a terminal open, with ping running, so I could see change of ping speed. At the same time, I started to close applications I run, such as Adium, Skype, Firefox... Wait! after Firefox was close, the ping speed turned back to a normal range:

64 bytes from 192.168.0.5: icmp_seq=453 ttl=64 time=2.267 ms
64 bytes from 192.168.0.5: icmp_seq=454 ttl=64 time=1.001 ms
64 bytes from 192.168.0.5: icmp_seq=455 ttl=64 time=1.004 ms
64 bytes from 192.168.0.5: icmp_seq=456 ttl=64 time=0.987 ms
64 bytes from 192.168.0.5: icmp_seq=457 ttl=64 time=1.197 ms
64 bytes from 192.168.0.5: icmp_seq=458 ttl=64 time=1.008 ms
64 bytes from 192.168.0.5: icmp_seq=459 ttl=64 time=1.245 ms


It got be Firefox!

Then another question comes back. Why did Firefox behave pretty good before? And I cannot live without it.

That's when I realized I installed GoogleGear to enable offline access to my gmail account almost the same time when I installed Comcast. Could that plugin be a problem? Easy to know. I removed this plugin. And everything is back to normal, even with Firefox running! I enabled/disabled it many times just to confirm. And looks like IT WAS GOOGLEGEAR THAT CAUSED ALL MY HAIR-LOSS!

I will report the problem to our google friend. In the mean time, in case you are losing your hair as I was. Hope this post helps.

Li

Tuesday, February 10, 2009

WIFI slowness of my Macbook Pro

My Macbook Pro (2007 edition)'s WIFI turned to be very slow recently. Speed test (http://www.speedtest.net) sometime report only 10K download while I have 15M Comcast broadband.
I struggled many days and tried different ways I could imagine, even bough a new router, problem still unresolved.

Today, I tried to check /var/log/system.log and found lots of error messages like:

Feb 9 01:10:06 li-mac-2 mDNSResponder[22]: AppendDNSNameString: Illegal empty label in name "."
Feb 9 01:10:06 li-mac-2 mDNSResponder[22]: RegisterSplitDNS: bad domain .


Then I Googled the keywords:mDNSResponder[22]: RegisterSplitDNS: bad domain . and found a hint at:
http://discussions.apple.com/message.jspa?messageID=6911574


Followed suggestion from the site, I finally managed to resolve my issue. Since the DNS error msg is gone, my MacBook Pro could do 14Mbps on wifi.

Here's summary of what I did:
1. run scutil --dns and saw something like:

DNS configuration

resolver #1
nameserver[0] : 192.168.0.1
order : 200000

resolver #2
domain : .
options : pdns
timeout : 5
order : 150000

resolver #3
domain : local
options : mdns
timeout : 2
order : 300000
...


2. Open Keychain Access
3. Click on System at left side
4. Find and delete item named DNS Key
5. Reboot
6. Problem resolved!