WASHINGTON — North Korea launched short-range ballistic missiles on Thursday for the second time in a week, prompting President Trump to acknowledge that “nobody’s happy” about the implications for his diplomatic effort to denuclearize the country.

Hours before the president’s comments, the United States said it had seized a North Korean ship that was flouting sanctions by carrying banned exports of coal. Meanwhile, a research group revealed a huge, years-old base that appears to have been designed to hide and protect the North’s growing arsenal of long-range missiles.

The menacing signals from both sides were further evidence that Mr. Trump, less than a year into his initiative to deal one on one with a North Korean autocrat, has run headlong into the roadblocks that doomed the efforts of his four immediate predecessors.

The diplomatic setback comes amid Mr. Trump’s tense argument over trade with China — the country he needs most to rein in Kim Jong-un, the North’s leader — and as the United States appears to be veering toward a deeper confrontation with Iran.