READ DESCRIPTION FOR MORE METHODS! If your drive intermittently opens / closes make sure your terminals are making a closed circuit. If your drive gives the “open tray” error, grease up your gears and clean your motor band. Also, cleaning the laser lens w/ a cotton swab dipped in rubbing alcohol will help. Check to make sure your laser is properly aligned, and if not re-align it. (the laser should be approx. one inch away from the circular spindle when the drive is closed. ) GOOD LUCK!
See the article here:
How To Fix Xbox 360 DVD Drive Open / Close Error (Permanent Fix!)