Twenty-one states have rejected an $18 billion settlement with opioid manufacturers after attempts to negotiate a deal apparently failed.