Open GinFoB opened 4 years ago
Hi and welcome. Can you please provide the version of Elastic Search you're using? Thanks!
Hi @tniezg , I use elasticsearch 7.6. Thanks.
Thanks 👍
spree2vs
supports Elastic Search 5.6.11
. The default ES version used in vue-storefront-api
is also 5.6.11
and support for ES 7
is currently experimental.
@tniezg thanks, now i get new error
"message": [ "Error: Cannot create indices or set proper settings and mapping.", { "msg": "[security_exception] missing authentication token for REST request [/vue_storefront_catalog], with { header={ WWW-Authenticate=\"Basic realm=\\"security\\" charset=\\"UTF-8\\"\" } }",
Can you explain me and thanks a lot.
It looks like your Elastic Search instance requires a user and password. You can set them by modifying ES_URL
like so: https://<user>:<password>@es_host:es_port
. Or you can remove authentication from Elastic Search by running bin/elasticsearch-plugin remove x-pack --purge
(https://github.com/DivanteLtd/vue-storefront-api/blob/master/docker/elasticsearch/Dockerfile).
@tniezg thanks it work from me by run this command
docker run -p 9200:9200 -e 'xpack.security.enabled=false' -e 'xpack.monitoring.enabled=false' docker.elastic.co/elasticsearch/elasticsearch:5.6.11
Now i get this error
{ "message": [ "Could not download page.", { "name": "NoResponseError", "message": "No response received from Spree", "stack": "NoResponseError: No response received from Spree\n at e.LIMITED (/app/node_modules/@spree/storefront-api-v2-sdk/dist/server/webpack:/src/Http.ts:64:23)\n at e.route (/app/node_modules/@spree/storefront-api-v2-sdk/dist/server/webpack:/src/Http.ts:42:29)\n at Generator.throw (
)\n at s (/app/node_modules/@spree/storefront-api-v2-sdk/dist/server/webpack:/src/interfaces/errors/ErrorClass.ts:1:23)\n at process._tickCallback (internal/process/next_tick.js:68:7)" } ], "level": "error", "timestamp": "2020-04-08T13:36:12.842Z" }
Give me an idea how can i solve it, thanks a lot @tniezg
This means Spree is not available. The default URL for Spree is http://host.docker.internal:8812
(127.0.0.1 host.docker.internal
in /etc/hosts
). It can be changed by modifying the SPREE_URL
env variable.
@tniezg i have the same config
127.0.0.1 host.docker.internal in /etc/hosts
I still the same error.
But when i test http://127.0.0.1:3000/api/v2/storefront/products in my rest api client i get the list of products.
I can't found what i miss, if you can give me idea how can i solve it and thanks @tniezg
The default port in spree2vs for Spree is 8812
. Did you update the port to 3000
?
Hi @tniezg,
I don't update the port to 3000, but when i start my spree app using 8812 port non error show in import products.
Now when i start app using ./bin/exec yarn server i get a lot of message like
{ "message": "Request for / could not be handled", "level": "info", "timestamp": "2020-04-09T09:18:25.636Z" }
And in the browser using http://localhost:8889/ i get {code: 500}
What i miss again, and how to update the default port in spree2vs and thanks @tniezg
./bin/exec yarn server is used by Vue Storefront. VS will issue requests like /api/cart/pull?token=....
Please start Vue Storefront and set it to call http://localhost:8889. You need to update configuration: "cart", "orders", "users", "stock"
@tniezg thank you
Hi @tniezg,
I don't update the port to 3000, but when i start my spree app using 8812 port non error show in import products.
Now when i start app using ./bin/exec yarn server i get a lot of message like
{ "message": "Request for / could not be handled", "level": "info", "timestamp": "2020-04-09T09:18:25.636Z" }
And in the browser using http://localhost:8889/ i get {code: 500}
What i miss again, and how to update the default port in spree2vs and thanks @tniezg
I also have the same error code 505 while calling http://localhost:8889/, is that normal? How did you fix this? Thank you
Hi @tniezg, I don't update the port to 3000, but when i start my spree app using 8812 port non error show in import products. Now when i start app using ./bin/exec yarn server i get a lot of message like
{ "message": "Request for / could not be handled", "level": "info", "timestamp": "2020-04-09T09:18:25.636Z" }
And in the browser using http://localhost:8889/ i get {code: 500} What i miss again, and how to update the default port in spree2vs and thanks @tniezg
I also have the same error code 505 while calling http://localhost:8889/, is that normal? How did you fix this? Thank you
Hi @shunnokw. spree2vuestorefront's server has a catch-all route - https://github.com/spark-solutions/spree2vuestorefront/blob/master/src/server/index.ts#L768. The path /
is not handled by the server. Routes such as /api/cart/pull
and /api/cart/payment-methods
are handled. All the available routes can be examined in the https://github.com/spark-solutions/spree2vuestorefront/blob/master/src/server/index.ts file.
I am also getting similar issue while executing create-indices. Could someone help please? Here is the output of running ./bin/exec yar create-indices
./bin/exec yarn create-indices
Recreating spree2vuestorefront_spree2vs_1 ... done
yarn run v1.17.3
$ ./dist/index.js create-indices
{
"message": "Creating index.",
"level": "info",
"timestamp": "2021-07-10T10:37:29.396Z"
}
{
"message": "Creating index.",
"level": "info",
"timestamp": "2021-07-10T10:37:29.398Z"
}
Elasticsearch ERROR: 2021-07-10T10:37:29Z
Error: Request error, retrying
PUT http://127.0.0.1:9200/vue_storefront_catalog => connect ECONNREFUSED 127.0.0.1:9200
at Log.error (/app/node_modules/elasticsearch/src/lib/log.js:226:56)
at checkRespForFailure (/app/node_modules/elasticsearch/src/lib/transport.js:259:18)
at HttpConnector.
{ "message": [ "Error: Cannot create indices or set proper settings and mapping.", { "message": "No Living connections", "name": "Error", "stack": "Error: No Living connections\n at sendReqWithConnection (/app/node_modules/elasticsearch/src/lib/transport.js:226:15)\n at next (/app/node_modules/elasticsearch/src/lib/connection_pool.js:214:7)\n at process._tickCallback (internal/process/next_tick.js:61:11)" } ], "level": "error", "timestamp": "2021-07-10T10:37:29.436Z" }
If i put http://127.0.0.1:9200/vue_storefront_catalog in browser, I get following output: {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"vue_storefront_catalog","index_uuid":"na","index":"vue_storefront_catalog"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"vue_storefront_catalog","index_uuid":"na","index":"vue_storefront_catalog"},"status":404}
That means the url is valid. But while executing create-indices, it shows connection to 9200 port of localhost was refused. Could someone shed light on what I am missing?
My elastic version is 5.6.11. Spree is on at 3000 port and working fine.
Thanks.
Hi everyone
I can't initializes Elastic Search by using cmd ./bin/exec yarn create-indices. This is my first time using E-Commerce PWA "Vue Storefront". and Elastic Search. My error
When i change max_gram and min_gram to 8, 8 , i get another error like below :
Anyone can help me, so many thanks