fruum icon indicating copy to clipboard operation
fruum copied to clipboard

HTTP method error during installation

Open D4nt4lion opened this issue 7 years ago • 8 comments

Hello, I tried to install fruum to use it for my existing website. Sadly it did not work.

I followed the installation instructions. When I start the setup npm start -- --setup

I get following error

error: [0] [setup] {"msg":"Incorrect HTTP method for uri [/fruum] and method [POST], 
allowed: [DELETE, PUT, HEAD, GET]","path":"/fruum","query":{},"body":"{\"settings\":{\"index\":
{\"number_of_shards\":1,\"number_of_replicas\":1}}}","statusCode":405,"response":"{\"error\":\"Incorrect
HTTP method for uri [/fruum] and method [POST], allowed: [DELETE, PUT, HEAD, GET]\",\"status\":405}"}

elasticsearch is up an running locally as far as I can tell. curl -i -H "Accept: application/json" -H "Content-Type: application/json" localhost:9200 generates

HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 493

{
  "name" : "gYLl_fz",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "8uGJPjGKTySjQ11Ta787-g",
  "version" : {
    "number" : "6.4.0",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "595516e",
    "build_date" : "2018-08-17T23:18:47.308994Z",
    "build_snapshot" : false,
    "lucene_version" : "7.4.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

Node.js: v8.11.4 npm: 6.4.1 OS: Ubuntu 16.04

I don't really understand the problem here.

D4nt4lion avatar Sep 02 '18 11:09 D4nt4lion

Looks like elasticsearch API error. Can you please set the correct elastic API version at https://github.com/fruum/fruum/blob/master/config.json#L86 and try again? (have not tested it with ES 6.x)

n1k0sv avatar Sep 02 '18 23:09 n1k0sv

Thank you for your answer.

Sadly I still get errors. API 6.3:

error: [applications] [setup] {"msg":"[mapper_parsing_exception] No handler for type [string] declared on
 field [id]","path":"/fruum/_mapping/apps","query":{},"body":"{\"apps\":{\"_all\":
{\"enabled\":false},\"properties\":{\"id\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"name\":
{\"type\":\"string\"},\"description\":{\"type\":\"string\"},\"url\":
{\"type\":\"string\",\"index\":\"not_analyzed\"},\"auth_url\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"fullpage_url\":
{\"type\":\"string\",\"index\":\"not_analyzed\"},\"pushstate\":{\"type\":\"boolean\"},\"theme\":
{\"type\":\"string\",\"index\":\"not_analyzed\"},\"created\":{\"type\":\"long\"},\"private_key\":
{\"type\":\"string\",\"index\":\"not_analyzed\"},\"notifications_email\":
{\"type\":\"string\",\"index\":\"not_analyzed\"},\"contact_email\":
{\"type\":\"string\",\"index\":\"not_analyzed\"},\"meta\":
{\"type\":\"object\",\"enabled\":false}}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":
[{\"type\":\"mapper_parsing_exception\",\"reason\":\"No handler for type [string] declared on field 
[id]\"}],\"type\":\"mapper_parsing_exception\",\"reason\":\"No handler for type [string] declared on field
 [id]\"},\"status\":400}"}

API 6.2 and below:


error: [0] [setup] {"msg":"[resource_already_exists_exception] index [fruum/sOl3-rFHR0-wcaOx4JOQRQ] 
already exists, with { index_uuid=\"sOl3-rFHR0-wcaOx4JOQRQ\" & index=\"fruum\"}","path":"/fruum","query":{},"body":"{\"settings\":{\"index\":
{\"number_of_shards\":1,\"number_of_replicas\":1}}}","statusCode":400,"response":"{\"error\":
{\"root_cause\":[{\"type\":\"resource_already_exists_exception\",\"reason\":\"index [fruum/sOl3-rFHR0-
wcaOx4JOQRQ] already exists\",\"index_uuid\":\"sOl3-rFHR0-
wcaOx4JOQRQ\",\"index\":\"fruum\"}],\"type\":\"resource_already_exists_exception\",\"reason\":\"index 
[fruum/sOl3-rFHR0-wcaOx4JOQRQ] already exists\",\"index_uuid\":\"sOl3-rFHR0-
wcaOx4JOQRQ\",\"index\":\"fruum\"},\"status\":400}"}

pretty much all API Levels return different errors but none seem to work.

D4nt4lion avatar Sep 03 '18 11:09 D4nt4lion

Thank you for the help. I did a second attempt and I manually installed version 2.4 of elasticsearch. Everything starts as it should do now. elasticsearch and fruum are running. I cant use it yet. The drawer does not show. But I suspect that it is due to a http -> https problem and caused by this line: src="http://localhost:3000/go/myhost"

D4nt4lion avatar Sep 03 '18 17:09 D4nt4lion

Thanks for the input, I will investigate more recent versions of elasticsearch when I find some free time. ES is very aggressive on breaking changes on future releases, so it might need some extra workarounds to make it work.

n1k0sv avatar Sep 04 '18 14:09 n1k0sv

Hello, I tried to install fruum recently and it seems there's an issue After following the installtion instructions - i run npm start and it shows its listening on port 3000 but when i open it in the browser i get Cannot GET /.

seyicole avatar Apr 30 '19 09:04 seyicole

Could I ask if there's any updates here? It's 2019 and now latest Elasticsearch is 7.4.0.

kissge avatar Oct 21 '19 06:10 kissge

@kissge sorry about that, but due to personal matters I cannot keep up maintenance of the project. PRs are welcomed if anyone is interested in keeping this project up-to-date or would like to take it over.

n1k0sv avatar Oct 21 '19 06:10 n1k0sv

Thank you for your prompt reply. I'm interested in this project, will think about it...

kissge avatar Oct 21 '19 06:10 kissge