It was working fine all December. Now, it does not work as follows: the draft fan starts and runs correctly, then a good looking pilot light comes up. In less than one second, the pilot light turns off and the main burner does not ignite.
I spent a while troubleshooting this issue. I cleaned the pilot sensor with light emery cloth. It did not seem to help. It seems that if I remove two screws holding the pilot light in place and pull it out of the furnace, it does ignite and hold, and if I insert it back into the furnace, the main gas ignites.
I put it back in and everything seems to work. I turn the furnace off, then on, and the pilot stays and the burner lights. Then I went to sleep and again woke up in a cold house.
Overall this behavior seems to be somehow "erratic". As in, things seem to work, then after a while the pilot starts going away again.
Would there be some coherent explanation of this behavior.