Rebels attack Castlebar and are repulsed