Skip to Content
0
Oct 28, 2016 at 06:19 PM

Data hub unable to publish to target system HybrisCore

556 Views

I'm hoping I'm just missing some configuration here. I have a standalone datahub instance which I have been able to publish to from both hybris and and ECC. The issue I am having is when datahub tries to publish back to hybris after the iDoc has been parsed I get this error:

 2016-10-28 15:54:04,282 [ERROR] [c.h.d.p.TargetSystemAvailabilityRetryListener] The target system HybrisCore at http://localhost:9001/datahubadapter is unavailable for target system publication id 1 and pool GLOBAL: Ping failed.
 java.lang.IllegalStateException: The target system HybrisCore at http://localhost:9001/datahubadapter is unavailable for target system publication id 1 and pool GLOBAL: Ping failed.
     at com.hybris.datahub.service.impl.DefaultPublicationActionService.pingTargetSystem(DefaultPublicationActionService.java:467) [datahub-service-6.1.0.4-RC1.jar:6.1.0.4-RC1]
     at com.hybris.datahub.service.impl.DefaultPublicationActionService.lambda$isTargetSystemAvailable$70(DefaultPublicationActionService.java:436) [datahub-service-6.1.0.4-RC1.jar:6.1.0.4-RC1]
     at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:263) [spring-retry-1.1.1.RELEASE.jar:na]
     at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:168) [spring-retry-1.1.1.RELEASE.jar:na]
     at com.hybris.datahub.service.impl.DefaultPublicationActionService.isTargetSystemAvailable(DefaultPublicationActionService.java:445) [datahub-service-6.1.0.4-RC1.jar:6.1.0.4-RC1]
     at com.hybris.datahub.service.impl.DefaultPublicationActionService.lambda$filterUnavailableTargetSystems$69(DefaultPublicationActionService.java:420) [datahub-service-6.1.0.4-RC1.jar:6.1.0.4-RC1]
     at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_92]
     at com.hybris.datahub.service.impl.DefaultPublicationActionService.filterUnavailableTargetSystems(DefaultPublicationActionService.java:419) [datahub-service-6.1.0.4-RC1.jar:6.1.0.4-RC1]

My local.properties on datahub look like this:

 datahub.security.basic.admin.user=admin
 datahub.security.basic.admin.password=nimda
 #datahub.security.basic.read_only.user=admin
 #datahub.security.basic.read_only.password=nimda
 
 dataSource.className=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
 dataSource.jdbcUrl=jdbc:mysql://localhost/integration?useConfigs=maxPerformance&rewriteBatchedStatements=true
 dataSource.username=root
 dataSource.password=
 
 datahub.encryption.key.path=encryption-key.txt
 
 kernel.autoInitMode=create-drop
 kernel.cache.generationalCacheEnabled=true
  
 datahub.extension.exportURL=http://localhost:9001/datahubadapter
 datahub.extension.userName=admin
 datahub.extension.password=nimda
  
 datahub.server.url=http://localhost:8080/datahub-webapp/v1
  
 sapcoreconfiguration.datahuboutbound.enabled=true
 sapcoreconfiguration.autocompose.pools=GLOBAL,SAPCONFIGURATION_POOL,SAPCUSTOMER_INBOUND_POOL,SAPCONSUMER_INBOUND_POOL,SAPCONSUMER_OUTBOUND_POOL,SAPORDER_INBOUND_POOL,SAPORDER_OUTBOUND_POOL,SAPOAASITE_INBOUND_POOL,SAPOAARSI_INBOUND_POOL
 sapcoreconfiguration.autopublish.targetsystemsbypools=GLOBAL.HybrisCore,GLOBAL.SapErpSystem,SAPCUSTOMER_INBOUND_POOL.HybrisCore,SAPCONSUMER_INBOUND_POOL.HybrisCore,SAPCONSUMER_OUTBOUND_POOL.SapErpSystem,SAPORDER_OUTBOUND_POOL.SapErpSystem,SAPORDER_INBOUND_POOL.HybrisCore,SAPOAASITE_INBOUND_POOL.HybrisCore,SAPOAASITE_INBOUND_POOL.SapErpSystem,SAPOAARSI_INBOUND_POOL.HybrisCore,SAPOAARSI_INBOUND_POOL.SapErpSystem
 sapcoreconfiguration.autopublish.targetsystemsbypools=GLOBAL.HybrisCore
 sapcoreconfiguration.autopublish.sleeptime:5000
 sapcoreconfiguration.autopublish.initialsleeptime:5000
 sapcoreconfiguration.pool=SAPCONFIGURATION_POOL
 
 targetsystem.hybriscore.url=http://localhost:9001/datahubadapter
 targetsystem.hybriscore.username=admin
 targetsystem.hybriscore.password=nimda

I know that this file is being read because the MySql schema is being used. On hybris my local.properties for datahub looks like this:

 datahubadapter.datahuboutbound.url=http://localhost:8080/datahub-webapp/v1
 datahubadapter.datahuboutbound.user=admin
 datahubadapter.datahuboutbound.password=nimda

If I go to localhost:9001/datahubadapter/ I see this:

Datahub Adapter References API: hybris API Test client: RESTClient for Mozilla Customizing commerce web services: Using the datahubadapter template