Best way anti-cannon rush is to build defense and get soldier FORT, if you know they are coming.
Another way is to remove all citizen outside of city, and use dragon wait outside of the city. After the cannon attacked, you use dragoon to kill cannon, then maybe rebuild and counter attack...