He allegedly shot at the door of the synagogue in Halle, but it was locked, authorities said. German media said he was possibly motivated by far-right extremism.