While Yglesias has a good point here that countries around the world are right to view the US askance and still potentially as a rogue state, I don't think this has been a failure by Obama, per se.
Republicans, as they have been proving for twenty odds years, love wars when they are in power, and especially since 9/11, the basic attitude of the GOP has been that war is not the question, war is the answer, the question is where and how soon can we get there.
Given that Obama cannot guarantee that these lunatics won't be elected into office again, there's nothing that can be done about the situation. The status of America as a trusted superpower was borne out of a bipartisan foreign policy consensus that no longer exists. So long as the republican party has the foreign policy views it does, and so long as it continues to be a viable party capable of assuming governance, the threat of a new American rogue war ala Iraq exists. In fact, I'll go ahead and place a bet here and now that the next Republican administration *will* start a new war somewhere when it is elected.