Look at the diagram for the plug interface to determine which one it is.
Then check both sides of the plug, looking for loose connections.
Then follow it into the machine and then into the barfeed.
This is generally tedious but solves the problem.
Bottom line, there is a loose connection or faulty relay somewhere.