The attack started at 4am (0100 GMT) from outside two of the three main entrances to the sprawling facility, the sources said.
One mortar hit a spare-parts warehouse and smoke billowed from the building, the sources said. On Tuesday, foreigners were evacuated from the refinery as security forces braced for an attack on the compound.
The refinery has been under siege since Sunni militants began a major military offense in northern Iraq last week.
Comparing the threat to Iraq from the Islamic State of Iraq and the Levant (ISIS) with that to Afghanistan from al-Qaida, Lukman Faily has told a number of US media outlets that he wants to issue “an SOS, not just for us, but for the whole globe”.
The ambassador’s comments come as President Barack Obama considers the intervention options available to the US, from drone strikes to providing special forces training.
And while Faily agreed that Iraq does not need to see the US put “boots on the ground”, the immediacy of the threat means there is not time for “long discussions” as to which measures will be taken.
Speaking to CNN’s Christiane Amanpour, the ambassador said: “What you had in Afghanistan, with one bin Laden — you will have a thousand of them. There will be no prisoners of war, and no rule of engagement but destruction.