predictionio.NotCreatedError: Exception happened: [Errno 111] Connection refused for request POST /

537 views
Skip to first unread message

Akshay Kolte

unread,
Jul 1, 2016, 6:22:38 AM7/1/16
to actionml-user
I have installed pio from actionml install guide here: https://github.com/actionml/cluster-setup/blob/master/install.md

I  have not installed elastisearch and pio status runs with success.

However when I run the integration-test as mentioned here: https://github.com/actionml/template-scala-parallel-universal-recommendation#quickstart

I get the following error :

Importing data for integration test
Access key: Ycv-Y4zTDLUXHsEzIXgNMk9c0PACV-4z0MvOVLLP004EDAZKph-cQPfCE06KvqJu
Namespace(access_key='Ycv-Y4zTDLUXHsEzIXgNMk9c0PACV-4z0MvOVLLP004EDAZKph-cQPfCE06KvqJu', file='./data/sample-handmade-data.txt', url='http://localhost:7070')
Importing data...
Traceback (most recent call last):
  File "examples/import_handmade.py", line 113, in <module>
    import_events(client, args.file)
  File "examples/import_handmade.py", line 43, in import_events
    event_time = current_date
  File "/usr/local/lib/python2.7/dist-packages/predictionio/__init__.py", line 247, in create_event
    event_time).get_response()
  File "/usr/local/lib/python2.7/dist-packages/predictionio/connection.py", line 111, in get_response
    self._response = self.rfunc(tmp_response)
  File "/usr/local/lib/python2.7/dist-packages/predictionio/__init__.py", line 118, in _acreate_resp
    (response.error, response.request))
predictionio.NotCreatedError: Exception happened: [Errno 111] Connection refused for request POST /events.json?accessKey=Ycv-Y4zTDLUXHsEzIXgNMk9c0PACV-4z0MvOVLLP004EDAZKph-cQPfCE06KvqJu {'eventTime': '2016-07-01T10:18:38.638+0000', 'entityType': 'user', 'targetEntityType': 'item', 'targetEntityId': 'Iphone 6', 'entityId': 'u1', 'event': 'purchase'} /events.json?accessKey=Ycv-Y4zTDLUXHsEzIXgNMk9c0PACV-4z0MvOVLLP004EDAZKph-cQPfCE06KvqJu?eventTime=2016-07-01T10%3A18%3A38.638%2B0000&entityType=user&targetEntityType=item&targetEntityId=Iphone+6&entityId=u1&event=purchase


Can anybody help with the error ?

Thanks.
New at using the actionml UR.

Pat Ferrel

unread,
Jul 1, 2016, 9:00:40 AM7/1/16
to Akshay Kolte, actionml-user
This error is because of an incomplete Template install, you need python, pip, and the packages used in the import script: http://www.actionml.com/docs/ur_quickstart

--
You received this message because you are subscribed to the Google Groups "actionml-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actionml-use...@googlegroups.com.
To post to this group, send email to action...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/actionml-user/d6e86465-0081-44da-8662-f158a66f4f5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Akshay Kolte

unread,
Jul 1, 2016, 10:10:24 AM7/1/16
to actionml-user, p...@occamsmachete.com
Hi Pat,

We followed exact steps given on link (http://www.actionml.com/docs/ur_quickstart), with recommended pip & python versions. (repeated the process on two separate machines)
Still facing the same error.

--

Pat Ferrel

unread,
Jul 1, 2016, 10:59:49 AM7/1/16
to Akshay Kolte, actionml-user
The script is failing to import, usually this is because the correct Python packages are not available or the EventServer is not running. 

what does `pio status` say before the integration test is run?

Akshay Kolte

unread,
Jul 1, 2016, 12:06:36 PM7/1/16
to actionml-user, p...@occamsmachete.com
I suppose the installation was missing something. pio status was showing success though. I installed pio again using the single bash curl statement.

That error has been resolved. However now the build stops saying the following SSL error:


Exception in thread "Thread-0" 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
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at java.net.URL.openStream(URL.java:1045)
    at scala.io.Source$.fromURL(Source.scala:140)
    at scala.io.Source$.fromURL(Source.scala:130)
    at io.prediction.workflow.UpgradeCheckRunner.run(WorkflowUtils.scala:400)
    at java.lang.Thread.run(Thread.java:745)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
    ... 17 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
    ... 23 more


The build doesn't finish. Any help regarding the following?
 

Pat Ferrel

unread,
Jul 1, 2016, 12:58:09 PM7/1/16
to Akshay Kolte, actionml-user
Something may be wrong with the upgrade checker site run by Salesforce. I’ll check into it. A site problem should never cause a failure so I’ll check into it and fix the code i needed.

Pat Ferrel

unread,
Jul 1, 2016, 1:20:48 PM7/1/16
to Pat Ferrel, Akshay Kolte, actionml-user
Hmm, this shouldn’t cause a failure, can you try running again with --verbose 


Akshay Kolte

unread,
Jul 2, 2016, 3:46:53 AM7/2/16
to actionml-user, p...@occamsmachete.com
I ran the build with verbose, it dowloaded and resolved all dependencies. However the build fails due to the following compilation errors:


[INFO] [Console$] [info] Compiling 9 Scala sources to /home/akshay/universal/target/scala-2.10/classes...
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/DataSource.scala:26: object EventWindow is not a member of package io.prediction.core
[INFO] [Console$] [error] import io.prediction.core.{EventWindow, SelfCleaningDataSource}
[INFO] [Console$] [error]        ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/DataSource.scala:41: not found: type EventWindow
[INFO] [Console$] [error]    eventWindow: Option[EventWindow])
[INFO] [Console$] [error]                        ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/DataSource.scala:49: not found: type SelfCleaningDataSource
[INFO] [Console$] [error]   extends PDataSource[TrainingData, EmptyEvaluationInfo, Query, EmptyActualResult] with SelfCleaningDataSource {
[INFO] [Console$] [error]                                                                                         ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/DataSource.scala:62: not found: value cleanPersistedPEvents
[INFO] [Console$] [error]     cleanPersistedPEvents(sc)
[INFO] [Console$] [error]     ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:24: object NullModel is not a member of package io.prediction.data.storage
[INFO] [Console$] [error] import io.prediction.data.storage.{NullModel, PropertyMap, Event}
[INFO] [Console$] [error]        ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:145: not found: type NullModel
[INFO] [Console$] [error]   extends P2LAlgorithm[PreparedData, NullModel, Query, PredictedResult] {
[INFO] [Console$] [error]                                      ^
[INFO] [Console$] [warn] /home/akshay/universal/src/main/scala/PopModel.scala:46: a pure expression does nothing in statement position; you may be omitting necessary parentheses
[INFO] [Console$] [warn]         case e: IllegalArgumentException => e
[INFO] [Console$] [warn]                                             ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:152: not found: type NullModel
[INFO] [Console$] [error]   def train(sc: SparkContext, data: PreparedData): NullModel = {
[INFO] [Console$] [error]                                                    ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:176: not found: type NullModel
[INFO] [Console$] [error]   NullModel = {
[INFO] [Console$] [error]   ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:241: not found: type NullModel
[INFO] [Console$] [error]     backfillFieldName: String = ""): NullModel = {
[INFO] [Console$] [error]                                      ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:230: not found: type NullModel
[INFO] [Console$] [error]     new NullModel
[INFO] [Console$] [error]         ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:285: not found: type NullModel
[INFO] [Console$] [error]     new NullModel
[INFO] [Console$] [error]         ^
[INFO] [Console$] [error] /home/akshay/universal/src/main/scala/URAlgorithm.scala:371: not found: type NullModel
[INFO] [Console$] [error]   def predict(model: NullModel, query: Query): PredictedResult = {
[INFO] [Console$] [error]                      ^
[INFO] [Console$] [warn] Class org.apache.lucene.util.BytesRef not found - continuing with a stub.
[INFO] [Console$] [warn] Class org.apache.lucene.util.BytesRef not found - continuing with a stub.
[INFO] [Console$] [warn] Class org.apache.lucene.util.BytesRef not found - continuing with a stub.
[INFO] [Console$] [warn] Class org.apache.lucene.util.BytesRef not found - continuing with a stub.
[INFO] [Console$] [warn] Class org.apache.lucene.util.BytesRef not found - continuing with a stub.
[INFO] [Console$] [warn] Class org.apache.lucene.util.BytesRef not found - continuing with a stub.
[INFO] [Console$] [warn] Class org.apache.lucene.search.Explanation not found - continuing with a stub.
[INFO] [Console$] [warn] Class org.apache.lucene.search.Explanation not found - continuing with a stub.
[INFO] [Console$] [warn] 9 warnings found
[INFO] [Console$] [error] 12 errors found
[INFO] [Console$] [error] (compile:compile) Compilation failed
[INFO] [Console$] [error] Total time: 8 s, completed 2 Jul, 2016 1:13:49 PM
[ERROR] [Console$] Return code of previous step is 1. Aborting.


What could be the reason?
I am running the integration test and not my own app .
 

Pat Ferrel

unread,
Jul 2, 2016, 1:44:15 PM7/2/16
to Akshay Kolte, actionml-user
A dead giveaway is that NullModel is not found. This is a class in 0.9.7-aml. This also means you are building against the wrong classes. Did you follow the upgrade instructions for PIO? It requires a build from source after removing the ivy2 cache in ~/.ivy2. This build will populate the cache with the 0.9.7-aml classes and you will get NullModel and the rest resolved.

BTW what does `pio version` report? Even if it says 0.9.7-aml you may not have the correct contents of ~/.ivy2

Check the upgrade/install instructions here: actionml.com/docs/install


Reply all
Reply to author
Forward
0 new messages