Bug 1271599 - mortgage quickstart hit connection problem with kie server
mortgage quickstart hit connection problem with kie server
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.2.0
Unspecified Unspecified
urgent Severity high
: ER5
: 6.2.0
Assigned To: Kris Verlaenen
Pavel Kralik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-14 07:19 EDT by Ryan Zhang
Modified: 2015-11-10 05:02 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ryan Zhang 2015-10-14 07:19:30 EDT
Description of problem:
I hit the connection problem when running the mortagage quickstarts on 6.2.0 ER4.


The client side error:
[rzhang@/home/rzhang/lab/1brms6/6.2.0/bpmsuite-6.2.0.ER4/jboss-brms-bpmsuite-6.2.0.ER4-quickstarts/jboss-brms-bpmsuite-6.2-quickstarts/jboss-bpmsuite-example]$java -jar jboss-mortgage-demo-client.jar quickstartUser quickstartPwd1!
Exception in thread "main" org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to retrieve content from response
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:425)
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeCommand(AbstractRemoteCommandObject.java:159)
        at org.kie.services.client.api.command.KieSessionClientCommandObject.startProcess(KieSessionClientCommandObject.java:276)
        at com.redhat.bpms.examples.mortgage.CreateProcesses.populateSamples(CreateProcesses.java:57)
        at com.redhat.bpms.examples.mortgage.CreateProcesses.main(CreateProcesses.java:47)
Caused by: org.kie.remote.common.rest.KieRemoteHttpRequestException: Unable to retrieve input stream of response
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseStream(KieRemoteHttpRequest.java:1378)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseBuffer(KieRemoteHttpRequest.java:1396)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseBody(KieRemoteHttpRequest.java:1338)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.access$2100(KieRemoteHttpRequest.java:117)
        at org.kie.remote.common.rest.KieRemoteHttpRequest$5.body(KieRemoteHttpRequest.java:1304)
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:407)
        ... 4 more
Caused by: java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1424)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseCode(KieRemoteHttpRequest.java:1318)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.post(KieRemoteHttpRequest.java:719)
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:362)
        ... 4 more

The server side error stack:
19:12:03,444 INFO  [org.jboss.resteasy.cdi.i18n] (http-localhost.localdomain/127.0.0.1:8080-1) RESTEASY006050: Found BeanManager at java:comp/BeanManager
19:12:03,722 INFO  [org.uberfire.backend.server.security.adapter.WeblogicGroupsAdapter] (http-localhost.localdomain/127.0.0.1:8080-1) Unable to find weblogic.security.Security, disabling weblogic adapter
19:12:03,722 INFO  [org.uberfire.backend.server.security.adapter.WebSphereGroupsAdapter] (http-localhost.localdomain/127.0.0.1:8080-1) Unable to look up UserRegistry in JNDI under key 'UserRegistry', disabling websphere adapter
19:12:03,734 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (http-localhost.localdomain/127.0.0.1:8080-1) RESTEASY000100: Failed executing POST execute: org.jboss.resteasy.spi.UnauthorizedException
	at org.jboss.resteasy.plugins.interceptors.SecurityInterceptor.preProcess(SecurityInterceptor.java:68) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:252) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:561) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:543) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:128) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.kie.remote.services.rest.jaxb.DynamicJaxbContextFilter.doFilter(DynamicJaxbContextFilter.java:63) [kie-remote-services-6.3.0.Final-redhat-2.jar:6.3.0.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.uberfire.ext.security.server.BasicAuthSecurityFilter.doFilter(BasicAuthSecurityFilter.java:53) [uberfire-servlet-security-0.7.4.Final-redhat-1.jar:0.7.4.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:53) [uberfire-servlet-security-0.7.4.Final-redhat-1.jar:0.7.4.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:45) [uberfire-servlet-security-0.7.4.Final-redhat-1.jar:0.7.4.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:420) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:400) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Ryan Zhang 2015-10-14 07:59:33 EDT
To produce this, just follow the guide of readme of jboss-brms-bpmsuite-6.2-quickstarts/jboss-bpmsuite-example.

It can be reproduced on ER4.
BxMS 6.2.0 ER4  is available at:
http://dev138.mw.lab.eng.bos.redhat.com/candidate/brms-6.2.0.ER4/
http://dev138.mw.lab.eng.bos.redhat.com/candidate/bpmsuite-6.2.0.ER4/
Comment 3 Kris Verlaenen 2015-10-14 09:07:49 EDT
Marco, the introduction of the new authorization role for remote API requires a small extension to the mortgage app to include this role for the demo user(s) as well.  

Also take a look at improving the error reporting on the client side, should report a simple 'not authorized'.
Comment 4 Pavel Kralik 2015-10-14 10:16:23 EDT
jboss-mortgage-demo-client.jar must be run with rest user with restall role since BxMS 6.2.

eg.
bin/add-user.sh -a -u 'restuser' -p '<restuserpass>' -ro 'rest-all'
java -jar jboss-mortgage-demo-client.jar restuser <restuserpass>
Comment 5 Kris Verlaenen 2015-10-22 09:23:15 EDT
I'll update readme with necessary instructions.
Comment 7 Ryan Zhang 2015-10-23 04:22:48 EDT
(In reply to Kris Verlaenen from comment #6)
> https://github.com/jboss-integration/jboss-bpm-example-app/commit/
> 14d022a2efb0fff8e006b8acc1baec900bd0d97e

Hi, Kris
Could we apply the fix to 6.2.x branch instead?
It is  6.2.x branch which is used by product 6.2.
Comment 9 Pavel Kralik 2015-11-06 07:52:00 EST
BPMS 6.2.0.ER5

Note You need to log in before you can comment on or make changes to this bug.