Deep Space Homer
In this 1994 episode, Homer is selected to be an astronaut by NASA to get the average American interested in space expeditions.
He makes a mess of the mission and accidentally releases an ant farm into the space shuttle, which he then thinks are alien space ants. Plenty of disasters happen in this comedic episode although Homer eventually saves the day with a carbon rod.
Astronaut Buzz Aldrin - who was the second man to walk on the moon - even makes a voice cameo, as does musician James Taylor.