Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/331.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在mule中为出站URL启用TLSv1.2_Java_Mule_Mule Studio - Fatal编程技术网

Java 如何在mule中为出站URL启用TLSv1.2

Java 如何在mule中为出站URL启用TLSv1.2,java,mule,mule-studio,Java,Mule,Mule Studio,下面是我的流文件内容。我在JavaKeyTool的帮助下生成了.key文件。相同的流适用于TLSv1.1(当客户端使用TLSv1.1证书时),而不适用于TLSv1.2(客户端证书为TLSv1.2) 我已经尝试了以下选项 -Ddeployment.security.SSLv2Hello=false-Ddeployment.security.SSLv3=false-Ddeployment.security.TLSv1=false-Ddeployment.security.TLSv1.1=true

下面是我的流文件内容。我在JavaKeyTool的帮助下生成了.key文件。相同的流适用于TLSv1.1(当客户端使用TLSv1.1证书时),而不适用于TLSv1.2(客户端证书为TLSv1.2)


我已经尝试了以下选项

-Ddeployment.security.SSLv2Hello=false-Ddeployment.security.SSLv3=false-Ddeployment.security.TLSv1=false-Ddeployment.security.TLSv1.1=true-Ddeployment.security.TLSv1.2=true

-Dhttps.protocols=TLSv1.2-Dhttps.cipherSuites=TLS\u ECDHE\u RSA\u和\u AES\u 128\u GCM\u SHA256

但到目前为止运气不好。请帮我整理一下这个问题

Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection refused: connect (java.net.ConnectException)
  java.net.DualStackPlainSocketImpl:-2 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
  org.mule.transport.http.HttpClientMessageDispatcher:155 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

      * -XX:PermSize=128M
      * -XX:MaxPermSize=256M
      * -Ddeployment.security.SSLv2Hello=false
      * -Ddeployment.security.SSLv3=false
      * -Ddeployment.security.TLSv1=false
      * -Ddeployment.security.TLSv1.1=true
      * -Ddeployment.security.TLSv1.2=true
      * -Dmule.home=D:\MConnect\MuleStudioWorkspace\.mule
      * -Dlog4j.debug=true
      * -Dosgi.dev=true
      * -Dosgi.instance.area=file:/D:/MConnect/MuleStudioWorkspace
      * -Dfile.encoding=Cp1252
