Heavy gunfire erupted overnight in South Sudan's capital Juba, embassies and witnesses said, saying the fighting appeared to have broken out in a barracks close to the city centre.