配置API订阅BPS时的问题WSO2

时间:2017-11-09 06:42:45

标签: wso2 wso2-am wso2bps

所以,我的WSO2 BPS 3.6.0配置为支持SSL和自定义主机名,即 mydomain.domain.com:9445 等,我试图实施遵循this文档, API订阅工作流程

现在我执行了以下步骤:

  • 将wso2 bps的偏移量设置为2,并且端口运行正常:9445
  • 编辑了位于API-M_HOME / business中的 SubscriptionService.epr SubscriptionCallbackService.epr 中的 wsa:Address 标记过程/ EPR 因为bps服务器有自定义主机名而不是localhost(不确定执行此步骤是否正确)

    SubscriptionService.epr enter image description here SubscriptionCallBackService.epr enter image description here

  • 将epr文件夹从API-M_HOME / business-processes / epr复制粘贴到BPS_HOME / repository / conf / epr

  • 相应地添加了所需的 BPEL包人工任务

  • 从APIM导航到碳控制台并编辑 workflow-extensions.xml ,这是它的样子 enter image description here

  • b4p-cordination-config.xml TaskCoordinationEnabled 标记设置为位于BPS_Home \ repository \ conf
  • 中的 true

考虑其他必需的配置:

在API Manager End

  • site.json文件位于APIM_Home \ repository \ deployment \ server \ jaggeryapps \ admin \ site \ conf
{
  "theme": {
    "base": "wso2",
    "subtheme": "modern"
  },
  "context": "/admin",
  "request_url": "READ_FROM_REQUEST",
  "tasksPerPage": 10,
  "allowedPermission": "/permission/admin/manage/apim_admin",
  "workflows": {
     "workFlowServerURL": "https://mydomain.domain.com:9445/services/",
  },
  "ssoConfiguration": {
    "enabled": "false",
    "issuer": "API_WORKFLOW_ADMIN",
    "identityProviderURL": "https://localhost:9443/samlsso",
    "keyStorePassword": "",
    "identityAlias": "",
    "keyStoreName": "",
    "verifyAssertionValidityPeriod": "true",
    "audienceRestrictionsEnabled": "true",
    "responseSigningEnabled": "true",
    "assertionSigningEnabled": "true",
    "assertionEncryptionEnabled": "false",
    "idpInit" : "false",
    "idpInitSSOURL" : "https://localhost:9443/samlsso?spEntityID=API_WORKFLOW_ADMIN",
    "externalLogoutPage" : "https://localhost:9443/samlsso?slo=true"
  },
  "reverseProxy": {
    "enabled": false,
    // values true , false , "auto" - will look for  X-Forwarded-* headers
    "host": "sample.proxydomain.com",
    // If reverse proxy do not have a domain name use IP
    "context": ""
    //"regContext":"" // Use only if different path is used for registry
  }
}
  • api-manager.xml中的工作流配置 enter image description here

在BPS结束时

  • carbon.xml enter image description here

问题现在,只要用户导航到APIM Store并订阅任何API,就会在APIM管理控制台中列出订阅请求。当我从提供的ddl中选择APPROVE并单击COMPLETE按钮时,记录消失。但是,这是我在WSO2的CMD窗口中看到的错误:

APIM的cmd窗口

  

[2017-11-09 00:13:17,022] INFO - TimeoutHandler这个引擎会   GLOBAL_TIMEOUT之后的所有cal lbacks:120秒,无论如何   超时操作的时间,指定的或可选的超时

     

[2017-11-09 00:13:17,164]错误 - TargetHandler I / O错误:主机名   验证主机失败:localhost javax.net.ssl.SSLException:   主机:localhost的主机名验证失败           在org.apache.synapse.transport.http.conn.ClientSSLSetupHandler.verify(C   lientSSLSetupHandler.java:171)           at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession)   的.java:308)           在org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSes)   sion.java:410)           在org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(Abstra)   ctIODispatch.java:119)           at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor)   的.java:159)           at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(Abstr   actIOReactor.java:338)           at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(Abst   ractIOReactor.java:316)           在org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIO)   Reactor.java:277)           在org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor。   的java:105)           在org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor $ Worker。   运行(AbstractMultiworkerIOReactor.java:586)           在java.lang.Thread.run(Thread.java:745)

     

