In this paper, an algorithm for distributed locating failure in all-optical networks is proposed, whose aim is assure the survivability of optical network. The algorithm avoids the signal transmission between optical nodes, so failure can be located fast. In addition, the algorithm is fit for any scale and any topology.