Vinod Kurup

Hospitalist/programmer in search of the meaning of life

Jul 30, 2003 - 2 minute read - Comments - music eff free

Don't get sued

The topic of music sharing and its legality came up during our annual cousins trip in Seattle. Here’s an important article on How Not to Get Sued by the RIAA. The most important thing is the last line in the article:

Join EFF and support our efforts to protect file-sharing.

I don’t use P2P music-sharing apps anymore. While I love the idea of being able to access an unending library of music, I don’t like the idea of getting it for free. What? Sure, call me strange, but I like the idea of an artist getting a benefit for entertaining me - something that will encourage them to make even more great music. I tend to buy music at the Apple Music Store or directly from the artists if possible (e.g. Phish). In both cases, the artists get much more of the proceeds than they do through other channels.

Now, I also copy new stuff from friends and family (Thanks Dave and Deepu!), but I don’t feel too guilty about it because they always introduce me to things I would never have heard otherwise and if I hear something I like, I’d usually go buy more of it. RIAA’s current actions (link broken), if they’re doing anything, are making me more reluctant to buy music through normal channels. Why should I support an industry that seems to care neither about the artists nor the customers. Music sharing will help artists and it certainly provides us with more variety than the RIAA and its cohorts are providing. We just need to work on ways to improve the flow of money and music between listeners and artists. The EFF is working on this.

Jul 20, 2003 - 1 minute read - Comments - aolserver web programming

AOLserver CGI errors

Scenario: You’re trying to run a CGI program under AOLserver and you see this in your error log:

19/Jul/2003:00:00:23     Error: exec /home/vinod/cgi-bin/mt: execve() failed: Permission denied
19/Jul/2003:00:00:23     Error: waitpid(-3) failed: No child processes
19/Jul/2003:00:00:23     Error: nscgi: wait for /home/vinod/cgi-bin/mt failed: No child processes

I’m trying to run /home/vinod/cgi-bin/mt/mt.cgi. Why isn’t this working? Because I need to tell AOLserver about each and every directory which might contain CGI programs.

So I need to change my nsd.tcl from:

ns_section "ns/server/${server}/module/nscgi"
ns_param   map "GET  /cgi-bin /home/${user_account}/cgi-bin/" 
ns_param   map "POST /cgi-bin /home/${user_account}/cgi-bin/" 
ns_param   Interps CGIinterps

to

ns_section "ns/server/${server}/module/nscgi"
ns_param   map "GET  /cgi-bin /home/${user_account}/cgi-bin/"
ns_param   map "POST /cgi-bin /home/${user_account}/cgi-bin/"
ns_param   map "GET  /cgi-bin/mt /home/${user_account}/cgi-bin/mt" 
ns_param   map "POST /cgi-bin/mt /home/${user_account}/cgi-bin/mt" 
ns_param   Interps CGIinterps

Problem solved. Further reading: http://jongriffin.com/static/consultant/nscgi - sure wish I had read that before I started messing with ns_cgi.

Jul 20, 2003 - 3 minute read - Comments - openacs version-control programming

Updating from CVS

Here’s the steps I take in order to update my site from the latest OpenACS CVS. All of this info comes from Andrew Piskorski’s great CVS page or from pages listed in his document.

  1. Make sure that I’ve committed all the local changes that I’ve made.

    vinod:~$ cd web/kurup vinod:~/web/kurup$ cvs commit -m “Fixed foo, bar and blah”

  2. Go into the directory containing my OpenACS CVS checkout and grab the latest sources. I’m using the oacs-4-6 branch.

    vinod:~/web/kurup$ cd ~/web/openacs-4 vinod:~/web/openacs-4$ cvs update -r oacs-4-6

  3. Import the code into a vendor branch. My repository name is kurup. OpenACS is the vendor tag.

    vinod:~/web/openacs-4$ cvs -d /var/lib/cvs \ import -m “importing latest OpenACS 4.6 branch”
    kurup OpenACS openacs-4-6-3-20030719

  4. This produces the usual CVS scroll and then a message like this:

    7 conflicts created by this import. Use the following command to help the merge: cvs -d /var/lib/cvs checkout -j<prev_rel_tag> \ jopenacs-4-6-3-20030719 kurup

  5. Follow the instructions just given above. This will checkout a full set of code into the kurup directory, while simultaneously merging the new imported code in.

    vinod@vkurup:~/web/openacs-4$ cd vinod@vkurup:~$ mkdir tmp vinod@vkurup:~$ cd tmp vinod@vkurup:~/tmp$ cvs -d /var/lib/cvs checkout \ -jOpenACS:yesterday
    jopenacs-4-6-3-20030719 kurup

  6. Go through and fix all the conflicts. This is the part that I sometimes find confusing. How to find the files that have conflicts? The command in instruction #3 above will list conflict files with a C in front of the filename. Check each file that has a C in front of it. This is why I like to do this process inside an emacs shell, so that I can look over the output as needed. For example, one piece of my listing looked like this:

    U kurup/packages/lars-blogger/www/blog-oracle.xql U kurup/packages/lars-blogger/www/blog.adp C kurup/packages/lars-blogger/www/blog.tcl U kurup/packages/lars-blogger/www/calendar-oracle.xql

