Navy Secretary James H. Webb Jr. and national security adviser Frank C. Carlucci were distressed that the military leaders they wanted to consult were out of the country when the USS Stark was attacked by an Iraqi fighter plane the night of May 17, according to Pentagon officials.

Adm. William J. Crowe Jr., chairman of the Joint Chiefs of Staff and the No. 1 military adviser to President Reagan, was in Paris; Gen. Larry D. Welch, Air Force chief of staff, was in en route to Brazil, and Gen. John A. Wickham, Army chief of staff, was on a Far East inspection swing.

Webb and Carlucci, according to a top Pentagon executive, were "furious" that so many top officers were out of the country at one time and not available for face-to-face consultation on how the United States should respond to the Stark attack.

There was also grumbling among some military professionals that Adm. Carlisle A.H. Trost, the chief of naval operations, left it to a deputy to brief the news media on the Stark tragedy, which took the lives of 37 sailors, going ahead with a planned vacation in Virginia Beach afterward.

Also absent was Rear Adm. J.B. Finkelstein, Navy information chief, who was conducting a public-information seminar in New Hampshire's White Mountains.

Marine Commandant P.X. Kelley, who was on duty in 1983 when 241 Marines were killed in the Beirut bombing, was in Washington and available for consultation after the Stark attack.

Spokesmen for the four-star officers who were out of the country on May 17 said that their bosses kept in constant, secure communication with Washington command centers and had deputies here to address any issues that arose after the Stark attack.

Cmdr. Thomas J. Jurkowsky, Trost's press aide, said the admiral was in town and available for consultation.

Trost left the Stark briefing to Vice Adm. Henry C. Mustin, director of plans, policy and operations, because he had the most detailed information on the situation, Jurkowsky said.

Mustin was the counterpart to Air Force Lt. Gen. R.A. Burpee of the Joint Chiefs of Staff, who also participated in the press briefing.

As for Trost's decision to go ahead with his vacation in Virginia Beach after the attack, Jurkowsky said the admiral kept in constant communication with the Pentagon, saying, "The only thing that changes when he goes on leave is the bed he sleeps in."

Capt. Jay Coupe, press aide to Crowe, said the admiral stayed on top of the Stark situation the whole time he was in Paris, and had thought about rushing back to Washington but saw little he could do in the Pentagon that his deputy could not.

Coupe noted that Congress, in passing the military reorganization act last year, established a vice chairman of the Joint Chiefs as the second-ranking military officer in the country.

Air Force Gen. Robert T. Herres, the vice chairman, was in Washington and fully up to date on the Stark situation and available to civilian policy-makers in the Pentagon, White House or elsewhere in the government, Coupe said.

"The system worked the way it was supposed to," Coupe said, maintaining that Herres filled the vacuum Congress was afraid would exist if a vice chairman were not added to the military command structure.

Before the reorganization, the uniformed heads of the Army, Navy, Air Force and Marine Corps had opposed creating the position of vice chairman. Previously, in the absence of the Joint Chiefs chairman, they assumed his duties, including briefing the president, on a rotating basis.