The Babylon 5 TV movie, In the Beginning, shows how an Earth Force captain started the war with the Minbari.
The Minbari Grey Council, led by Dukhat, have become concerned that the Shadows may have returned to Z'ha'dum in fulfillment of Valen's prophecy. They are taking a roundabout route to investigate when they encounter Earth ships, specifically the Prometheus, seeking to investigate the Minbari.
The Minbari ships turn toward the Prometheus and engage their long-range sensors to gain more data on the unknown Earth ship. Unknown to the Minbari, the intense EMP field generated by their sensors disables the Prometheus' jump engine, preventing the Earth ship from retreating. As the Minbari ships draw closer, they open their gun ports—a sign of respect in their culture. The interference from the Minbari sensors also prevents the Prometheus from determining whether or not the Minbari ships are charging their weapons. The captain of the Prometheus, with his jump engines disabled and the Minbari ships approaching with apparent intent to fire, misinterprets this as a sign of aggression and opens fire. The Minbari ships are heavily damaged, and Dukhat is killed. In retaliation, the Grey Council declares a holy war against humanity, and the Earth–Minbari War begins.
How did the captain know the open ports were for weapons?
The open ports could have been for sensor equipment. Or for docking arms. Or for creating jump gates. Or some technology beyond what humans know.
The point is that the captain could not know since this is the first contact with the Minbari. He does not know Minbari ships. He does not know Minbari technology.