So, I need to check ~/tmp/kurup/packages/lars-blogger/www/blog.tcl, look for conflict markers and resolve any conflicts. Do this for every file marked ‘C’ in your listing.

  1. Commit my work.

    vinod:~/tmp$ cd kurup vinod:~/tmp/kurup$ cvs commit
    -m “merged with openacs-4-6-3-20030719, conflicts resolved”

  2. Blow away that tmp checkout

    vinod:~/tmp/kurup$ cd vinod:~$ rm -r tmp

  3. Update my local checkout

    vinod:~$ cd web/kurup vinod:~/web/kurup$ cvs update

  4. Restart my server.

    vinod:~$ svc -t /service/master

  5. Once the server is back up, I visit http://kurup.org/acs-admin/apm with my broswer and click on ‘Install Packages’. I look for any packages that are listed as ‘Upgrade’. Click on these packages and follow the instructions to perform any needed upgrades. This is always a touchy process because if the upgrade script errors out, your server may be left in an in-between state. Hope and pray liberally.

  6. Repeat as needed, maybe monthly, or whenever there’s a new feature/bugfix available that you need.

Jul 16, 2003 - 2 minute read - Comments - sysadmin wireless

Setting up WEP

How to set up WEP encryption:

  • SMC Barricade Basestation
  • Airport Extreme Wireless Card
  • Mac OS X 10.2.6

Note that if things don’t go 100% right, you may lock yourself out of your wireless network. Be sure you know how to get back in before you follow any of these instructions.

  1. Set up non-encrypted transmission first. Make sure you can connect to your basestation and surf on the internet.
  2. Visit your basestation’s URL - default is http://198.168.123.254
  3. Log in (You have changed the password so it’s not ‘admin’, right?)
  4. Click on Wireless.
  5. Create a Network ID (SSID). I’ve read that leaving it at ‘default’ sometimes causes problems, so change it.
  6. Check the ‘Enable IEEE 128 bit Shared Key security’ radio button
  7. Now we need to enter a key. This should be a 26 digit Hex code. Simply go to the magic WEP Strong Key Generator. Click on ‘generate 128 bit key’ and scroll down to see your new key. Pick the one labeled HEX. Enter this value as ‘WEP Key 1’. Keep this key visible somewhere, since you’ll need to feed it to your Mac so you can login.
  8. Click ‘Save’ and then ‘Reboot’ your wireless router.
  9. OK, now you’re locked out of your basestation. Let’s get back in.
  10. Click on the Airport Icon in the menubar. Choose ‘Turn Airport Off’. Wait a few seconds and then click ‘Turn Airport On’.
  11. Wait a few seconds for your Mac to recognize your network. Then, click on the Airport icon again and choose your Network-ID. A password box should pop up.
  12. Click the drop-down menu and choose ‘128 bit Key’ and then re-enter your 26-digit HEX key. And no, copy and paste won’t work - you need to enter it digit by digit. Check the ‘Keychain’ box so that you don’t have to re-enter that hideous key each time.

Enjoy your new encrypted network!

Jul 15, 2003 - 1 minute read - Comments - pain running

oh, the pain!

Ugh… I woke up this morning with a nagging pain in my right knee. It kinda improved through the day, so I wasn’t too worried about it, but when I tried to run on it this evening, it really hurt. So I’m gonna keep to the bike for awhile. I remember having this problem (which I think is patellar tendonitis) during the last marathon and I remember that it got better pretty quick, so I’m praying it’s the same this time.

Jul 5, 2003 - 2 minute read - Comments - sysadmin mail

More Mail Woes

I spent most of this afternoon struggling with a mail issue and I didn’t find it documented well anywhere else, so I’m going to write about it here in the hopes that it might help someone else.

What I was trying to do: Setup qmail + vpopmail + courier imap for imap and pop3d

Problem I was having: For some users, checking POP3 mail would work for a while (about 5 minutes), but then would fail:

      Jul  5 00:30:34 vkurup pop3d: LOGIN FAILED, ip=[::ffff:68.173.27.35]
      Jul  5 00:30:34 vkurup pop3d: Disconnected, ip=[::ffff:68.173.27.35]

The failure would only happen for users who had vpopmail accounts and shell accounts. Users who have only vpopmail accounts were fine.

