I am doing logistic regression with 3 attributes. According to my data set I am expecting all coefficients to be positive. But it gives me both positive and negative coefficients. Is it possible to have all positive coefficients using logistic regression.
Yes, it is possible to have all positive coefficients in logistic regression.
That doesn't say very much, if a covariable $x$ have a negative coefficient you can just replace that covariable by $-x$ and get a positive coefficient ... you would get a more useful answer if you told us about your real problem, your data, the context and research questions.