Narrative:

First officer's leg so I did the walkaround. Everything was normal/uneventful until we tried to raise the landing gear after takeoff. The gear did not retract and we had 3 red unsafe gear indications with the gear handle up. We complied with the QRH with no luck. With the gear handle down we had 3 green lights and normal cockpit indications. After consultation with the dispatcher and maintenance we decided to burn down gas and return to ZZZ. We landed an hour and 13 mins later. Everything was normal except that I had to extend the spoilers manually. After turning off the runway; the left gear door fell open. We stopped and contacted maintenance. When they arrived; they found the landing gear bypass valve/door open. After closing the door; the gear door retracted and we taxied to the gate. I don't know how; but I must have missed the unsecured door during my exterior inspection.

Google
 

Original NASA ASRS Text

Title: FAILURE OF LANDING GEAR RETRACT MECHANISM RESULTS FROM FAILURE TO DETECT AN OPEN GEAR BYPASS VALVE DOOR OPEN ON PREFLT.

Narrative: FO'S LEG SO I DID THE WALKAROUND. EVERYTHING WAS NORMAL/UNEVENTFUL UNTIL WE TRIED TO RAISE THE LNDG GEAR AFTER TKOF. THE GEAR DID NOT RETRACT AND WE HAD 3 RED UNSAFE GEAR INDICATIONS WITH THE GEAR HANDLE UP. WE COMPLIED WITH THE QRH WITH NO LUCK. WITH THE GEAR HANDLE DOWN WE HAD 3 GREEN LIGHTS AND NORMAL COCKPIT INDICATIONS. AFTER CONSULTATION WITH THE DISPATCHER AND MAINT WE DECIDED TO BURN DOWN GAS AND RETURN TO ZZZ. WE LANDED AN HR AND 13 MINS LATER. EVERYTHING WAS NORMAL EXCEPT THAT I HAD TO EXTEND THE SPOILERS MANUALLY. AFTER TURNING OFF THE RWY; THE L GEAR DOOR FELL OPEN. WE STOPPED AND CONTACTED MAINT. WHEN THEY ARRIVED; THEY FOUND THE LNDG GEAR BYPASS VALVE/DOOR OPEN. AFTER CLOSING THE DOOR; THE GEAR DOOR RETRACTED AND WE TAXIED TO THE GATE. I DON'T KNOW HOW; BUT I MUST HAVE MISSED THE UNSECURED DOOR DURING MY EXTERIOR INSPECTION.

Data retrieved from NASA's ASRS site as of January 2009 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.