If you get it opening and it doesn't cock the hammers, I can only think that means their catch point or the sears are worn. The barrel doesn't push the lever down quit as far as you can from the outside. If you cocked them from the inside of the receiver, check that the lever under the barrel moves--a stout screwdriver as a lever is how I did so.
Addressing it locked shut, the front iron on the forestock holds the lever that activates the extractor. Take the forestock off and see if the little lever moves freely. Try working the extractors to see if there's anything binding that. If the cocking lever doesn't move, that would cause this too. Or, possibly, a terribly peened pivot or horribly mismatched front iron.
My first thought would be a frozen extractor. Either rusted or with something in the channel.
Keep in mind this is from fixing my dad's, not with one in front of me, and if it's really a 5100 and not a 311, it's pre-WWII. Plenty of time for a screw to break off or something to rust shut.
On the plus side, there's not a thing in it that can't be fixed with penetrating oil or a punch and visit to Numrich.