SEPIA-Framework / sepia-docs

Documentation and Wiki for SEPIA. Please post your questions and bug-reports here in the issues section! Thank you :-)
https://sepia-framework.github.io/
237 stars 16 forks source link

How do you update the server correctly? #22

Closed Smarthome-Creator closed 4 years ago

Smarthome-Creator commented 4 years ago

Hi there, Yesterday I wanted to update the server to the current version 2.4.1b and encountered problems. In the end I had to reinstall the whole server in order to use the current version. How do you update the server correctly without having to reinstall it?

greetings

sepia-assistant commented 4 years ago

Hi,

the update process isn't very elegant yet, I admit, but v2.4.1b has a new 'update.sh' script that will help you if you use Linux. This script automizes what you had to do by hand previously:

Do you use Windows, Linux or Mac?

Smarthome-Creator commented 4 years ago

I use S.E.P.I.A. on linux.

sepia-assistant commented 4 years ago

Then I'd recommend to try the new "update-sepia.sh". For older versions (<2.4.1b) you can use "backup-sepia.sh" then replace your SEPIA folder with the new version and extract the backup ZIP into the new folder, overwriting existing files.

All data of SEPIA is inside the '~/SEPIA' base folder, so be sure to make a copy of this folder before you update ... just in case ;-) (the update script will do this for you as well, but its still beta and ... I haven't tested it a lot ^^).

Can you say why your initial update attempt failed?

Smarthome-Creator commented 4 years ago

Hi there,

I tried to extract the new version into the sepia folder. That worked so far, only he did not replace 2.4.0.jar with the new version so that the old version was still used when starting. Finally I deleted my old sepia folder and installed the new sepia version. But I didn't think about copying my sepia backup back into the new installation. In the end it was not so tragic because I was still in the test phase.

I will try the update.sh script soon.

Thank you

sepia-assistant commented 4 years ago

I tried to extract the new version into the sepia folder. That worked so far, only he did not replace 2.4.0.jar with the new version so that the old version was still used when starting.

Oh I see. The script is not smart enough to understand which .jar to use when there are more than one, thats true. The result can be kind of random :-/ (it takes the first one .. whatever this is)

Smarthome-Creator commented 4 years ago

Unfortunately, the update script did not work again.

:-(

As last time I tried to reinstall the server and now it doesn't start anymore. Here is the error massage: Running SEPIA Assist (sepia-assist-v2.5.0.jar) . ........FAIL TIMEOUT - It took too long to start the server. Please check error logs at 'sepia-assist-server/log.out'.

And here is the error log output: 2020-06-09 18:44:59 LOG - Security policy and manager set. 2020-06-09 18:44:59 LOG - Security sandbox loaded with 6 entries. 2020-06-09 18:44:59 LOG - JAVA_HOME: /home/Aeon/SEPIA/java/jdk-11.0.7+10 2020-06-09 18:44:59 LOG - loading settings from Xtensions/assist.custom.properties... done. 2020-06-09 18:44:59 LOG - --- Running SEPIA-Assist-API with CUSTOM settings --- 2020-06-09 18:45:00 [main] INFO StaticFilesConfiguration - External StaticResourceHandler configured with folder = Xtensions/WebContent 2020-06-09 18:45:00 LOG - Web-server is active and uses folder: Xtensions/WebContent 2020-06-09 18:45:00 LOG - Web-server MIME type overwrite: mp4=video/mp4 2020-06-09 18:45:00 LOG - Web-server MIME type overwrite: mp3=audio/mpeg 2020-06-09 18:45:00 LOG - Elasticsearch: found 14 of 14 mapped indices. All good. 2020-06-09 18:45:00 ERROR - Smart Interfaces - failed to load interfaces! Msg.: {"code":503,"error":"{\"error\":{\"root_cause\":[],\"type\":\"search_phase_execut$2020-06-09 18:45:02 LOG - Finished loading answers module in 1734 ms. 2020-06-09 18:45:03 LOG - Finished loading 154(143) predefined commands in 1130 ms. 2020-06-09 18:45:04 LOG - Finished loading 794(749) predefined chats in 1434 ms. 2020-06-09 18:45:04 LOG - Loaded NLU interpretation-chain with 7 steps: [getPersonalCommand, getFixCommandsExactMatch, getChatSmallTalkMatch, getPublicDbSentence$2020-06-09 18:45:04 LOG - Running TTS module setup ... 2020-06-09 18:45:04 ERROR - TTS module - MaryTTS server did not answer or had no voices installed. Support has been deactivated for now. 2020-06-09 18:45:04 LOG - TTS module - Added 2 Espeak voices. 2020-06-09 18:45:04 LOG - TTS module - Added 3 Pico voices. 2020-06-09 18:45:05 LOG - TTS module setup has cleaned up '0' leftover files. 2020-06-09 18:45:05 LOG - TTS module setup successful. 2020-06-09 18:45:05 LOG - Services:News - Loaded 45 outlets with groups for 2 languages from: Xtensions/ServiceProperties/news-outlets.json 2020-06-09 18:45:05 ERROR - RssFeedReader - no backup file found! This is ok if you start for the first time or cleaned the backup. 2020-06-09 18:45:05 LOG - Active workers: 2 2020-06-09 18:45:05 LOG - loading webSocket settings from Xtensions/assist.custom.properties... done. 2020-06-09 18:45:05 LOG - finished loading services mapping for 33 interview modules. 2020-06-09 18:45:05 LOG - Testing services for supported commands... 2020-06-09 18:45:05 LOG - 33 services for 33 commands: All valid! 2020-06-09 18:45:05 LOG - Testing parameters handlers... 2020-06-09 18:45:05 LOG - Parameters:RadioStation - Loaded 76 station arrays with 11 playlists and 6 collections from: Xtensions/ServiceProperties/radio-stations$2020-06-09 18:45:05 LOG - ParameterTools - Method 'SmartDevice#deviceNamesScan' has ID: 1 2020-06-09 18:45:05 LOG - 58 parameters: All valid! 2020-06-09 18:45:05 ERROR - getDocument - ElasticSearch - error in 'users/all': {"code":503,"HTTP_REST_SUCCESS":false} 2020-06-09 18:45:05 ERROR - Server token not valid! 2020-06-09 18:45:05 ERROR - Administrator account could not be validated, CANNOT proceed! Please check database access and accounts.

Somehow it destroyed ElasticSearch and I can't fully interpret the last two error massages.

What can i do?

fquirin commented 4 years ago

That looks strange. On the one hand something seems to be broken in Elasticsearch, on the other hand it recognizes all indices properly :thinking: I wonder what went wrong during the update! What was the initial version of SEPIA? v2.4.1 ? oder older? I had some issues with the update script once because I forgot to shutdown the Server before running the script and the other time I forgot to refresh the folder before starting the server again. The new update script fixes both issues. I wrote a bit about it today: https://github.com/SEPIA-Framework/sepia-docs/wiki/Update-SEPIA

Can you check your home folder for backups please. The update script should have created a zipped backup ~/SEPIA-Backup... and renamed your original folder to ~/SEPIA_old_.... In the best case simply restore the ~/SEPIA_old.. folder to ~/SEPIA and try to start again.

Smarthome-Creator commented 4 years ago

I tried to update from 2.4.1. I had shut down the server to avoid any problems and when it started again it loaded 2.4.1.jar instead of 2.5.0.

When that didn't work, I then tried to update the server using the Sepia install script and then there were problems. I will import a backup of my sepia server and then test it again using the update script.

fquirin commented 4 years ago

Please try the new scripts as described in https://github.com/SEPIA-Framework/sepia-docs/wiki/Update-SEPIA . My hope is that I fixed it once and for all ^^ but it still feels like a somewhat fragile process :disappointed: [EDIT] A very important part is to leave the folder after the update:

cd ..
cd SEPIA

And you should see a kind of summary at the end if everything worked out.

Smarthome-Creator commented 4 years ago

Es ist alles gut, ich war nur zu ungeduldig mit dem updaten. Das Update hat sauber funktioniert und der Server läuft wieder. Ich schließe das hier mal da ja jetzt alles funktioniert.

Danke und Gruß

fquirin commented 4 years ago

Super, danke fürs Feedback :+1: