1
0
-1

Can anyone help add some information to a blocker problem I'm having?

I have a Delivery Process that times out for no apparent reason. When I submit my form and the Job Controller is invoked I proceed through my Job Actions until I hit the Job Delivery process. Then it stalls and the script times out. If I look up the transaction in TM and click on "Retry Delivery" then my Delivery Process works perfectly. If I let the Job Controller invoke the Job Delivery then it fails every time. 

I've commented out certain parts of my Delivery Process to see if there's certain code that's failing and I've reduced it down to a function that's uploading the file to an SFTP server. If I comment out the SFTP portion of the code then everything works. If I leave it in then it fails.

The error in the log is:

java.util.concurrent.TimeoutException
	at java.util.concurrent.FutureTask.get(FutureTask.java:205)
	at com.avoka.core.groovy.runtime.GroovyScriptRuntime.executeScript(GroovyScriptRuntime.java:192)
	at com.avoka.core.groovy.runtime.GroovyScriptRuntime.executeScript(GroovyScriptRuntime.java:91)
	at com.avoka.fc.core.service.AbstractGroovyService.executeGroovyScript(AbstractGroovyService.java:356)
	at com.avoka.fc.core.service.AbstractGroovyService.executeGroovyScript(AbstractGroovyService.java:306)
	at com.avoka.fc.core.service.impl.GroovyDeliveryProcessService.deliverSubmission(GroovyDeliveryProcessService.java:103)
	at com.avoka.fc.core.service.impl.SubmissionDeliveryControllerService.deliverViaDeliveryProcess(SubmissionDeliveryControllerService.java:1625)
	at com.avoka.fc.core.service.impl.SubmissionDeliveryControllerService.deliverSubmission(SubmissionDeliveryControllerService.java:435)
	at com.avoka.fc.core.service.TransactionProcessor.processDelivery(TransactionProcessor.java:414)
	at com.avoka.fc.core.service.TransactionProcessor.processTransactions(TransactionProcessor.java:72)
	at com.avoka.fc.core.job.TransactionProcessingJob.executeJob(TransactionProcessingJob.java:31)
	at com.avoka.fc.core.job.AbstractJob.execute(AbstractJob.java:224)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

The SFTP code is:

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      I got this to work by adding an additional timeout setting to the code above: 

      I'm not sure why this made a difference. I was helped by the following article: http://stackoverflow.com/questions/20559448/jsch-sftp-hangs-at-session-connect-using-the-port-21

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Brad,

        Your delivery process is actually executed by the Transaction Processor Job which you can see in the stack trace. What is the Execution Timeout setting on your Delivery Process ? How long does the SFTP call take normally ?

        regards Malcolm

        1. Brad White

          Unfortunately I changed my timeout settings to be very long and it made no difference. I did figure it out and posted the fix.

        2. Malcolm Edgar

          Great, thanks for posting the SFTP fix

        CommentAdd your comment...