-1

I am getting a 404 error from https://ml.nexosis.com/v1/ when surfing by browser.

I also get a validator error when trying to connect via NexosisClient in Java:

com.nexosis.impl.NexosisClientException: IO Error while making HTTP Request: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I have followed dirs on stackoverflow for importing a client cert generated via OpenSSL for localhost but that seems to have had no effect. I added the cert to C:\jdk\jre\lib\security\cacerts on my machine as appears to be typical.

Please advise.

Code:

public static void main(String[] args) {
   NexosisClient nexosisClient = new NexosisClient("<my key>", "https://ml.nexosis.com/v1/");
   DataSetData dataSetData = generateSample(); // just gets sample data
   try {
      nexosisClient.getDataSets().create("SampleDataSet", dataSetData);
      SessionResponse sessionResponse = generateForecast(nexosisClient);
      UUID sessionId = sessionResponse.getSessionId();
      SessionResult sessionResult = nexosisClient.getSessions().getResults(sessionId);
      int cnt = 0;
      while (sessionResult.getStatus() != SessionStatus.COMPLETED) {
          if (cnt==5) {
            System.exit(0);
          }
          Thread.sleep(WAIT_MSEC); // WAIT_MSEC declared as 4000
          sessionResult = nexosisClient.getSessions().getResults(sessionId);
          cnt++;
      }

      Metrics metrics = sessionResult.getMetrics();
      List<JobMetric> jobmetrics = metrics.getMetrics();
      for(JobMetric metric : jobmetrics) {
        System.out.println(metric.getName() + " = " + metric.getValue());
      }

   } catch (Exception e) {
      e.printStackTrace();
   }
}
N00b Pr0grammer
  • 4,503
  • 5
  • 32
  • 46
Matt Campbell
  • 1,967
  • 1
  • 22
  • 34
  • That URL doesn't point to a valid resource. What's the problem? Where's the Java code? – tadman Oct 20 '17 at 00:17
  • _"I am getting a 404 error from `https://ml.nexosis.com/v1/` when surfing by browser."_ - no law against that, so ...? – CBroe Oct 20 '17 at 00:29
  • Thanks for the comments and I'm sorry for the lack of context. Nexosis (www.nexosis.com) is a producer of machine learning services exposed via service endpoint. That URL I cited is the default service endpoint for its API. It should not be returning a 404. I submitted a ticket to them and they asked me to post the question on SO so they can address it here to save others time. I wanted to tag it "nexosis" but SO doesn't permit users < 1500 reputation create new tags. – Matt Campbell Oct 20 '17 at 02:23
  • Using SO as Theorie support platform ? – bummi Oct 20 '17 at 03:52
  • @bummi I agree it's weird. Have a feeling this is a stealth marketing move. Sorry if I am contributing to it albeit unwillingly. But they seemed adamant about it being on SO. – Matt Campbell Oct 20 '17 at 04:22
  • I'm voting to close this question as off-topic because it's a [customer support question](https://meta.stackoverflow.com/questions/255745/why-were-not-customer-support-for-your-favorite-company) – bummi Oct 20 '17 at 04:34

2 Answers2

3

The 404 is to be expected as there is nothing at that URL.

The validator problem is a certificate issue that is unrelated to the Nexosis API. There are lots of resolutions to these sorts of problems on StackOverflow and across the Internet. You'll need to work through them to get your code working. SSLPoke is a useful tool to help in troubleshooting these sorts of problems.

Guy Royse
  • 2,739
  • 12
  • 9
  • I got a similar reply from the Nexosis folks directing me to see the page below, suggesting SSLPoke also. Thanks for replying. https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html – Matt Campbell Oct 20 '17 at 15:48
1

Directed to https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html and to other SO entries on the topic.

Matt Campbell
  • 1,967
  • 1
  • 22
  • 34