cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data Hub Publication Error

Former Member
0 Likes
2,245

Hi Experts,

When I try to send some data from Data Hub to Hybris Commerce I always get this error:

 javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This the configuration in local.properties in Data Hub:.

 datahub.extension.exportURL=http://localhost:9001/datahubadapter
 datahub.extension.userName=admin
 datahub.extension.password=nimda
 
 targetsystem.hybriscore.url=http://localhost:9001/datahubadapter
 targetsystem.hybriscore.username=admin
 targetsystem.hybriscore.password=nimda
 
 datahub.server.url=http://localhost:8080/datahub-webapp/v1
 datahub.encryption.key.path=encryption-key.txt
 datahub.security.basic.admin.user=admin
 datahub.security.basic.admin.password=nimda
 
 datahub.security.https.enabled=false
 

This the configuration in local.properties file in Hybris Commerce:

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

 sapcoreconfiguration.datahuboutbound.enabled=true

 datahubadapter.security.https.enabled=false

I don't want to use secure connections just want to do simple replication via HTTP not HTTPS. As you can see from properties files I already disabled the HTTPS in both Hybris Commerce and Data Hub.

Here I am confusing on that point why I get this error even if I disabled HTTPS in both Hybris Commerce and Data Hub.

Do you have any idea what can be the problem?

Not: I can send data from Hybris Commerce to Data Hub but not Data Hub to Hybris Commerce.

I checked all related questions and couldn't find any proper solution. This keystore things doesn't work.

Br,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi all,

Thanks for your answers. I have found the problem.

I added the Hybris Commerce's certificate into $(/usr/libexec/java_home)/jre/lib/security/cacerts but this wasn't engough.

I should also add it into Data Hub's truststore.jks which is under /your-tomcat/webapps/datahub-webapp/WEB-INF/classes. (You can put your updated truststore.jks under exactly same path of Data Hub's local.properties file, so you will not need to specify a custom path for your updated truststore.jks.)

Br,

Former Member
0 Likes

Please tell me what exactly need to updated for truststore.jks?? I alreday have placed the truststore.jks in same path as that of local.properties.

Slava
Product and Topic Expert
Product and Topic Expert
0 Likes

You need to add the host's ssl certificate to the truststore and then configure Data Hub to use the truststore. Simplest way to get the host certificate is to hit the site in a browser. Both, chrome and firefox, will show a lock icon next to the https://... url. Click on that lock and navigate to view certificate. From there you can save the certificate in a local file. Then add that certificate to the truststore (keystore). Details are here: https://help.hybris.com/1811/hcd/1dec8042f1944a9fb090967ebe770ceb.html This page has a link to Tomcat configuration page, which includes commands for keytool -import... you will need to run that command to import the certificate to the keystore.

In case of troubles just google about installing a self-signed certificate. There should be plenty information on the web. The only steps custom to DataHub is that it uses a custom keystore and offers special properties to specify the store location. Good luck!

Answers (4)

Answers (4)

0 Likes

Hi,

I am facing the exact same issue and explained it in more detail here: https://answers.sap.com/questions/12858088/datahub-and-sap-commerce-1905-target-system-public.html

I want to use the secure way so I did not set the property datahubadapter.security.https.enabled=false .

I tried adding the certificate I exported from https://localhost/datahubadapter to the truststore.jks of the tomcat (/webapps/datahub-webapp/WEB-INF/classes) but I still face the error when datahub tries to send data to SAP Commerce.

I also tried adding the exported certificate to the JDK (/usr/lib/jvm/sapmachine-jdk-11.0.3/lib/security/cacerts) but that also did not solve the issue.

Can someone please explain in detail which certificate needs to be added to which truststore in order to get this to work?

Thanks

Former Member
0 Likes

Hi mgensler123, Did you solve the issue? I have the same issue.

Thanks

Slava
Product and Topic Expert
Product and Topic Expert
0 Likes

Your properties look correct. I suspect the problem is not in DataHub but in the ECP. I see the ECP URL is configured as http://localhost:9001/datahubadapter. Have you tried to hit this URL from a browser? This may not convenient, so try any other URL to port 9001, for example, http://localhost:9001/login.jsp I

I'm pretty sure in your browser you will see that you ended up on https://localhost:9002/login.jsp. That's because http is forbidden on the ECP side and the requests from Data Hub are redirected to https and port 9002. Since the platform certificate is not configured in the Data Hub, you get that error.

Former Member
0 Likes

Please add following piece of code to run your datahub in http port:

 <Connector port="8080" protocol="HTTP/1.1"
                connectionTimeout="20000"
                redirectPort="8443" /> 

in the server.xml of tomcat folder and comment the https port piece of code.

and hit the following url to know whether your datahub is running or not:

 http://localhost:8080/datahub-webapp/v1/status

Thanks, G Gopinath.

VinayKumarS
Active Contributor
0 Likes

Hi Selim,

Your data hub properties looks OK to me. Can you check the url where you are posting the idocs from data hub to the external system ( SAP ERP ??). Does it has the https url. I believe that target url certificate problem. please check