【发布时间】:2021-09-09 09:52:37
【问题描述】:
我正在使用码头服务器版本 9.4.41.v20210516 运行我的应用程序,它运行良好。 我最近将码头版本升级到 11.0.6。以下是我的 jetty.xml 文件配置
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
</Arg>
</Call>
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<Set name="sendServerVersion"><Property name="jetty.send.server.version" default="false" /></Set>
<Set name="sendDateHeader"><Property name="jetty.send.date.header" default="false" /></Set>
</New>
<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
<Set name="KeyStorePath"><SystemProperty name="mcruncher.app.dataDir" default="." />\<Property name="jetty.keystore" default="temp\keystore.jks"/></Set>
<Set name="KeyStorePassword">
<Property name="jetty.keystore.password" default=""/>
</Set>
<Set name="EndpointIdentificationAlgorithm"></Set>
<Set name="IncludeProtocols">
<Array type="String">
<Item>TLSv1.2</Item>
</Array>
</Set>
<Set name="IncludeCipherSuites">
<Array type="String">
<Item>TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384</Item>
<Item>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</Item>
</Array>
</Set>
<New id="tlsHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<Arg><Ref refid="httpConfig"/></Arg>
<Call name="addCustomizer">
<Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg>
</Call>
</New>
</New>
<Call id="sslConnector" name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server"><Ref refid="Server" /></Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.SslConnectionFactory">
<Arg name="next">http/1.1</Arg>
<Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
</New>
</Item>
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config"><Ref refid="tlsHttpConfig"/></Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="port"><Property name="jetty.port" default="9090" /></Set>
<Set name="idleTimeout"><Property name="jetty.idleTimeout" default="30000"/></Set>
<Set name="soLingerTime"><Property name="jetty.soLingerTime" default="-1"/></Set>
</New>
</Arg>
</Call>
</Configure>
升级后版本jetty server没有启动,出现如下异常
<Property name="jetty.keystore.password" default=""/>
</Set><Set name="EndpointIdentificationAlgorithm"/><Set name="IncludeProtocols">
<Array type="String"><Item>TLSv1.2</Item></Array>
</Set><Set name="IncludeCipherSuites">
<Array type="String"><Item>TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384</Item><Item>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</Item></Array>
</Set><New id="tlsHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration"><Arg><Ref refid="httpConfig"/></Arg><Call name="addCustomizer"><Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg></Call></New></New> on Server@30506c0d{STOPPED}[11.0.6,sto=0]
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:1001)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:470)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:380)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:303)
谁能帮我解决这个问题?
【问题讨论】:
-
你为什么要编辑
jetty.xml?你在使用jetty-home发行版吗?还是做一些完全定制的事情? -
嗨@Joakim Erdfelt,我没有使用jetty-home 分发。它完全是定制的。我现在没有编辑 jetty.xml 文件。这是我到目前为止在我的应用程序中的文件。我刚刚将版本从 9.x 升级到 11.x。升级后我得到了这个异常。
标签: jetty