steveny2k / docker-predictionio

Docker container for PredictionIO-based machine learning services
73 stars 57 forks source link

Error with Elasticsearch #5

Closed yaniv51 closed 6 years ago

yaniv51 commented 6 years ago

First time with prediction IO and docker.

I tried to use with version 0.12: $ docker run -it -p 8000:8000 steveny/predictionio:0.12.0 /bin/bash

While I'm trying to check status after using pio-start-all, I'm getting an error with elasticsearch:

[INFO] [Storage$] Verifying Meta Data Backend (Source: ELASTICSEARCH)... [ERROR] [Management$] Unable to connect to all storage backends successfully. The following shows the error message from the storage backend.

Connection refused (java.net.ConnectException)

Dumping configuration of initialized storage backend sources. Please make sure they are correct.

Source Name: ELASTICSEARCH; Type: elasticsearch; Configuration: HOME -> /PredictionIO-0.12.0-incubating/vendors/elasticsearch-5.5.2, HOSTS -> localhost, PORTS -> 9200, CLUSTERNAME -> predictionio, TYPE -> elasticsearch

Did I missed something?

Thanks, Yaniv

Heluwe commented 6 years ago

I got the same problem

adampl commented 6 years ago

me too :(

afanjul commented 6 years ago

Hi there, I have the same problem...

`ERROR] [Management$] Unable to connect to all storage backends successfully. The following shows the error message from the storage backend.

Connection refused (java.net.ConnectException)

Dumping configuration of initialized storage backend sources. Please make sure they are correct.

Source Name: ELASTICSEARCH; Type: elasticsearch; Configuration: HOME -> /PredictionIO-0.12.0-incubating/vendors/elasticsearch-5.5.2, HOSTS -> localhost, PORTS -> 9200, CLUSTERNAME -> predictionio, TYPE -> elasticsearch`

When I do: curl localhost:9200 it fails to connect, so it seems like Elasticsearch is no running, when I try to run it from the bin directory, it fails to start because is not possible to run elasticsearch as root...

any solution?

aczietlow commented 6 years ago

Making progress on this. Elasticsearch will not run as root user. I side stepped this by making a pio user and assigning permissions accordingly

steveny2k commented 6 years ago

@aczietlow thanks a lot for debugging. could you make a Pull-Request and then i can merge your change to the code? thanks again.

tgensol commented 6 years ago

Finally your changes are not working on my side, ES starts with pio-start-all but stops just after

aczietlow commented 6 years ago

@tgensol Thanks for the feedback! I'll take a look and see if I can make another pass.

farhanhu87 commented 6 years ago

Hi, Same issue with my side as well. @steveny2k

steveny2k commented 6 years ago

Thank you all for your feedback. I am trying out solutions.

steveny2k commented 6 years ago

Sorry to all for slow progress due to busy schedules at work. Any update? @aczietlow @tgensol thanks a lot

aczietlow commented 6 years ago

No worries. Same here to be honest. I should be able to update my PR in the next day or two.

franmedmon commented 6 years ago

Same error here! Waiting for a solution guys...

jyrkih commented 6 years ago

I think both Docker and Elasticsearch default to 2G RAM, so ES runs out of memory and gets killed. Maybe adding ES_JAVA_OPTS="-Xms750m -Xmx750m" to pio-env.sh helps?

steveny2k commented 6 years ago

@jyrkih thanks a lot for your suggestion. Could you try it on your machine and confirm it works for you? thanks

jyrkih commented 6 years ago

Sure, tried over this PR and it works for me. Also run through the Product Engine Template quickstart just fine.

steveny2k commented 6 years ago

nice, could you create a PR, I can then merge? thanks a lot @jyrkih

steveny2k commented 6 years ago

@everyone thanks to everyone who reported issue and provided solution and PR, now the issue is resolved and new image has been pushed into docker public registry.

Could you try pulling the new docker image to check if it works for you? thanks a lot docker run -it -p 8000:8000 steveny/predictionio:0.12.0 /bin/bash

steveny2k commented 6 years ago

I will close this issue if no one reports the same issue after a week. Thanks everyone.