nextcloud / fulltextsearch

🔍 Core of the full-text search framework for Nextcloud
GNU Affero General Public License v3.0
212 stars 51 forks source link

Uninstall / reinstallation of fulltextsearch fails #342

Open nxtester opened 6 years ago

nxtester commented 6 years ago

Hi,

because fulltextsearch was only working for the user "ncadmin" I uninstalled it:

sudo apt-get --purge autoremove elasticsearch sudo rm -rf /var/lib/elasticsearch/ sudo rm -rf /etc/elasticsearch

And did a new installation: https://github.com/nextcloud/vm/tree/master/apps/fulltextsearch.sh

But I got the error "no alive nodes found in your cluster".

grafik

grafik

Here is the log:

https://hastebin.com/zojowoyizu.php

What to do?

Thanks for any help!

ArtificialOwl commented 6 years ago

Please report the issue at @nextcloud/vm

enoch85 commented 6 years ago

Please report the issue at @nextcloud/vm

I told him to report it here. The scripts are working and exists with 0. The question here is, how to completely uninstall Full Text Search, and how to use it with more than one user?

enoch85 commented 6 years ago

In other words, (and like I already told you @nxtester) you can only run the installation once, the script isn't designed to be run more than once.

ArtificialOwl commented 6 years ago

There is no reason for the app to run for only one user from the same instance of Nextcloud, could it be an issue with the VM installation script that only enable the app for the admin user ?

ArtificialOwl commented 6 years ago

To fully uninstall Ful text search, you need to

enoch85 commented 6 years ago

@daita This is the YAML: https://github.com/nextcloud/vm/blob/master/apps/fulltextsearch.sh#L128-L145

Could you assist in making the script better?

nxtester commented 6 years ago

@daita Thanks for your comments. Maybe you could assist to improve this wonderful script from enoch85? It's the way for the most of us to enjoy this kind of private cloud and it makes this world a bit better. Your fulltextsearch component is essential and very welcome but at the moment it's not yet working really (good). Moreover, it's impossible to uninstall it if somebody is not a Linux crack. This might be specific for the script of enoch85 but I think it's a pearl in the world of scripts and worth to support.

Thank you both for your highly appreciated effort and time you spend!

Ark74 commented 6 years ago

Even though the script is wide spread, freely (both as free speech and free beer). I would note that making the script better is part of a full time job for many developers. Documentation is out there, then let's invest the resources to get it working, if that's what we really want.

I'm sure @daita is already hands full making several nextcloud apps better. Cheers to that! :beers:

nxtester commented 6 years ago

@Ark74 To change something, idealism isn't bad. But nobody can live just from idealism. For me, I donated already many times many projects. For example, I already donated enoch85 several times for his precious script. He's and others are those people who try to combine idealism with professionalism and the result is not always appreciated from the people as it should be. It's up to us to decide if we support this way to make the internet a better place.

Ark74 commented 6 years ago

To change something, idealism isn't bad. ... It's up to us to decide if we support this way to make the internet a better place.

Yeah indeed, I have contribute the very first version of Nextant/Solr, and check some issues here on ES. But my point is that calling the main developer (FullTextSearch) to fix integration issues falls into another kind of support field.

Cheers!

enoch85 commented 6 years ago

the main developer (FullTextSearch) to fix integration issues falls into another kind of support field.

Who can better help than the guy who wrote the actual code?

Ark74 commented 6 years ago

I have a couple of ideas, but hey we don't loose anything asking, right?

Cheers!

nxtester commented 6 years ago

True, you can only loose if not asking. However, enoch85 created a script which is unique in its power and ability to reduce complex steps to an easygoing walk, which is even for Linux noobs like me not impossible to use. It's the simplicity which has the power to push something, always. That's why even main developers like daita will surely realize, that such projects have the power to push his own work into new dimensions. And that's really worth to say "Cheers" 🍻!

amd-64 commented 6 years ago

@nxtester You are installing elasticsearch 6.1.1, why not 6.3. I could not see in your log why ES exits.

For me (on @enoch85's awesome VM) ES exited when the version of ingest-attachment was not compatible with the updated version of elasticsearch, which I installed manually not using the script. Once I removed and reinstalled ingest-attachment, elasticsearch worked fine.

The following can be used after you update or reinstall ElasticSearch manually:

sudo service elasticsearch stop sudo /usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment sudo service elasticsearch start

enoch85 commented 6 years ago

@amd-64 I haven't spent so much time on the script (yet) that there's a function for always getting the latest version. That's why 6.1.1 is used as the script gets the version from fulltextsearch-files in the VM repo.

Maybe something we should work on when time allows.

ArtificialOwl commented 6 years ago

I will have a look to the script and see if anything is wrong, but for sure I won't touch anything, just pinpoint if I find anything wrong :+1:

enoch85 commented 6 years ago

I have an ongoing PR here with the intention to automate the version that are installed.

nxtester commented 6 years ago

@amd-64 Thanks for your comments. Like enoch85 already said, I used the script at https://github.com/nextcloud/vm/blob/master/apps/fulltextsearch.sh after uninstalled the "only for the admin user working"-elasticsearch:

sudo apt-get --purge autoremove elasticsearch sudo rm -rf /var/lib/elasticsearch/ sudo rm -rf /etc/elasticsearch

So maybe for the meantime you could publish your solution (order and commands) after installation of the VM (including fulltextsearch, installed by the script) to make it work.

This would be fine. Thanks in advance!

amd-64 commented 6 years ago

@nxtester I don't have a straight forward solution. My VM is more than 1 year old so the script I used then may be different from what you are using now.

By the way, what is wrong in having ncadmin as the only user. I have the ncadmin as the user of the servelet on the web admin page of fulltextsearch. You need an admin to index files for all users, correct?

All I did was I updated elasticsearch manually: wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.deb sudo dpkg -i elasticsearch-6.3.0.deb

Then updated ingest-attachment as shown above. Then indexing worked, but it is really slow.

nxtester commented 6 years ago

@amd-64 Thanks for sharing! Tried it, but ended in the same situation: Index is working but only for the user "ncadmin". However, I think enoch85 will be able to improve his wonderful script with a little help of daita.

@enoch85 Maybe you could also include OCR which is actually grayed out and not to activate: grafik

Great work, guys. Thank you all!