History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2679
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: AlSt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

HessianProtocolException on checkout of latest build when source folder does not exist

Created: 31/Mar/16 08:54 AM   Updated: 07/Jul/16 01:09 AM
Component/s: None
Affects Version/s: 6.1.9
Fix Version/s: 6.1.19

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
It is pretty hard to find the reason why the following exception occurs:
03:49:43,336 ERROR - Step 'master>checkout>checkout-qb-com.dynatrace.diagnostics.automation' is failed.
    com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException: ' ' is an unknown code
        at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:226)
        at com.sun.proxy.$Proxy23.queryUniqueResult(Unknown Source)
        at com.pmease.quickbuild.persistence.AgentQueryCarrier.invoke(AgentQueryCarrier.java:59)
        at com.sun.proxy.$Proxy22.uniqueResult(Unknown Source)
        at com.pmease.quickbuild.entitymanager.impl.DefaultBuildManager.getPrevious(DefaultBuildManager.java:130)
        at com.pmease.quickbuild.persistence.SessionInterceptor.invoke(SessionInterceptor.java:49)
        at com.pmease.quickbuild.model.Build.getPrevious(Build.java:869)
        at com.pmease.quickbuild.model.Build.getChangeBase(Build.java:1286)
        at com.pmease.quickbuild.repositorysupport.Repository.getChanges(Repository.java:401)
        at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$4847fde8.CGLIB$getChanges$45(<generated>)
        at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$4847fde8$$FastClassByCGLIB$$5f095607.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$4847fde8.getChanges(<generated>)
        at com.pmease.quickbuild.repositorysupport.Repository.getChanges(Repository.java:375)
        at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$4847fde8.CGLIB$getChanges$46(<generated>)
        at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$4847fde8$$FastClassByCGLIB$$5f095607.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$4847fde8.getChanges(<generated>)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep.run(CheckoutStep.java:74)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep$$EnhancerByCGLIB$$a3907b11.CGLIB$run$0(<generated>)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep$$EnhancerByCGLIB$$a3907b11$$FastClassByCGLIB$$e6930ea8.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep$$EnhancerByCGLIB$$a3907b11.run(<generated>)
        at com.pmease.quickbuild.stepsupport.Step.execute(Step.java:548)
        at com.pmease.quickbuild.stepsupport.StepExecutionJob.executeStepAwareJob(StepExecutionJob.java:31)
        at com.pmease.quickbuild.stepsupport.StepAwareJob.executeBuildAwareJob(StepAwareJob.java:45)
        at com.pmease.quickbuild.BuildAwareJob.execute(BuildAwareJob.java:60)
        at com.pmease.quickbuild.grid.GridJob.run(GridJob.java:106)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: com.caucho.hessian.io.HessianProtocolException: ' ' is an unknown code
        at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:224)
        ... 35 more

It seems this is the case when the latest build (not the latest successful) is used and the source folder did not get published in the build which should be checked out.
Please at least throw an exception will a explanatory message.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [01/Apr/16 12:42 AM]
The stack trace shows that this should not be caused by missing source folder when downloading QuickBuild artifacts. Are you able to reproduce this issue every time when the latest dependency build misses the source folder?

AlSt [01/Apr/16 06:36 AM]
I will try to reproduce that and provide more information. But I suspected that's the cause because I already saw that a couple of times and that was always when the dependency build failed and had no artifacts published.

Robin Shen [02/Apr/16 12:38 AM]
I tried but QB simply reports that the directory to fetch does not exist in case there are no artifacts being published.

AlSt [23/Jun/16 10:29 AM]
Ok I was able to reproduce the HessianProtocolException:

Following steps:

1. Create 2 configurations ("dependency", "build")
2. In "dependency" add one script step with:
groovy:
throw new Exception("fail")
3. Set build condition in "dependency" to "always build" (just for testing, production builds have the "changes in ref repos")
4. In "build" create a qb repository which checks out everything from "dependency" and use "latest build (or new if necessary)
5. Create a checkout step for this repository in "build"
6. IMPORTANT: Let the "build" config run on another node than the server (I used a ubuntu here)
7. Run the configuration "build" -> it will fail with a hessianprotocolexception

Robin Shen [24/Jun/16 02:33 AM]
Thanks. I did reproduced this following your instructions. This issue has now been fixed and the fix will be shipped in next patch release.