So I have followed all the steps to install vsf with ES7 with this doc https://docs.vuestorefront.io/guide/cookbook/elastic.html#_2-recipe-3. But I always redirected to http://localhost:3000/error. So when I tried debugging from vsf to vsf api.
I found this error on vsf front:
Can not connect the vue-storefront-api / ElasticSearch instance! Error: FetchError in request to ES: FetchError: invalid json response body at http://localhost:8080/api/catalog/vue_storefront_catalog/attribute/_search
and this on vsf api log:
{ Error: connect ECONNREFUSED elasticsearch:9200
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
errno: ‘ECONNREFUSED’,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘elasticsearch’,
port: 9200 }
First, I think it was because the address is “elasticsearch” (eventhough the local.json config is set to “localhost”), so I tried to hardcoded it to “localhost” or “127.0.0.1” but I still get the same error.
I tried open the elastic url on the browser to check if the elastic server is running successfully (http://localhost:9200/vue_storefront_catalog_product/_search), it shows some result.
Thank you in advance.