Eventually, after much searching, I found this message which advised to configure courier-imap with --without-authdaemon. This solved my problem.

According to the author of courier-imap, this problem is solved in newer versions of vpopmail, but he mentions version 5.3.38 and I could only find version 5.3.20, so I didn’t try that fix.

Comments from old site

THANK YOU

Thank you very much - it solved my problem !!!

pop3d was causing me serious grief, it just gave error message "pop3d: LOGIN FAILED". It's supposed to authenticate to MySQL - but according to MySQL's log, there's no query to the mail database.

Turned out I created a username in the mail database that's the same as a user in the system, as you said.

So I created another user - lo, pop3d now queries to MySQL !!

Funny thing is I've looked around the Internet for hours, and your blog is the only place that mention it.... unbelieveable.

Again, many thanks !!

cheers,

Harry

Harry Sufehmi 2004-08-24 08:02:40

Jun 29, 2003 - 2 minute read - Comments - do-not-call

Do Not Call

I’m going to sign up for the National Do-Not-Call Registry, but I’m not sure that it’s going to reduce the number of calls I get. Look at the exemption list:

Exempt businesses include:

  • long-distance phone companies
  • airlines
  • banks and credit unions; and
  • the business of insurance, to the extent that it is regulated by state law.

However, many telemarketing calls are placed by professional telemarketing companies, and even if the company whose goods or services are being sold is exempt, the telemarketing company may be covered.

You may still receive calls from political organizations, charities, telephone surveyors or companies with which you have an existing business relationship.

The list of telemarketers who don’t fit into the exemption list seems kinda small to me…

Comments from old site

Get tele-zapper

Hey Vin, you want to get rid of telemarketing calls get a tele-zapper they work great. They're like thirty bucks and easy to hook up. I used to get around 10 -15 calls a week and now I might get one every 3 months, and what's great is that if its a telemarketer on the line its just silent on the line like there's nobody there so you don't have to talk to them. It then zaps your phone number out of there system.

Andy Drout 2003-07-25 16:35:19

Telezapper

Hey Andy!

Thanks for the note - I had never heard about the TeleZapper before. Does it actually emit a audible tone to anyone that calls you?

I'm trying to solve my telemarketer problem by never being home to answer the phone :-)

Vinod Kurup 30 July 2003 01:13:02

Jun 29, 2003 - 2 minute read - Comments - daemontools sysadmin

me vs. daemontools

I have a love/hate relationship with daemontools. It’s powerful way to manage services (like web servers and mail servers), but it sometimes doesn’t act the way I expect it to.

Today, I tried to set up qmail-pop3d. I set up a directory called /var/qmail/supervise/qmail-pop3d and put a file named ‘run’ inside it. This contained:

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin
export PATH

tcpserver -H -R 0 pop-3 
/var/qmail/bin/qmail-popup vkurup.acornhosting.net 
/home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir &

Then I connected the run script to my /service directory

# ln -s /var/qmail/supervise/qmail-pop3d /service

Then I checked to see if it was running:

# svstat /service/qmail-pop3d
/service/qmail-pop3d: up (pid 13524) 0 seconds

Hmmm… up 0 seconds. That’s not right - it should be at least 5 or 6 seconds (I can’t type that fast). That usually means that the service is repeatedly failing and restarting itself.

ps shows that qmail-pop3d is running, but trying to connect to port 110 doesn’t work:

$ telnet localhost 110
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection timed out

And now I’m stuck. Nothing is getting logged to the qmail-pop3d logs. After some headbanging, I do another ps -ax and this time notice a process called readproctitle:

11919 ?        S      0:05 readproctitle service errors: ...lready used?tcpserve
r: fatal: unable to bind: address already used?tcpserver: fatal: unable to bind:
 address already used?tcpserver: fatal: unable to bind: address already used?tcp
server: fatal: unable to bind: address already used?tcpserver: fatal: unable to 
bind: address already used?tcpserver: fatal: unable to bind: address already use
d?tcpserver: fatal: unable to bind: address already used?

What’s that? I look it up and find that readproctitle is a kind of scrolling-log for daemontools which shows up when you run ps. So, it looks like qmail-pop3d failing because it’s trying to bind port 110 even though it’s already been bound. So this makes me thing that qmail-pop3d isn’t failing, but that it’s running over and over again. And then I look back at my run script and look at that pesky little ‘&’ at the end. Doh! That tells the process to detach once it starts. It starts normally, then detaches. Once it detaches, daemontools thinks it’s down, so it tries to start it again. (At least that’s the way I understand it). Getting rid of the ‘&’ and adding ‘exec’ to the beginning fixes it and everything works now.

Me: 1 Daemontools: 2123