Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch pytest oneliner in the docs is no longer working #1377

Closed
ml-evs opened this issue Nov 1, 2022 · 3 comments · Fixed by #1373
Closed

Elasticsearch pytest oneliner in the docs is no longer working #1377

ml-evs opened this issue Nov 1, 2022 · 3 comments · Fixed by #1373
Assignees
Labels
bug Something isn't working docs Issues pertaining to documentation.

Comments

@ml-evs
Copy link
Member

ml-evs commented Nov 1, 2022

I've just tried running

docker run -d --name elasticsearch_test -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" elasticsearch:7.17.1 \
&& sleep 10 \
&& OPTIMADE_DATABASE_BACKEND="elastic" py.test tests/server/; \
docker container stop elasticsearch_test; docker container rm elasticsearch_test

from our docs, and I'm getting connection errors:

E   elasticsearch.exceptions.ConnectionError: ConnectionError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))

probably just needs a tweak to make sure the right ports etc are exposed from the v7 ES image.

@ml-evs ml-evs added bug Something isn't working docs Issues pertaining to documentation. labels Nov 1, 2022
@ml-evs ml-evs self-assigned this Nov 1, 2022
@JPBergsma
Copy link
Contributor

With sudo docker run -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" elasticsearch:7.17.7

I do get a working instance of elastic search on docker. I can run the test on elastic search from pycharm.

@JPBergsma
Copy link
Contributor

JPBergsma commented Nov 15, 2022

This set seems to do the same as our original. I could not execute it without sudo or as one command. But if I remember correctly, I also had problems with this previously. (the first two lines are one command, but it gets broken in two because it does not fit.)
sudo docker run --rm -d --name elastic_test -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" elasticsearch:7.17.7
sleep 20
OPTIMADE_DATABASE_BACKEND="elastic" py.test
sudo docker stop elastic_test

@ml-evs
Copy link
Member Author

ml-evs commented Nov 15, 2022

After the changes in #1373 the line in the docs now works for me (with the bump to 7.17.7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs Issues pertaining to documentation.
Projects
None yet
2 participants