Changes

From Amahi Wiki
Jump to: navigation, search
1,637 bytes added ,  03:37, 18 June 2017
__TOC__
 
Occasionally Amahi [https://www.amahi.org/apps applications] fail to install properly. This is often noted by error messages in the application install log (/var/log/amahi-app-install.log).
= Reasons for Failure =
Reasons for failure vary, but the most common are:
<ul><li> Network connection<lismall> Install script:<ulpre>#<li> Taking RuntimeError: run_script had to KILL this script. it was taking too long. sorry.>,<small><pre>======= app install begin @ 2014-05-03 14/var/hda/platform/html/lib/system_utils.rb:3366:00 -0400 ==========in `run_script',Installing app id yi7uxa8mlb under /var/hda/platform/html/scriptapp/models/app.. ENV=productionrb:241:in `block in install_bg',Your HDA services have been restarted/var/hda/platform/html/app/models/app.rb:240:in `chdir',Your HDA services have been restarted/var/hda/platform/html/app/models/app.rb:240:in `install_bg',NOTE/var/hda/platform/html/script/install-app: file 86:in `install_or_uninstall',/var/hda/tmpplatform/html/amahiscript/install-download-cache/956319338e8752e6a8f544423df61187d8b7e320 written app:107:in cache`main',/var/hda/platform/html/libscript/install-app:119:in `<main>'</pre></small></li><li> Insufficient privileges<small><pre>#<Errno::EACCES: Permission denied @ dir_s_mkdir - /var/hda/web-apps/bandwidthd>,/usr/share/ruby/fileutils.rb:252:in `mkdir',/usr/share/ruby/fileutils.rb:252:in `fu_mkdir',/usr/share/ruby/system_utilsfileutils.rb:66226:in `run_scriptblock (2 levels) in mkdir_p',/usr/share/ruby/fileutils.rb:224: run_script had to in `reverse_each',KILL this script/usr/share/ruby/fileutils. it was taking too longrb:224:in `block in mkdir_p',/usr/share/ruby/fileutils. sorryrb:210:in `each',/usr/share/ruby/fileutils. (RuntimeError)rb:210:in `mkdir_p', from /var/hda/platform/html/app/models/app.rb:241364:in `block in install_bgmkdir', from /var/hda/platform/html/app/models/app.rb:240440:in `chdirinstall_webapp', from /var/hda/platform/html/app/models/app.rb:240208:in `install_bg', from /var/hda/platform/html/script/install-app:86:in `install_or_uninstall', from /var/hda/platform/html/script/install-app:107:in `main', from /var/hda/platform/html/script/install-app:119:in `<main>'</pre></small></li>:To correct, as ''root'' user (or precede with <licode> Incorrect syntaxsudo</licode>) do:<li> Insufficient privileges< chown -R apache:users /var/li><hda/ul>web-apps<li> Application source Source file is unavailable:</li>
<ul>
<li> New version</li>
<li> File moved</li>
<li> Wrong SHA1 hash</li></ul>
<small><pre>WARNING: primary downloaded file /tmp/amahi-download-
cache/b224eae4f30c011cbe6eae3c81d662f199eaa85f did not pass signature check - got
2da58737f99c63f47983db27789cf4b989975220, expected
b224eae4f30c011cbe6eae3c81d662f199eaa85f</pre></small></li>No space left on root (/) partition<small><pre>#<Errno::ENOSPC: No space left on device @ io_write - /ulvar/hda/tmp/amahi-download-cache/3ab7164c607c124b97e08dd25d3a9712afebde2b>,/var/hda/platform/html/lib/downloader.rb:100:in `write',/var/hda/platform/html/lib/downloader.rb:100:in `block in download',/var/hda/platform/html/lib/downloader.rb:100:in `open',/var/hda/platform/html/lib/downloader.rb:100:in `download',/var/hda/platform/html/lib/downloader.rb:50:in `download_and_check_sha1',/var/hda/platform/html/app/models/app.rb:200:in `install_bg',/var/hda/platform/html/script/install-app:86:in `install_or_uninstall',/var/hda/platform/html/script/install-app:107:in `main',/var/hda/platform/html/script/install-app:119:in `<main>'</pre></small></li>:Empty the ''/var/hda/tmp/amahi-download-cache'' directory. rm -rf /var/hda/tmp/amahi-download-cache/*</ul>
= Recipe for Success =
rm -rf owncloud3
</ul></ul>
* Finally check the HDA database ''hda_production'' (''webapps'' table). The safest way is to use a web application such as [https://www.amahi.org/apps/adminer Adminer] or [https://www.amahi.org/apps/phpmyadmin phpMyAdmin].
** Look to see if there is an entry for each app that failed to install correctly.
** Remove the row(s) that exist for the app (i.e. id 4, 5, 6, and 7)
+----+------------+
5 rows in set (0.00 sec)</pre></blockquote>
 
The safest way is to use a web application such as [https://www.amahi.org/apps/adminer Adminer] or [https://www.amahi.org/apps/phpmyadmin phpMyAdmin]. TO do it via command line, execute the command below for each ''id' that needs to be deleted from the database:
echo "delete from webapps where id=2" | mysql -uroot -p hda_production
 
::'''WARNING:''' Please see [[Database Root Password]] for the appropriate login password.
Once these steps are complete, it should be safe to try and install the application. Monitor the '''/var/log/amahi-app-installer.log''' file for progress and errors via command line:
If the app continues to fail, recommend you seek professional assistance by [[Submit Bug Report|submitting a bug report]].
 
 
Back to the [[Troubleshooting]].
12,424

edits