Why did Eisenhower's warning of the impending power of the "Military Industrial Complex" not work, still leaving Vietnam as America's longest war?
There are at least two points that can be made in relation to this question.
First, we must realize that President Eisenhower was not warning against getting involved in wars. He was not arguing that the US should withdraw from the world stage. He was not repudiating the idea of containment. He was not arguing that the US should stop having a large and powerful military. Instead, he said
A vital element in keeping the peace is our military establishment. Our arms must be mighty, ready for instant action, so that no potential aggressor may be tempted to risk his own destruction.
Eisenhower was warning about the political influence and economic importance of the military industrial complex at home, not about the need to stay out of foreign wars.
Second, even if Eisenhower and his successors were worried about the power of the military industrial complex, they were more worried about the spread of communism. They felt that the spread of communism would be tremendously damaging to the world as a whole and to the interests of the US. Therefore, they would have supported a continuing war in Vietnam as a way of ensuring that communism did not become too powerful.
For these reasons, Eisenhower and his successors kept the US involved in Vietnam for a very long time.