The Ruger AR-556 rifle used to commit the mass shooting was purchased from a federally licensed dealer in April 2016. 
On the background check form, Kelley indicated that he had no criminal history that would legally prevent him from buying a weapon. 
.
Though he was convicted of domestic violence against his wife and child by the Air Force and imprisoned for a year and then demoted and discharged, that information apparently did not make it into the NCIS database either some legality that prohibits the transfer of that information or an occurrence of negligence in not transferring that information.
.
Open questions are 
- whether or not the licensed dealer acted as required 
- why was the information surrounding his DV incident not uncovered in the background check