[2017-11-09 00:13:17,188]警告 - EndpointContext端点:AnonymousEndpoint w   ith地址   https://localhost:9443/store/site/blocks/workflow/workflow-listener/   ajax / workflow-listener.jag将在失败时标记为SUSPENDED

     

[2017-11-09 00:13:17,193] WARN - EndpointContext暂停端点   :带地址的Anonymou sEndpoint   https://localhost:9443/store/site/blocks/workflow/workflo   w-listener / ajax / workflow-listener.jag - 当前挂起持续时间为:   30000ms - 下次重试:11月9日星期四00:13:47 2017

     

[2017-11-0900:13:17,201] INFO - LogMediator STATUS =执行默认'错误'   序列,ERROR_CODE = 101500,ERROR_MESSAGE =发件人错误

     

[2017-11-09 00:14:17,238] INFO - SourceHandler Writer null时   调用informW riterError [2017-11-09 00:14:17,238]警告 -   SourceHandler读取请求t后的连接超时:   http-incoming-1套接字超时:60000远程地址:/10.10.30.130   :49249

     

[2017-11-09 00:14:24,671]错误 - AxisEngine端点   未找到操作的参考(EPR)是   / services / WorkflowCallbackService和WSA Action = null。如果这   EPR以前可以访问,请联系服务器管理员   TOR。 org.apache.axis2.AxisFault:的端点引用(EPR)   操作不是/ services / WorkflowCallbackService和WSA   Action = null。如果此EPR以前可以访问,请联系   服务器管理员。           在org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha)   se.java:102)           在org.apache.axis2.engine.Phase.invoke(Phase.java:329)           在org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)           在org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)           在org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEn   closingRESTHandler(ServerWorker.java:325)           在org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.j)   AVA:158)           at org.apache.axis2.transport.base.threads.NativeWorkerPool $ 1.run(Native   WorkerPool.java:172)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor。   Java的:1142)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor)   的.java:617)           at java.lang.Thread.run(Thread.java:745)[2017-11-09 00:14:24,673]错误 - ServerWorker处理GET请求时出错:   / services / WorkflowCallbackService org.apache.axis2.AxisFault:The   操作的端点参考(EPR)不是   / services / WorkflowCallbackService和WSA Action = null。如果这   EPR以前可以访问,请联系服务器   管理员。           在org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha)   se.java:102)           在org.apache.axis2.engine.Phase.invoke(Phase.java:329)           在org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)           在org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)           在org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEn   closingRESTHandler(ServerWorker.java:325)           在org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.j)   AVA:158)           at org.apache.axis2.transport.base.threads.NativeWorkerPool $ 1.run(Native   WorkerPool.java:172)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor。   Java的:1142)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor)   的.java:617)           在java.lang.Thread.run(Thread.java:745)

BPS的cmd窗口

  

