cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the default credential of hybris data hub

Former Member
0 Kudos

Hi Experts, I have configured data hub with hybris. But I have to change the default password in datahub local.properties from nimda to Hybris123. I've used openssl to encrypt the pwd. While publishing idoc, I am getting the below error.

 datahub.security.basic.admin.user=admin
 datahub.security.basic.admin.password=Hybris123
 datahub.security.basic.read_only.user=rouser
 datahub.security.basic.read_only.password=ropass
 
 datahub.core.export.service.clientid=eic
 datahub.core.export.service.clientsecret=Hybris123
 datahub.encryption.key.path= ${catalina.home}/webapps/ROOT/opt/datahub/security-dir/encryption-key.txt
 
 # inbound adapter
 datahub.extension.exportURL=http://localhost:9001/datahubadapter
 datahub.extension.userName=admin
 datahub.extension.password=Hybris123
 
 #Hybris Core
 targetsystem.hybriscore.url=http://localhost:9001/datahubadapter
 targetsystem.hybriscore.username=admin
 targetsystem.hybriscore.password=Hybris123

Tomcat Log:

2017-09-20 16:30:44,639 [DEBUG] [c.h.d.c.c.i.DefaultExportClient] Status of the response from publish to target system: HybrisCore, 200

2017-09-20 16:30:46,364 [INFO] [c.h.d.s.s.AuthenticationFailureApplicationListener] Received GET request /core-publications/2/Company.txt with user [admin] - Failed authentication caused by org.springframework.security.authentication.BadCredentialsException: Bad credentials

Hybris log:

[32mINFO [TaskExecutor-master-130-Task [8798452351926]] [ImpexDataImportClient] Response status from http://localhost:8181/datahub-webapp/v1/core-publications/2: 401 [[1;31mERROR [TaskExecutor-master-130-Task [8798452351926]] [ClientRetryListener] Failed to communicate to http://localhost:8181/datahub-webapp/v1/core-publications/2 [m java.lang.IllegalStateException: Failed to communicate to http://localhost:8181/datahub-webapp/v1/core-publications/2 at com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResultWithRetry(ImpexDataImportClient.java:107) ~[datahubadapterserver.jar:?] at com.hybris.datahub.core.rest.client.ImpexDataImportClient.lambda$1(ImpexDataImportClient.java:87) ~[datahubadapterserver.jar:?] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:263) [spring-retry-1.1.1.RELEASE.jar:?] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:154) [spring-retry-1.1.1.RELEASE.jar:?] at com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResult(ImpexDataImportClient.java:86) [datahubadapterserver.jar:?] at com.hybris.datahub.core.facades.impl.DefaultItemImportFacade.callbackToDataHub(DefaultItemImportFacade.java:105) [datahubadapterserver.jar:?] at com.hybris.datahub.core.facades.impl.DefaultItemImportFacade.importItems(DefaultItemImportFacade.java:58) [datahubadapterserver.jar:?] at com.hybris.datahub.core.tasks.ItemImportTaskRunner.run(ItemImportTaskRunner.java:48) [datahubadapterserver.jar:?] at com.hybris.datahub.core.tasks.DefaultDataHubTaskExecutionStrategy.run(DefaultDataHubTaskExecutionStrategy.java:33) [datahubadapterserver.jar:?] at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1505) [processingserver.jar:?] at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1409) [processingserver.jar:?] at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:1378) [processingserver.jar:?] at de.hybris.platform.task.impl.DefaultTaskService$5.run(DefaultTaskService.java:1257) [processingserver.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: java.lang.IllegalStateException: Unauthorized response from http://localhost:8181/datahub-webapp/v1/core-publications/2 at com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResultWithRetry(ImpexDataImportClient.java:100) ~[datahubadapterserver.jar:?] ... 15 more [1;31mERROR [TaskExecutor-master-130-Task [8798452351926]] [ClientRetryListener] Caused by: Unauthorized response from http://localhost:8181/datahub-webapp/v1/core-publications/2.

Accepted Solutions (1)

Accepted Solutions (1)

former_member1097760
Participant
0 Kudos

Hi Suresh,

It looks like the datahub-adapter extension in the commerce-suite fails to authenticate to the Data Hub. Have you changed the following properties on the commerce-suite to match your new username and password?

 datahubadapter.datahuboutbound.user=<adminuser>
 datahubadapter.datahuboutbound.password=<adminpass>

See this documentation for more details: https://help.hybris.com/6.5.0/hcd/973f9837b60f49deb3e17eaea0782d5f.html

Former Member
0 Kudos

Thank you yoni. After adding the outbound adapter entry in commerce-suite local.properties, it was authenticated successfully.

Answers (0)