ERROR 2016-07-21 16:45:10,647 [[simpletest].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 
********************************************************************************
Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection refused: connect (java.net.ConnectException)
  java.net.DualStackPlainSocketImpl:-2 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
  org.mule.transport.http.HttpClientMessageDispatcher:155 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
消息:未能通过端点路由事件:DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com,连接器=https连接器
{
name=paypalConnector
生命周期=开始
这等于527fe4
ConcurrentTransacticedReceiver的数量=4
CreateMultipleTransactedReceiver=true
已连接=真
supportedProtocols=[https]
服务覆盖=
}
,name='endpoint.https.tlstest.paypal.com',mep=REQUEST\u RESPONSE,properties={http.method=POST},transactionConfig=Transaction{factory=null,action=interference,timeout=0},deleteUnceptedMessages=false,initialState=started,responseTimeout=10000,endpointEncoding=UTF-8,disableTransportTransformer=false}。消息负载的类型为:PostMethod
代码:MULE_错误--2
--------------------------------------------------------------------------------
异常堆栈是:
1.连接被拒绝:连接(java.net.ConnectException)
java.net.DualStackPlainSocketImpl:-2(空)
2.未能通过端点路由事件:DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com,连接器=https连接器
{
name=paypalConnector
生命周期=开始
这等于527fe4
ConcurrentTransacticedReceiver的数量=4
CreateMultipleTransactedReceiver=true
已连接=真
supportedProtocols=[https]
服务覆盖=
}
,name='endpoint.https.tlstest.paypal.com',mep=REQUEST\u RESPONSE,properties={http.method=POST},transactionConfig=Transaction{factory=null,action=interference,timeout=0},deleteUnceptedMessages=false,initialState=started,responseTimeout=10000,endpointEncoding=UTF-8,disableTransportTransformer=false}。消息负载的类型为:PostMethod(org.mule.api.transport.DispatchException)
org.mule.transport.http.HttpClientMessageDispatcher:155(http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
根异常堆栈跟踪:
java.net.ConnectException:连接被拒绝:连接
位于java.net.DualStackPlainSocketImpl.waitForConnect(本机方法)
位于java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
位于java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
+3个以上(为所有内容设置调试级别日志或“-Dmule.verbose.exceptions=true”)
********************************************************************************
*-XX:PermSize=128M
*-XX:MaxPermSize=256M
*-Ddeployment.security.SSLv2Hello=false
*-Ddeployment.security.SSLv3=false
*-Ddeployment.security.TLSv1=false
*-Ddeployment.security.TLSv1.1=true
*-Ddeployment.security.TLSv1.2=true
*-Dmule.home=D:\MConnect\MuleStudioWorkspace\.mule
*-Dlog4j.debug=true
*-Dosgi.dev=true
*-Dosgi.instance.area=文件:/D:/MConnect/MuleStudioWorkspace
*-Dfile.encoding=Cp1252
错误2016-07-21 16:45:10647[[simpletest].connector.http.mule.default.receiver.02]org.mule.exception.defaultMessaginExceptionsStrategy:
********************************************************************************
消息:未能通过端点路由事件:DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com,连接器=https连接器
{
name=paypalConnector
生命周期=开始
这等于527fe4
ConcurrentTransacticedReceiver的数量=4
CreateMultipleTransactedReceiver=true
已连接=真
supportedProtocols=[https]
服务覆盖=
}
,name='endpoint.https.tlstest.paypal.com',mep=REQUEST\u RESPONSE,properties={http.method=POST},transactionConfig=Transaction{factory=null,action=interference,timeout=0},deleteUnceptedMessages=false,initialState=started,responseTimeout=10000,endpointEncoding=UTF-8,disableTransportTransformer=false}。消息负载的类型为:PostMethod
代码:MULE_错误--2
--------------------------------------------------------------------------------
异常堆栈是:
1.连接被拒绝:连接(java.net.ConnectException)
java.net.DualStackPlainSocketImpl:-2(空)
2.未能通过端点路由事件:DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com,连接器=https连接器
{
name=paypalConnector
生命周期=开始
这等于527fe4
ConcurrentTransacticedReceiver的数量=4
CreateMultipleTransactedReceiver=true
已连接=真
supportedProtocols=[https]
服务覆盖=
}
,name='endpoint.https.tlstest.paypal.com',mep=REQUEST\u RESPONSE,properties={http.method=POST},transactionConfig=Transaction{factory=null,action=interference,timeout=0},deleteUnceptedMessages=false,initialState=started,responseTimeout=10000,endpointEncoding=UTF-8,disableTransportTransformer=false}。消息负载的类型为:PostMethod(org.mule.api.transport.DispatchException)
org.mule.transport.http.HttpClientMessageDispatcher:155(http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
根异常堆栈跟踪:
java.net.ConnectException:连接被拒绝:连接
位于java.net.DualStackPlainSocketImpl.waitForConnect(本机方法)
位于java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
在java.net.Abs
Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection refused: connect (java.net.ConnectException)
  java.net.DualStackPlainSocketImpl:-2 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
  org.mule.transport.http.HttpClientMessageDispatcher:155 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

      * -XX:PermSize=128M
      * -XX:MaxPermSize=256M
      * -Ddeployment.security.SSLv2Hello=false
      * -Ddeployment.security.SSLv3=false
      * -Ddeployment.security.TLSv1=false
      * -Ddeployment.security.TLSv1.1=true
      * -Ddeployment.security.TLSv1.2=true
      * -Dmule.home=D:\MConnect\MuleStudioWorkspace\.mule
      * -Dlog4j.debug=true
      * -Dosgi.dev=true
      * -Dosgi.instance.area=file:/D:/MConnect/MuleStudioWorkspace
      * -Dfile.encoding=Cp1252
ERROR 2016-07-21 16:45:10,647 [[simpletest].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: 
********************************************************************************
Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection refused: connect (java.net.ConnectException)
  java.net.DualStackPlainSocketImpl:-2 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://tlstest.paypal.com, connector=HttpsConnector
{
  name=paypalConnector
  lifecycle=start
  this=527fe4
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.tlstest.paypal.com', mep=REQUEST_RESPONSE, properties={http.method=POST}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
  org.mule.transport.http.HttpClientMessageDispatcher:155 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
<spring:property name="sslType" value="TLSv1.2" />
<https:connector name="paypalConnector" doc:name="HTTP\HTTPS" validateConnections="true" clientSoTimeout="10000" cookieSpec="netscape" receiveBacklog="0" receiveBufferSize="0" sendBufferSize="0" serverSoTimeout="10000" socketSoLinger="0">
     <spring:property name="sslType" value="TLSv1.2" />
     <service-overrides sessionHandler="org.mule.session.NullSessionHandler"/>
     <https:tls-server path="C:/Users/damodaram.setti/Desktop/PayPal/paypal.key" storePassword="paypal" requireClientAuthentication="true" />
</https:connector>
http:request-config doc:name="HTTP Request Configuration" name="HTTPS_Request_Configuration" protocol="HTTPS" connectionIdleTimeout="300000">
tls:context enabledProtocols="TLSv1">
tls:trust-store type="jks" password="${truststore.pwd}" path="${truststore.path}"/>
tls:key-store type="jks" password="${keystore.pass}" path="${keystore.path}" keyPassword="${keystore.keypass}" alias="${keystore.alias}"/>
/tls:context>
/http:request-config>