JAKARTA—A large earthquake off the west coast of Indonesia has exposed major flaws in the multimillion-dollar warning system installed after the deadly 2004 Indian Ocean tsunami, raising questions about whether the country would be able to prevent a similar disaster.

None of the country’s 22 warning buoys were working at the time of the earthquake, Indonesia’s disaster agency said Thursday. An official separately blamed the malfunctions on vandalism by fishermen and inadequate maintenance.

...