Project

General

Profile

Check Server

There are a few things that can go wrong on the server side. If the UC netwrok is having issues, the server may not be able to contact roboclub8 to get mysql data. There could also be a bug in the actual server code, or there could be a problem with the link between the server and cardbox, or the network linking the tools.

There are two places to check for errors on the server:

SSH in to the server

ssh rc99@doom.frc.ri.cmu.edu Password i...

If that doesn't work, maybe the frc DNS is having issues, so try:
ssh rc99@128.2.97.186

If neither of those work, the server is probably offline, so go into the shop and check it out. It's the black box velcroed to the wall near the shelf above the shop door.

Check the tooltron log

The tooltron server writes some data to a log in /var/tooltron
This log includes:
  • messages about ther server starting restarting
  • A log of swipes
  • resons access is denied (red light on cardbox) such as not being trained, not paying dues, etc
  • some other errors that might represent problems with the tools

To see the last few lines of the log use:
tail /var/log/tooltron

The log is automatically rotated using log-rotate, so previous logs are in files such as /var/log/tooltron.1 /var/log/tooltron.2 etc. To see them all you can use:
cat /var/log/tooltron*

Problems you will see indicated here:

  • Access denied due to membership or dues problems: If you see these messages check the civiCRM database. If that database is updated, it might take a few minutes for caching or something. If it still doesn't work after a few minutes, try searching google for issues related to the mySQL database used by civicrm and updating that...
  • Access denied due to lack of shop training: Same as above
  • Lots of ----- SERVER STARTED ----- messages: this indicates that the server is restarting over and over for some reason, check the next section to figure out why
  • ERROR: messages: these might indicate connection problems or firmware problems on the cardbox or toolboxes

Check the live python debugging output

The python script that is the tooltron server is running inside a multi-user screen, which means you can connect to it and see whats going on.

WARNING: be careful once you open the screen! Anything you type (such as ctrl-C) is getting passed on to the live running python script, so you could mess something up

If you do mess something up, kill the python script with ctrl-D and see below for starting / restarting tooltron

To access the screen execute:
screen -x tooltron/tooltron
(in case you are curios, -x is for multiuser, the first tooltron is the username and the second is the name of the screen session)

Now read the output a bit and see if there are any errors or exceptions or other things with lots of caps or exclamation marks. Then you can check the server code to see why those messages are being printed.

To exit the screen, press
ctrl-a d
Thats control + a, then d (without control)

You can also scroll up and down in copy mode by pressing ctrl-a ESC to see more of the log. See http://www.math.utah.edu/docs/info/screen_5.html for more info on using screen

NOTE: before logging out of ssh, make sure you detach the screen (close using C-a d)

Check / reset the tooltron daemon

Tolltron is maintained as a init daemon which makes it start with system startup and other things. To see if its running, execute:
sudo /etc/init.d/tooltron status

You can also change the last command to stop or start. If the code is hung somehow (python language bug or something?) you can stop and restart the server:
sudo /etc/init.d/tooltron stop
sudo /etc/init.d/tooltron start

Note that while the server is @stop@ed, tooltron will not work