[2017-11-09 00:14:16,738] ERROR {org.wso2.carbon.bpel.core.ode.integration.Partn erService} - 错误   向Axis2发送消息以获取ODE mex {PartnerRoleMex #hqejbhc   nphrcr2a32g83oh [PID   {http://workflow.subscription.apimgt.carbon.wso2.org}订阅人数   iptionApprovalWorkFlowProcess-1]调用   org.apache.ode.bpel.epr.WSAEndpoint@705 fc38f.resumeEvent(...)状态   请求} org.apache.axis2.AxisFault:读取超时           在org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)           在org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.jav)   一:199)           在org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)           在org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessa   geWithCommons(CommonsHTTPTransportSender.java:451)           在org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Com   monsHTTPTransportSender.java:278)           在org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)           at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(O   utOnlyAxisOperation.java:297)           在org.apache.axis2.client.OperationClient.execute(OperationClient.java:   149)           在org.wso2.carbon.bpel.core.ode.integration.utils.AxisServiceUtils.invo   keService(AxisServiceUtils.java:323)           在org.wso2.carbon.bpel.core.ode.integration.PartnerService.invoke(Partn)   erService.java:333)           在org.wso2.carbon.bpel.core.ode.integration.BPELMessageExchangeContextI   mpl.invokePartner(BPELMessageExchangeContextImpl.java:43)           在org.apache.ode.bpel.engine.BpelRuntimeContextImpl.invoke(BpelRuntimeC)   ontextImpl.java:897)           在org.apache.ode.bpel.runtime.INVOKE.run(INVOKE.java:130)           at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces   sorImpl.java:43)           在java.lang.reflect.Method.invoke(Method.java:483)           在org.apache.ode.jacob.vpu.JacobVPU $ JacobThreadImpl.run(JacobVPU.java:4   51)           在org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)           在org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntime)   ContextImpl.java:1002)           在org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeInstance(Partn)   erLinkMyRoleImpl.java:250)           在org.apache.ode.bpel.engine.BpelProcess $ 1.invoke(BpelProcess.java:288)

    at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java
     

:224)           在org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java)   :279)           在org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.j)   AVA:434)           在org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineIm)   pl.java:558)           在org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerIm)   pl.java:467)           at org.apache.ode.scheduler.simple.SimpleScheduler $ RunJob $ 1.call(SimpleS   cheduler.java:633)           at org.apache.ode.scheduler.simple.SimpleScheduler $ RunJob $ 1.call(SimpleS   cheduler.java:627)           at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simpl   eScheduler.java:298)           at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simpl   eScheduler.java:253)           at org.apache.ode.scheduler.simple.SimpleScheduler $ RunJob.call(SimpleSch)   eduler.java:627)           at org.apache.ode.scheduler.simple.SimpleScheduler $ RunJob.call(SimpleSch)   eduler.java:611)           at java.util.concurrent.FutureTask.run(FutureTask.java:266)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor。   Java的:1142)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor)   的.java:617)           at java.lang.Thread.run(Thread.java:745)引起:java.net.SocketTimeoutException:读取超时           在java.net.SocketInputStream.socketRead0(本机方法)           在java.net.SocketInputStream.read(SocketInputStream.java:150)           在java.net.SocketInputStream.read(SocketInputStream.java:121)           at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)           at sun.security.ssl.InputRecord.read(InputRecord.java:503)           at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:961)           在sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:918)

    at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:
     

78)           在org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)   )           在org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection。   Java的:1116)           在org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ Http   ConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)           在org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMetho)   dBase.java:1973)           在org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB)   ase.java:1735)           在org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j   AVA:1098)           在org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt)   pMethodDirector.java:398)           在org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe)   thodDirector.java:171)           在org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav)   一:397)           at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abst   ractHTTPSender.java:659)           在org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.jav)   一:195)           ......还有34个

这可能是什么问题?任何的想法?请告诉我感谢

请注意,API状态更改的bps工作流程可以使用相同的配置正常工作

1 个答案:

答案 0 :(得分:1)

请注意,您正在使用具有特定域名的HTTPS呼叫

  

org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake上的主机:localhost at org.apache.synapse.transport.http.conn.ClientSSLSetupHandler.verify(ClientSSLSetupHandler.java:171)的主机名验证失败(SSLIOSession .java:308)

提供的证书是CN=localhost,所以主机验证确实失败了

你可以做些什么

  • 最简单的方法是在安全网络(防火墙,vpn,..)后切换到 http
  • 更新BPS和APIM的SSL证书以匹配其主机名,并且他们必须相互信任证书(或证书颁发者)
  • 在axis2.xml中禁用SSL主机名验证(我不推荐它,适用于DEV,对于PROD非常糟糕) - 设置<parameter name="HostnameVerifier">AllowAll</parameter>