Do you have a 4 pin or 7 pin? I pull trailers all the time and every once in a while when things like that happen (I have 7 pin), I spray a little wd40 inside the plug on the truck. It seems to help all pins make better contact. If that don't work then probably a bad ground