Java 带有Wildfly 16.0.0.Final的TLS/SSL和带有org.xnio.http.UpgradeFailedException的ejb客户端失败:无效响应代码200
我已经设置了一个EJB客户机,它可以成功地连接到Java 带有Wildfly 16.0.0.Final的TLS/SSL和带有org.xnio.http.UpgradeFailedException的ejb客户端失败:无效响应代码200,java,ssl,jboss,ejb,wildfly,Java,Ssl,Jboss,Ejb,Wildfly,我已经设置了一个EJB客户机,它可以成功地连接到remote+http://localhost:8080无SSL/TLS 现在,我创建了一个信任库和密钥库,并按照Wildfly文档中的说明设置SSL/TLS Mywildfly config.xml包含以下内容: <authentication-client xmlns="urn:elytron:1.0"> <authentication-rules> <rule use-configurat
remote+http://localhost:8080
无SSL/TLS
现在,我创建了一个信任库和密钥库,并按照Wildfly文档中的说明设置SSL/TLS
Mywildfly config.xml
包含以下内容:
<authentication-client xmlns="urn:elytron:1.0">
<authentication-rules>
<rule use-configuration="default-config"/>
</authentication-rules>
<authentication-configurations>
<configuration name="default-config">
<set-user-name name="${user}"/>
<credentials>
<clear-password password="${password}"/>
</credentials>
<sasl-mechanism-selector selector="#ALL" />
<providers>
<use-service-loader />
</providers>
</configuration>
</authentication-configurations>
<key-stores>
<key-store name="im-keystore" type="JKS">
<file name="client.truststore"/>
<key-store-clear-password password="xxx"/>
</key-store>
</key-stores>
<ssl-contexts>
<ssl-context name="im-ssl-context">
<trust-store key-store-name="im-keystore"/>
<protocol names="TLSv1.2"/>
</ssl-context>
</ssl-contexts>
<ssl-context-rules>
<rule use-ssl-context="im-ssl-context"/>
</ssl-context-rules>
</authentication-client>
有什么想法吗?结果是,缺少了一个额外的远程连接器,该连接器指向
连接器ref
,指向https侦听器,该侦听器在牵引下
小节中定义:
<subsystem xmlns="urn:jboss:domain:remoting:4.0">
<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
<http-connector name="https-remoting-connector" connector-ref="https" security-realm="ApplicationRealm"/>
</subsystem>
<https-listener name="https" socket-binding="https" ssl-context="httpsSSC" enable-http2="true"/>
LOG 2019-06-13T12:12:56Z [XNIO-1 task-1] TRACE org.jboss.remoting.endpoint - Registered exception result
org.xnio.http.UpgradeFailedException: Invalid response code 200
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:471) ~[xnio-api-3.6.5.Final.jar:3.6.5.Final]
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:400) ~[xnio-api-3.6.5.Final.jar:3.6.5.Final]
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) ~[xnio-api-3.6.5.Final.jar:3.6.5.Final]
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) ~[xnio-api-3.6.5.Final.jar:3.6.5.Final]
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) ~[xnio-nio-3.6.5.Final.jar:3.6.5.Final]
at org.xnio.nio.WorkerThread.run(WorkerThread.java:591) ~[xnio-nio-3.6.5.Final.jar:3.6.5.Final]
<subsystem xmlns="urn:jboss:domain:remoting:4.0">
<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
<http-connector name="https-remoting-connector" connector-ref="https" security-realm="ApplicationRealm"/>
</subsystem>