Is writing a research paper necessary for thesis? I'm from Computer Science field and usually I've seen students are required to publish a few research papers to be eligible for writing a thesis. I'm talking about masters level thesis here.

As far as I know the rationale behind this is that research papers are usually well evaluated by the conference committee but what if someone's  research doesn't get published? 

I'm assuming their research to be good enough but is rejected by conference people because they had better alternatives.

Are they eligible to write the thesis? They don't usually allow it in my college. Is it the case everywhere?

If the answer goes along the line that it must be acceptable in a lower rated conference then why go for external evaluations anyway since I've heard they have poor evaluations.
Are [students required to publish to be] eligible to write the thesis? 


No, this is institution dependent.