The 30 mA standard refers to the imbalance between the power going on board the boat on one wire and coming back on the other. To balance the circuit what goes out must come back, but when there is an imbalance it means the difference is flowing through the ground wire, and as a parallel path, through the water. How is this current getting to the water? How much current is causing the breaker to trip? Here are some troubleshooting tips to work with:
How much leakage current is there?
It helps when troubleshooting this situation to be able to measure how much leakage we are dealing with. For that you need an accurate clamp on meter that has big enough jaws to clamp over a shore power cord and is sensitive enough to read the levels of current we are dealing with. Clamping over the complete shore power cord shows the total amount of leakage going through the water. If there was no leakage the reading would be zero. If you have access to just the current carrying conductors you will be replicating what the ground fault breaker is measuring, which is the difference between the current in the hot and neutral conductors. The difference between the two is the total leakage current which is shared with the ground conductor and the water. You can clamp the ground conductor by itself to see how much is going through it and then deduce how much is going through the water. You will only be able to make these measurements if you can plug in to a dock that isnt fitted with a ground fault breaker. The amount of leakage will normally vary with the amount of current you are consuming on board. The more you consume the more leakage there will be.
The drawings below come from Blue Sea Systems, they are from the Product Guide on installing a ELCI breaker
This article by Blue Sea Systems gives some additional background information on the subject
Looking for obvious sources of leakage
You are looking for connections between the neutral wire and ground. There should be no connection between neutral and ground on the boat. With the shore power disconnected measure for continuity between ground and neutral. If you find continuity then you have to start disconnecting circuits to isolate which circuit is the culprit. Often domestic electric stoves, which often have an intentional connection between neutral and ground, get installed on boats. These kind of stoves normally have a way to break the link between neutral and ground, but if they dont they cannot be used on a boat.
Looking for less obvious sources of leakage
If your leakage was just slightly above the 30 mA level that was causing a trip then this becomes a more difficult problem to troubleshoot. On an older boat, especially one that has sailed in the ocean and had some salt spray over the years, a fine deposit of salt may have built up on many surfaces and because salt absorbs water and the resulting mixture conducts electricity this could be happening at every electrical connection on the boat and would be almost impossible to fix without a total rewire. You can try to isolate the problem by turning off all the circuits and turning them on one at a time. However the neutral and ground wires arent normally disconnected when you turn the breaker off so to really isolate the source you would have to disconnect the neutral wire for each circuit also. Take care doing this kind of experiment, its easy to get mixed up when you keep turning the power on and off and testing things, if you get out of sequence you will end up touching a live wire. I have done it and can confirm that it is quite unpleasant.
Is there a short cut?
There is no short cut to the first troubleshooting steps. If there is a problem that can be fixed you need to fix it. You need to consider the safety of those on board the boat as well as those in the water. However if your leakage ends up slightly over the limit and you still cant solve the problem then there is a way to isolate the problem from the dock. Installing an isolation transformer on the boat limits the electrical system that is seen by the dock to the transformer itself. Current leaks are always trying to get back to the source of the power. If you have an isolation transformer it is the source of the power for items connected on board and any leakage will not leave the boat. The part of the boat electrical system that is of concern to the dock is limited to the primary coil of the isolation transformer and it should be possible to bring that into compliance, rewiring that first part of the circuit from the power intake receptacle to the transformer if necessary.
What happens if you do nothing?
In the short term you would be liable for any injuries or death caused by leaking electrical current. In the long term you will find there is nowhere you can plug in to. You might as well address the problem now, it isnt going away by itself.