I changed the roll of two of the bones by 90 degrees. That seemed to fix the problem.
I’m doing a tutorial here: http://www.youtube.com/watch?v=0nlwK3EsWLA In Edit Mode things are lined up. But in Object and Weight Painting modes, the piston rod and piston cylinder go out of alignment in the leg area. The upper body parts remain in alignment. Does anyone know what I can do to fix this?