was the attack successful?
No, Two of the midget submarines were detected and attacked before they could engage any Allied vessels.
Attack on Sydney Harbour
Two of the midget submarines were detected and attacked before they could engage any Allied vessels. 
who attacked sydney harbour? Submarines belonging to the Imperial Japanese Navy when? Late May and early June 1942 do you know why? UNANSWERABLE what were the harbour defences? They were defences that were constructed to protect the Australian city of Sydney from attack by enemy warships and submarines.
wiki:5969052
Attack on Sydney Harbour [SEP] Introduction
In late May and early June 1942, during World War II, submarines belonging to the Imperial Japanese Navy made a series of attacks on the cities of Sydney and Newcastle in New South Wales, Australia. On the night of 31 May – 1 June, three "Ko-hyoteki"-class midget submarines, (M-14, M-21 and M-24) each with a two-member crew, entered Sydney Harbour, avoided the partially constructed Sydney Harbour anti-submarine boom net, and attempted to sink Allied warships. Two of the midget submarines were detected and attacked before they could engage any Allied vessels. The crew of M-14 scuttled their submarine, whilst m-21 was successfully attacked and sunk.