查找 jetty.xml 文件以获取该软件使用的端口号。
端口冲突还可能导致相关错误,例如未定义的用户以及端口访问失败。 这些问题可能不会立刻出现。如果 Jetty Web 服务器日志报告存在端口冲突,或由于随后使用 Rational Change 而引起错误,请检查日志文件以查找有关端口冲突和相关错误的警告。
这些步骤对于 Windows 和 UNIX 是相同的。
要解决 Jetty 上的端口冲突:
<!-- Configure the SocketListner / What port Jetty is running on --> <Call name="addListener"> <Arg> <New class="org.mortbay.http.SocketListener"> <Set name="Port">8600</Set> <Set name="MinThreads">5</Set> <Set name="MaxThreads">255</Set> <Set name="MaxIdleTimeMs">60000</Set> </New> </Arg> </Call>
<Call...> <Arg...> <Set name="Port">8888</Set> ... </Arg> </Call>
web.xml 文件中的项略有差别。例如:
<context-param> <param-name>port</param-name> <param-value>8600</param-value> </context-param>