Sometimes the 7 pin gets a little bit slightly corroded or the surface of the pins make less than optimal contact. Mine does that once in a while.
When I connect, I am in the habit of running the plug in and out a couple times, wiggling, slightly rotating it when I plug it in. I find that helps ensure a good connection.
On the trailer connector, I sometimes take a tiny file or similar and rough up the contacts a bit to make sure it has a clean surface in there. Have a look in the truck connector and make sure the pins are clean too. Gotta be careful if you rough them up a bit, don't short out anything hot.