Happened to me on a rainy night.  The connector on my coach was on the passenger side of the generator.  A multiple pin flat connector.  As suggested by previous posters, disconnect connector, add dielectric grease and reconnect.
This fixed my generator but when I left the motor home for several days I turned off the house batteries just to make sure the problem didn't return while I was away.  I was going to put a disconnect switch on the generator battery supply but never got around to it before I sold the unit.
I called Onan and they acted as if they never heard of it happening yet there were lots of posts on the RV forums about this problem.