TWCable / grabbit

Grabbit - Fast Content Sync tool for AEM/CQ
Apache License 2.0
125 stars 64 forks source link

Sync failing from 6.4 to 6.2 #225

Open sivaprasad504 opened 5 years ago

sivaprasad504 commented 5 years ago

Thanks for taking the time to fill out an issue! To help the community solve your issue, please provide answers to the following questions, along with supporting log and configuration files.

what could be the problem here?

What version of AEM are you running? tried running on AEM 6.4 as client and tried 6.2 as server to copy content for some /content/dam Installed all 3 bundles and latest grabbit version on both. bundles are active

How do you produce the issue? everytime. whenever I run the script it give me tansaction ID and job ID but when I monitor the job or transaction status it shows the status failed with "jcrNodeswritten":-1

Does the issue occur consistently? All the time

Any additional details?

from the job monitor output:

11T16:14:21+0000"},{"transactionID":6531857564366275772,"jobExecutionId":3210166830426842313,"jcrNodesWritten":-1,"exitStatus":{"exitDescription":"","exitCode":"FAILED","running":false},"endTime":"2019-04-11T16:11:39+0000","timeTaken":404,"path":"/content/cq:tags","startTime":"2019-04-11T16:11:39+0000"},{"transactionID":3399161903609006466,"jobExecutionId":6465188553561000625,"jcrNodesWritten":-1,"exitStatus":{"exitDescription":"","exitCode":"FAILED","running":false},"endTime":"2019-04-11T15:58:22+0000","timeTaken":1505,"path":"/content/cq:tags","startTime":"2019-04-11T15:58:20+0000"}]

from logs:

11.04.2019 17:04:35.765 [clientJobLauncherTaskExecutor-10] com.twcable.grabbit.client.batch.ClientBatchJobExecutionListener INFO Cleanup : JobExecution: id=3466417388536566353, version=1, startTime=Thu Apr 11 17:04:35 UTC 2019, endTime=Thu Apr 11 17:04:35 UTC 2019, lastUpdated=Thu Apr 11 17:04:35 UTC 2019, status=FAILED, exitStatus=exitCode=FAILED;exitDescription=, job=[JobInstance: id=10, version=0, Job=[clientJob]], jobParameters=[{serverPassword=xxxxxx, deleteBeforeWrite=false, scheme=http, port=4502, transactionID=3218903010843760215, clientUsername=admin, excludePaths=, workflowConfigIds=/etc/workflow/launcher/config/update_asset_mod|/etc/workflow/launcher/config/update_asset_create|/etc/workflow/launcher/config/dam_xmp_writeback, batchSize=150, timestamp=1555002275200, serverUsername=admin, host=http://somehostname, pathDeltaContent=false, path=/content/dam/somedamcontent}] . Job Complete. Releasing session, and input stream 11.04.2019 17:04:35.766 [clientJobLauncherTaskExecutor-10] com.twcable.grabbit.client.batch.ClientBatchJobExecutionListener INFO Grab from http://somehostname for Current Path /content/dam/somedamcontent took : 434 milliseconds

Also found this error in the AEM error.log

12.04.2019 06:32:11.718 ERROR [clientJobLauncherTaskExecutor-1] org.springframework.batch.core.step.AbstractStep Encountered an error executing step startHttpConnection in job clientJob java.lang.IllegalArgumentException: unexpected host: http://(server name) at okhttp3.HttpUrl$Builder.host(HttpUrl.java:1008) at com.twcable.grabbit.client.batch.steps.http.CreateHttpConnectionTasklet.getURLForRequest(CreateHttpConnectionTasklet.groovy:94) at com.twcable.grabbit.client.batch.steps.http.CreateHttpConnectionTasklet.createConnection(CreateHttpConnectionTasklet.groovy:77) at com.twcable.grabbit.client.batch.steps.http.CreateHttpConnectionTasklet.execute(CreateHttpConnectionTasklet.groovy:56) at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:395) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:267) at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:77) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:368) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144) at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:253) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:141) at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64) at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60) at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:151) at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:130) at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135) at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:301) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:134) at 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)

sivaprasad504 commented 5 years ago

never mind was able to figure out the issue and fix it. it was due to adding http:// for the host name which was pointed out by the error here java.lang.IllegalArgumentException: unexpected host: http://(server name), removing that in the config json fixed it. happing grabbing :)