Knowing what make, model, and year of the truck in question would make answers a whole lot easier to come by. Also, knowing what trailer you have connected might help to.
It's entirely possible there is nothing wrong with your truck and the problem is in the trailer wiring.