I've never had a huge problem with this, but it is common. I think the most obvious solution is to drink, drink, drink (water lol). Then again I knew a man who would spend hours trying to piss and it was painful for him psychologically. This was with oxy.
Additionally these are signs of OD, but there are different definitions of ODs. These aren't signs that you need to go to a hospital or anything imo, however if you are really incapable of urinating, you need to re-evaluate your opiate intake and consider seeing a doctor if your symptoms continue into non-opiated life.