commonsearch / cosr-back

Backend of Common Search. Analyses webpages and sends them to the index.
https://about.commonsearch.org
Apache License 2.0
122 stars 24 forks source link

Errors During Installation #49

Open mechaman opened 8 years ago

mechaman commented 8 years ago

Hey Guys,

I get some errors after I execute _make docker_testcoverage . I am unsure of what they mean exactly. Apparently, I pass 49 tests, skipped 1, and failed 16. The last error I get is :

ProtocolError: ('Connection aborted.', error(111, 'Connection refused'))

Here are some screenshots as well. Help would be greatly appreciated.

screen shot 2016-07-17 at 9 22 27 pm

screen shot 2016-07-17 at 9 23 06 pm

sylvinus commented 8 years ago

Hi @mechaman !

Could you try running the command make start_services on your host? Some of the tests need Elasticsearch to be launched. Maybe this should be clearer in the docs.

mechaman commented 8 years ago

Hey @sylvinus .

Thank you for replying :) So I did as you said and end up with only 1 error and 1 skipped.

tests/sparktests/test_plugin_linkgraph.py::test_spark_link_graph_parquet[0] FAILED
tests/sparktests/test_sources.py::test_spark_multiple_sources[0] PASSED
tests/testdata/html_newspaper_testcases/test_urls.txt SKIPPED

Perhaps you should also add make start_services in the 3. Optional: Run the tests section before running make docker_test_coverage. As for the test that has an error and the one that is skipped, any idea on how I could fix it?

Also, I seem to be having an issue when I run make import_local_data. I have had to pip install many modules and have come to a halt due to a particular one :

ImportError: No module named pyfaup.faup

Would you happen to know how to solve this issue as well?

Thanks for your patience.

sylvinus commented 8 years ago

Great! Sorry for the lag, I'll try to be faster to reply now.

The pyfaup error is a dependency we just added in the Dockerfile. If you do make docker_build it will rebuild the container. It is also the reason test_spark_link_graph_parquet is failing. I will think about options to warn users that their container is not up to date with the current code to avoid similar confusion in the future.

Making the services optional for the tests and adding a message is indeed a very good idea, thanks!

test_urls.txt is not an actual test, we should actually exclude the whole testdata/ directory in test collection.

Thanks for your feedbacks, it really helps!