Installation

  |   3171  |  Comments (2)  |  Storage@home
Preface

1. Read the FAQ thread FIRST. Then read all of these instructions before you start.

2. If you are not comfortable setting your machines IP address, configuring port forwarding your firewall, using a command prompt (navigating directories with "cd" and the like), and keeping up on what will be a fast moving project during September, then find someone to help you. There are no points to lose out on if you do not participate in this project. In this first stage of Storage@home there are only a few weeks to collect a great deal of data.

Register and get a Machine ID

(note: Linux users may want to get the binary and see if it will run at all before starting, currently you need Llibc 2.4+ to run the software.)

Visit http://vspm11.stanford.edu/sah/ and register then get a Machine ID.


Getting sah-monitor.exe

Windows
32 bits : http://www.stanford.edu/~beberg/sah/Win32-1.05-sah-monitor.zip
64 bits : http://www.stanford.edu/~beberg/sah/Win64-1.05-sah-monitor.zip

Mac OS X (Universal)
http://www.stanford.edu/~beberg/sah/OSX-1.05-sah-monitor.tgz

Linux 32 bit Compiled on a 2.6.22 kernel, libc 2.4+.
http://www.stanford.edu/~beberg/sah/Lin32-1.05-sah-monitor.tgz

Linux 64 bit Compiled on a 2.6.28 kernel, libc 2.4+.
http://www.stanford.edu/~beberg/sah/Lin64-1.05-sah-monitor.tgz


Routing and Firewalls

The Router:
You need to forward UDP traffic on port 300 to your machine. If you don't know how, here are some guides which may help (or not) and there are some screencasts on YouTube as well.
o Introduction to Port Forwarding
o A HUGE guide to every router there is... http://portforward.com/
o One for OSX http://homepage.mac.com/car1son/static_port_fwd_intro.html
o Setting staic IP on mac http://linksys.custhelp.com/cgi-bin/linksys.cfg/php/enduser/std_adp.php?p_faqid=15792

For some users with D-Link routers, the UDP port 300 setup may need to be done under the Advanced | Virtual Servers tab (first/default tab under Advanced) instead of Port Forwarding. If you seem to have port forwarding setup correctly and sah-monitor is still not able to ping/pong, try that as an alternative.

The Firewall:
You need to allow UDP on port 300.

  • Windows
    Start menu, Control Panel, Security center, Windows firewall, Exception tab. Hit Add a program buttons, search for your sah-monitor.exe executable and click OK to add it. Hit OK again to close the Windows firewall configuration windows, and close Control Panel.
  • OS X
    OS X will ask you if it's OK for sah-monitor.exe to use the netowrk as soon as you start it, so just be ready.
  • Linux
    Linux firewalls vary so greatly it's impossible to summarize here. Please consult the documentation for your distribution.



Install

Windows Service:
Unzip the file and put the sah-monitor.exe in a directory that it can put logs in. If you run the program it will give you instructions. Mind the spaces in the path, and use /'s not \'s because you must quote the path. On Vista you will need to open a command prompt (Start menu // Command Prompt) with a right click and "Run as Administrator", and do the same for any command prompt needed in the rest of these instructions. Navigate to the directory with the files using commands like "cd directory" and then...
Code :
sah-monitor.exe install machine_id -d "directory"
net start sah-monitor


A common error is "OpenSCManager failed (5)" during the install step, if you see this you forgot to right click and "Run as administrator..." when you opened the command prompt.

If you're not comfortable with command line to start and stop services, you can use Start menu > Control Panel > Administration tools > Services. Other methods : Start > Run > services.msc > OK.

When SAH is successfully installed, you'll see a new entry called "Storage@home Monitor"

Mac OS X
Open a terminal.
Uncompress (update version number if needed):
Code :
tar xfvz OSX-1.02-sah-monitor.tgz


Install:
Code :
sudo ./OSX-launchd-gen.pl MACHINE_ID "`pwd`"


Make it go:
Code :
sudo launchctl load -w /Library/LaunchDaemons/sah-monitor.plist


The first time you run it, OS X will ask if you want to allow it to use the network, answer YES!
Now watch it work and look for pings (hit Control-C when done):
Code :
tail -f sah-monitor.log


It's now installed, autorun on reboot, but don't forget about the expire dates!
Uninstall:
Code :
sudo launchctl unload -w /Library/LaunchDaemons/sah-monitor.plist


Linux: x86
Code :
tar xfvz LinXX-1.02-sah-monitor.tgz
sudo ./sah-monitor.exe machine_id -d "`pwd`"
(once you enter your password, and it's stared hit control-z, and then immediately type the next line)
bg


Error Codes

  • -1 or 65535 or 4294967295 = Missing the -d before the path, not the right parameters at all, or the machine ID wasn't a machine ID at all.
  • -2 or 65534 or 4294967294 = Machine has already crashed (rare).
  • -3 or 65533 or 4294967293 = Log path/permission problems, probably wrong path or used the bad slash ( the \ ) at the end of the path.
  • -4 or 65532 or 4294967292 = Expired client (normal).


See it working - host info page

Visit http://vspm11.stanford.edu/sah/ login and click on the Machine ID to monitor it, or just open your sah-monitor.log.

You should see it check in when it starts, and a ping shortly after. If there are network problems, or the server is down, it will try again every 6 minutes. Double-check your machine_ID is right, bad ID's are ignored. If a check in happens several times and you never see a ping, then your port forwarding or firewall is are not working. If you see pings, but the host info page isn't showing pongs, your outgoing packets are not surviving, and you may have outgoing firewall/router rules to remove. Visit the forums for more help.

If you get the following message in your sah-monitor.log file :
Quotation:
Unable to open listening socket

There's two possible causes :
  • sudo missing (Linux/OSX)
  • Program launched more than once

A reboot might also help to free the socket if the two cases above doesn't apply.

If your client doesn't appear to be working after a half hour (both pings in the log, and pongs on the website) then please stop the client using the first step of the uninstall instructions below. Leaving it running when not working serves no purpose.


Upgrades

Windows
In a command prompt (Start Menu, Run, "cmd") cd into the directior you put sah-monmitor.exe in, and type:
Code :
net stop sah-monitor

( now copy the new sah-monitor.exe file into place, and restart it... )

net start sah-monitor


Mac OS X
In a Terminal window (found in Applications/Utilities), goto the directory with the sah-monitor.exe and type:
Code :
sudo launchctl unload -w /Library/LaunchDaemons/sah-monitor.plist

( now copy the new sah-monitor.exe file into place, and reload it )

sudo launchctl load -w /Library/LaunchDaemons/sah-monitor.plist


Linux
Just kill the client.
Code :
sudo killall sah-monitor.exe

( now copy the new sah-monitor.exe file into place, and restart it... )

sudo ./sah-monitor.exe machine_id -d "`pwd`"


Uninstall

Windows
In a command prompt (Start Menu, Run, "cmd") cd into the directior you put sah-monmitor.exe in, and type:
Code :
net stop sah-monitor
sah-monitor.exe uninstall


Mac OS X
In a Terminal window (found in Applications/Utilities), type:
Code :
sudo launchctl unload -w /Library/LaunchDaemons/sah-monitor.plist
sudo rm /Library/LaunchDaemons/sah-monitor.plist


Linux
Just kill the client, no uninstall yet.
Code :
sudo killall sah-monitor.exe


And that that should mean it's gone without a trace, except the sah-monitor.exe which you can also delete of course.