How to fix Vipul's Razor's "Invalid argument" error

Saturday, September 25, 2004

If you are using Razor and you get the following error (which I received as well, on Redhat 8/i386):

Unable to connect to; Reason: Invalid argument.
Unable to connect to; Reason: Invalid argument.
Unable to connect to; Reason: Invalid argument.
Unable to connect to; Reason: Invalid argument.

I modified Razor2/Client/ (which will be somewhere in /usr/lib/perl5). You can either download the patch file or edit it yourself. Basically add a ‘Use Socket’ at the top. go to line 1733 (its right before the second use of ‘IO::Socket::INET’) and add:

my $ghbn = gethostbyname($server);
my $addr = inet_ntoa($ghbn);

Change the ‘PeerAddr => $server’ to ‘PeerAddr => $addr’. Also you can modify the log line (about 6 or so lines down) from ’$server:$port’ to ’$server:$addr:$port’ so it will also print the IP address in the error log.

Comment [1]

Swapping the CTRL key with CAPS LOCK key on Windows XP & Linux

Wednesday, September 1, 2004

I use my laptop with windows xp mainly for work, which mainly involves working on my linux servers. I end up using the ctrl key a lot, whilst the caps lock key goes unused. My pinky fingers grew tired of always reaching for the awkwardly placed ctrl-keys. A quick search on the net for remapping those keys resulted in a solution:


Basically, startup Regedit. Go to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout and add a binary value called ‘Scancode Map’.

Information collected from:


Well, Actually this is only for X 4.x, you can uncomment the following line in XF86Config:

Option “XkbOptions” “ctrl:swapcaps”

Or if it doesn’t exist, add that into the “InputDevice” section.

Problems with Windows XP Service Pack 2 (SP2)

Saturday, August 14, 2004

[Updated… Again. Removed Rant & Link to a solution added]

I installed the SP2 upgrade for xp and its interesting. Windows seems a little slower.

Also I keep getting an ANNOYING internet explorer warning, when i try to view some html files on local disk. When i upload them to my site, and view them, they don’t generate a warning. weird.

Anyway, the evil™ Microsoft®, introduced another problem in the SP2. The 10 concurrent connections limit thing with XP. Certain programs that create lots of connections, make the internet connection crawl. Basically if you run into it, you will notice a warning in the event viewer with an event id 4226.

Instead of finding the patched tcpip.sys file and then replacing it on the system using safe mode, someone has come out with an executable. I haven’t tried it so use it at your own risk. Click on this link to LvlLord’s site.

Banding on Canon S9000 Printer

Friday, August 6, 2004

[Note: Update on my printer]

I’ve had the Canon S9000 bubblejet printer for about 16 months, and it started to band. A search for this problem and/or a new printer head revealed Parts Now!. This site sells the heads at a decent price (I haven’t looked for a cheaper price yet). Also on DPReview, where I found the above link, some people were suggesting some techniques to clean the old head. They were link1, link2, and link3.

Comment [2]

Windows XP & DMA mode for CD/DVD Drives

Friday, June 25, 2004

I had a problem burning to a dvd-r/dvd-rw media (I think it was a bad media, etc.) and the burn failed. And the nature of the failure was such that XP thought that the drive did not support DMA (maybe the drive reported DMA errors, or it locked up, etc., because of the media). Anyway, the result was XP turned off DMA mode and would only use PIO mode to access drive (which is slow & unreliable, burning wise, way to access the cd/dvd burner). To re-enable the DMA on this drive, I think one method is to physically unplug the drive , boot into windows once so it sees the drive is gone, shutdown and plug in the drive.

Or the other way, and much easier, is to modify the windows xp registry. Go to “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\” and there should be several keys “0000”, “0001”, “0002”, and “0003”. Look under each one and delete “MasterIdDataChecksum” and “SlaveIdDataChecksum”. Reboot.

Found this info through a google search, but did not write down the exact source.

Windows XP, and 48-bit LBA for large harddrives

Thursday, May 13, 2004

This applies to pre-SP2 windows xp and greater than 137gig harddrive. Anyway, couple of friends had a problem with their SP1 version of xp. It turned out that 48bit LBA isnt turned on as you would hope. so both of them lost all their data (although only temporarily… they had to use a undeleted files, etc., recovery tool to get the files back). Looking through this Microsoft link, it turns out that xp did not have the latest version of Atapi.sys, although the site says that installnig SP1 will install this. I searched on my laptop & desktop and both were SP1, but again had an older version of Atapi.sys. I haven’t reformated my 250 gig harddrive (which is only 20 % full) after getting the latest version. Just to be safe, i am planning on moving/backing up all of my data off of this drive, and then format it. Eventually.

Comment [2]