Retrial queues have been widely used to model many problems arising in telephone switching systems, telecommunication networks, computer networks and computer systems, etc.. In this paper an Mx/G/1 retrial queue with two phase services, discouragement and general setup time is being studied where the server is subject to breakdown during service. Primary customers join the system according to Poisson process and receive the service immediately if the server is available upon arrival. Otherwise, they enter a retrial orbit with some probability and are queued in the orbit. They repeat their demand after some random interval of time. The customers are allowed to balk upon arrival. All the customers who join the queue have to undergo the first essential service, whereas only some of them demand for the second optional service. Using generating function approach and supplementary variable method, the steady state solutions for some queueing and reliability measures of the system are obtained. The sensitivity analysis has been carried out to explore the effects of system parameters on various performance measures.