fell,
@fell@ma.fellr.net avatar

I need to about stuff: Ever since the v4.2.5 update my is broken. It just says:

status: 503 org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized]  

I already deleted the data directory, but when I tried to redeploy search according to the documentation, it gave me the same error message.

Any ideas what could've gone wrong?

moira,
@moira@101010.pl avatar

@fell I'm not an elasticsearch nor mastadon expert, but you could try to see why elastic is not happy

curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'

(you will probably need to add -u user:password to curl)

also if you want to start from scratch, check if you deleted the data directory which is specified in /etc/elasticsearch/elasticsearch.yml and restart elastic afterwards

xeraa,
@xeraa@mastodon.social avatar

@moira @fell this and a look what's in the log file — that should give some more pointers

fell,
@fell@ma.fellr.net avatar

@xeraa @moira I've tried everything including installing ElasticSearch v7, v8.6, deleting all data, all configuration and keys and trying different Java runtimes... no matter what I do, the outcome is always the same.

`curl http://localhost:9200/_cluster/health?pretty=true`` returns:

{   
"cluster_name" : "elasticsearch",   
"status" : "red",   
"timed_out" : false,   
"number_of_nodes" : 1,   
"number_of_data_nodes" : 1,   
"active_primary_shards" : 0,   
"active_shards" : 0,   
"relocating_shards" : 0,   
"initializing_shards" : 0,   
"unassigned_shards" : 0,   
"delayed_unassigned_shards" : 0,   
"number_of_pending_tasks" : 4,   
"number_of_in_flight_fetch" : 0,   
"task_max_waiting_in_queue_millis" : 601647,   
"active_shards_percent_as_number" : "NaN"   
}  

which doesn't tell me much, except that the status is red apparently. The log file doesn't contain any error messages except this repeating over and over: https://fellr.net/files/content/es.txt

I really don't get it. Why does a stupid search function have to be so overcomplicated?!

xeraa,
@xeraa@mastodon.social avatar

@fell @moira ugh. it looks like this was either part of a cluster or got very confused with the upgrades?
in any case, if you don't have any relevant data in there, I'd delete it and start over — that should be the simplest approach. the one place that is important to delete is the data directory; maybe /var/lib/elasticsearch depending on your installation method or configuration (path.data is the setting). stop the node, keep the rest but delete that directory before starting again

fell,
@fell@ma.fellr.net avatar

@xeraa @moira I don't care about the data, I can reindex any time. This is, and always has been, a single-node installation.

Here's the funny part, even after deleting both /var/lib/elasticsearch and /etc/elasticsearch the problem persists. I'm starting to believe the package has a bug. Is it easy to build from source?

moira,
@moira@101010.pl avatar

@fell Maybe try to setup elasticsearch in docker container to eliminate some variables from your base os?

fell,
@fell@ma.fellr.net avatar

@moira Every time I tried to use docker to solve a problem it made it worse, but I could give it a try.

xeraa,
@xeraa@mastodon.social avatar

@fell @moira you can build it yourself. I doubt that will solve your issue though
how do you install it (what's the binary) and the directory layout there? if you keep having leftovers from previous installations, we need to remove them (explicitly the data directory) to start a fresh bootstrapping

fell,
@fell@ma.fellr.net avatar

@xeraa @moira Thank you for your help. I went in and deleted every trace of ElasticSearch from the disk before reinstalling it from scratch. Now it works again. I have no idea what went wrong because I'm absolutely sure I deleted the data directory before. The only additional thing I deleted now was the log directory and the systemd unit files.

Oh well, as long as it works now... I hope I never have to touch it again.

To answer your question, I installed it on Arch Linux through the AUR.

fell,
@fell@ma.fellr.net avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • DreamBathrooms
  • modclub
  • GTA5RPClips
  • InstantRegret
  • magazineikmin
  • Youngstown
  • thenastyranch
  • rosin
  • slotface
  • mdbf
  • khanakhh
  • kavyap
  • Leos
  • tester
  • normalnudes
  • provamag3
  • cisconetworking
  • osvaldo12
  • everett
  • Durango
  • tacticalgear
  • anitta
  • megavids
  • ethstaker
  • cubers
  • JUstTest
  • lostlight
  • All magazines