Skip to Content
author's profile photo Former Member
Former Member

Datahub Publication error tomcat port getting changed

Hi,

I'm using Datahub 6 and Hybris 6 versions. My tomcat port is 7080. After composition when I try to publish to Hybris, I'm facing the following error.

INFO [hybrisHTTP30] [: , , , , ] [ItemImportController] Received request PUT: /import/pools/SAPCUSTOMER_INBOUND_POOL/publications/2 INFO [hybrisHTTP30] [: , , , , ] [ItemImportController] resultCallbackUrl: http://localhost:7080/datahub-webapp/v1/core-publications/2 INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpexDataImportClient] Requesting data from resource http://localhost:7080/datahub-webapp/v1/core-publications/2/TargetSalesDistrict.txt?targetName=HybrisCore&locale=&fields=salesArea,salesDistId&lastProcessedId=0&pageSize=1000 INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpexDataImportClient] Requesting data from resource http://localhost:7080/datahub-webapp/v1/core-publications/2/TargetAddress.txt?targetName=HybrisCore&locale=&fields=town,streetnumber,streetname,name,lastname,firstname,publicKey,addId,duplicate,owner,shippingAddress,sortField,region,lang,fax,phone1,taxRegion,postalcode,country&lastProcessedId=0&pageSize=1000 INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpexDataImportClient] Requesting data from resource http://localhost:7080/datahub-webapp/v1/core-publications/2/TargetSoldTo.txt?targetName=HybrisCore&locale=&fields=active,currency,locName,country,shippingAddress,billingAddress,uid&lastProcessedId=0&pageSize=1000 INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpexDataImportClient] Requesting data from resource http://localhost:7080/datahub-webapp/v1/core-publications/2/TargetShipTo.txt?targetName=HybrisCore&locale=&fields=town,taxRegion,region,sortField,postalcode,phone1,lang,line2,line1,name,lastName,firstName,duplicate,owner,country,accountGroup,sapCustomerID,uid&lastProcessedId=0&pageSize=1000 INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpExImportJob] Starting multi-threaded ImpEx cronjob "ImpEx-Import" (5 threads) INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpExImportJob] Starting multi-threaded ImpEx cronjob "ImpEx-Import" (5 threads) INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpexDataImportClient] Returning SUCCESS to http://localhost:7080/datahub-webapp/v1/core-publications/2 INFO [hybrisHTTP24] [: , , , , ] [ItemImportController] Received request PUT: /import/pools/SAPCUSTOMER_INBOUND_POOL/publications/3 INFO [hybrisHTTP24] [: , , , , ] [ItemImportController] resultCallbackUrl: http://localhost:8080/datahub-webapp/v1/core-publications/3 INFO [TaskExecutor-master-215-Task [8798321542070]] [: , , , , ] [ImpexDataImportClient] Response status from http://localhost:7080/datahub-webapp/v1/core-publications/2: 200 INFO [TaskExecutor-master-227-Task [8798321574838]] [: , , , , ] [ImpexDataImportClient] Requesting data from resource http://localhost:8080/datahub-webapp/v1/core-publications/3/TargetMMMContactsRelation.txt?targetName=HybrisCore&locale=&fields=deleteFlag,partnershipAgreement,shipTo,soldTo,salesDistrict,salesOrg,contactUid,uid&lastProcessedId=0&pageSize=1000 INFO [TaskExecutor-master-227-Task [8798321574838]] [: , , , , ] [ImpexDataImportClient] Requesting data from resource http://localhost:8080/datahub-webapp/v1/core-publications/3/TargetMMMContactsRelation.txt?targetName=HybrisCore&locale=&fields=deleteFlag,partnershipAgreement,shipTo,soldTo,salesDistrict,salesOrg,contactUid,uid&lastProcessedId=0&pageSize=1000 INFO [TaskExecutor-master-227-Task [8798321574838]] [: , , , , ] [ImpexDataImportClient] Returning ERROR(Error writing media file (mediaId: 8803008380958, file:C:\appdata\data02_hybris50\media\sys_master\impex\hfa\h93\8803008380958.bin, dir:C:\appdata\data02_hybris50\media\sys_master\impex\hfa\h93)) to http://localhost:8080/datahub-webapp/v1/core-publications/3 INFO [TaskExecutor-master-227-Task [8798321574838]] [: , , , , ] [ImpexDataImportClient] Response status from http://localhost:8080/datahub-webapp/v1/core-publications/3: 401 ERROR [TaskExecutor-master-227-Task [8798321574838]] [: , , , , ] [ImpexDataImportClient] Failed to communicate to http://localhost:8080/datahub-webapp/v1/core-publications/3 java.lang.IllegalStateException: Unauthorized response from http://localhost:8080/datahub-webapp/v1/core-publications/3 at com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResult(ImpexDataImportClient.java:79) at com.mmm.bcom.mmmbcomcommon.datahub.core.facades.impl.MMMItemImportFacadeImpl.callbackToDataHub(MMMItemImportFacadeImpl.java:93) at com.mmm.bcom.mmmbcomcommon.datahub.core.facades.impl.MMMItemImportFacadeImpl.importItems(MMMItemImportFacadeImpl.java:41) at com.hybris.datahub.core.tasks.ItemImportTaskRunner.run(ItemImportTaskRunner.java:48) at com.hybris.datahub.core.tasks.DefaultDataHubTaskExecutionStrategy.run(DefaultDataHubTaskExecutionStrategy.java:33) at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1505) at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1409) at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:1378) at de.hybris.platform.task.impl.DefaultTaskService$5.run(DefaultTaskService.java:1257) 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) ERROR [TaskExecutor-master-227-Task [8798321574838]] [: , , , , ] [ItemImportTaskRunner] ItemImportTaskRunner.handleError() de.hybris.platform.servicelayer.exceptions.SystemException: java.lang.IllegalStateException: Failed to communicate to http://localhost:8080/datahub-webapp/v1/core-publications/3 at com.hybris.datahub.core.tasks.DefaultDataHubTaskExecutionStrategy.run(DefaultDataHubTaskExecutionStrategy.java:41) at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1505) at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1409) at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:1378) at de.hybris.platform.task.impl.DefaultTaskService$5.run(DefaultTaskService.java:1257) 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) Caused by: java.lang.IllegalStateException: Failed to communicate to http://localhost:8080/datahub-webapp/v1/core-publications/3 at com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResult(ImpexDataImportClient.java:85) at com.mmm.bcom.mmmbcomcommon.datahub.core.facades.impl.MMMItemImportFacadeImpl.callbackToDataHub(MMMItemImportFacadeImpl.java:93) at com.mmm.bcom.mmmbcomcommon.datahub.core.facades.impl.MMMItemImportFacadeImpl.importItems(MMMItemImportFacadeImpl.java:41) at com.hybris.datahub.core.tasks.ItemImportTaskRunner.run(ItemImportTaskRunner.java:48) at com.hybris.datahub.core.tasks.DefaultDataHubTaskExecutionStrategy.run(DefaultDataHubTaskExecutionStrategy.java:33) ... 7 more Caused by: java.lang.IllegalStateException: Unauthorized response from http://localhost:8080/datahub-webapp/v1/core-publications/3 at com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResult(ImpexDataImportClient.java:79) ... 11 more

It is returning SUCCESS for the one with publication id 2 but later it is again getting called with a different port i.e., the default one 8080 which doesn't exist in my case and throwing the error.

Anyone experienced the same?

Can you please help me on this issue.

Thanks, Subhash.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2016 at 12:35 PM

    in your hybris config local.properties you have to have the entry as

    datahubadapter.datahuboutbound.url=http://localhost:7080/datahub-webapp/v1

    And in the tomcat->web-inf/classes/local.properties datahub.server.url=http://localhost:7080/datahub-webapp/v1 entry should be there..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2016 at 03:26 PM

    Dependent on where the publication was triggered from the url can be determined from there. as a fallback strategy the value provided to datahub.server.url property is used. This defaults to localhost:8080

    You can fix your problem by setting datahub.server.url=http://localhost:7080/datahub-webapp/v1 in your local.properties

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.