MOC3021 optocoupler not working ( or not working , a bit confused )
You quite clearly say you are using a 3 volt battery so I would expect the current into the gate to be quite small circa 1 mA and, given that the MOC3021 is typically rated to switch at 8 mA you just may not be providing enough current to the gate.

The gate current is too small because the device itself will need about 1 volt across its input terminals and the LED in series is probably dropping about 2 volts. Hence you have used up all 3 volts in bearly overcoming the blocking voltages in the circuit.