Is there a canonical reference for the story about the war between the Buddha's relatives? I've been looking for a reference for the story of the conflict between Kosalan king Vidubhara and the Sakyans, that the Buddha tried to stop. There are several versions of this on the web, but none of them give any references. Is it canonical? Whether it's canonical or not, where does it come from?
Yes, these are striking stories given with varying details even though the 'lesson' is usually the same. I found this summary by a monk named Cittasamvaro;


  'Within the Buddhist Scriptures, there is little evidence for collective karma, though the commentaries abound with karma stories. One such is the defeat of the Sakyan kingdom at the end of the Buddha’s life, and the subsequent destruction of the conquering army through natural disaster. Though the Buddha reportedly knew that the war would occur due to past karmas, he still tried to intervene peacefully. The conquering army also paid for its part in the bloodshed, by being swept away by a flood. (Dhammapada Aṭṭhakathā 1.46, Viṭaṭūbhavatthu). Despite the Commentarial stories, stories that are not part of the direct teachings of the Buddha, there is little in the Sutta/Vinaya to suggest that there is such a form of collective karma'.