The problem was the socket. I measured it with a meter, and got voltage. So I pushed it slowly onto a bulb, and it lit, but when I pushed it all the way on, the bulb went out again. So I bent the pins of the bulb a little, and it stays lit now. But I think I'll get a new socket.