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).
Your HDA services have been restarted.
mv: cannot stat ‘unpack’: No such file or directory
cp: cannot stat ‘html/sample.config.inc.php’: No such file or directory
sed: can't read html/config.inc.php: No such file or directory
mv: cannot move ‘./transmission/class.ext.transmission.php’ to ‘./html/lib’: No
such file or directory
chown: cannot access ‘html/lib’: No such file or directory
/tmp/run_script20140503-14160-1huv0uh: line 47: html/config.inc.php: No such fil
Other times, you may receive notice in the Dashboard.
[[File:DashboardAppError.png|750px850px]]
We take these seriously and have tried to incorporate incorporated additional error checking/prevention methods. Unfortunately they don't catch everything.
= Reasons for Failure =
Reasons for failure vary, but the most common are:
* Slow or sporadic internet <ul><li> Network connection.* Install script:** Taking too long<small><pre>======= app install begin @ 2014-05-03 14#<RuntimeError: run_script had to KILL this script. it was taking too long. sorry.>,/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/script/amahiinstall-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: run_script had to 224: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>** Incorrect syntax:To correct, as ''root'' user (or precede with <code>sudo</code>) do:** Insufficient privileges chown -R apache:users /var/hda/web-apps* Application source <li> Source file is unavailable.:<ul>** <li> New version</li>** <li> File moved</li>** <li> Wrong SHA1 hash</li></ul>
:Empty the ''/var/hda/tmp/amahi-download-cache'' directory.
rm -rf /var/hda/tmp/amahi-download-cache/*
</ul>
= Recipe for Success =
There are some recommendation users can follow to help correct or prevent these problems.
<b><big>DON'T:</big></b>
# Refresh your web browser or navigate from the page while an application is installing.
# Try to install an application after it initially fails. Need to diagnose issue.
<b><big>DO:</big></b># Check Look at the log for details of why the app install failed.# Check View the Dashboard Apps tab, Installed section for the app.
# Check /var/hda/web-apps to ensure the app did not partially install.
# File a Search the [https://bugsforums.amahi.org forums] for a similar issue and potential solution.# Visit the IRC, [http://webchat.freenode.net/?channels=amahi #amahi] channel for immediate assistance.# [[Submit Bug Report|Submit a bug report]]. Provide details to help with [[App_troubleshooting|debugability]] of the issue.
<!--=Clean Up Failed Web App Install = MANUAL CLEAN UP =<div style="border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;">'''DISCLAIMER:''' The steps below should '''ONLY''' be attempted by advanced users. If you don't know what you are doing, recommend you seek professional assistance or you could break your HDA!</div> An '''NOTE:''' We will use '''owncloud''' as an example of the application that failed to install. A web app install was unsuccessful, but it appears partially installed. This often happens and repeatedly trying to install without clean up results in multiple failed attempts. For example, 4 failed attempts of [https://www.amahi.org/apps/owncloud ownCloud] would create ''owncloud'', ''owncloud1'', ''owncloud2'', ''owncloud3''. To return your HDA to a safe state for another install attempt, the following may help:* Check Navigate to the ''Network'' tab, ''DNS Aliases'' section in the Amahi Dashboard** Make note of the URL name(s)** Remove each entry for the failed application by selecting ''Delete''* If the app has a database, execute the following command: hda-create-db-and-user -d owncloud<ul><li>The next steps must be done from the command line as ''root'' user:</li><ul><li>Navigate to /varetc/httpd/hdaconf.d and determine file(s) to remove</webli> ls -al<li>Remove each ####-apps directory app.conf (substitute the number for #### and look URL name for the app) file</li> cd /etc/httpd/conf. d rm -rf 1001-owncloud.conf rm -rf 1002-owncloud1.conf rm -rf 1003-owncloud2.conf** The application short URL is the name of the directory rm -rf 1004-owncloud3. conf<li>Then as ''root'' user, restart apache</li> For examplesysemctl restart httpd<li>Next, Adminer would be adminer.navigate to /var/hda/web-apps</li> cd /var/hda/web-apps** <li>Remove the each app directory</li> rm -rf owncloud rm -rf owncloud1 rm -rf owncloud2 rm -rf owncloud3</ul></ul>* Check Finally check the HDA database ''hda_production'' (hda_production, apps ''webapps'' table). ** Look to see if there is an entry for the each app that failed to install correctly.** Remove the row(s) that row if it existsexist for the app (i.e.id 4, 5, 6, and 7)<br />:'''EXAMPLE'''<blockquote><pre>MariaDB [hda_production]> select id,name from webapps;
11 5 rows in set (0.00 sec)</pre></blockquote>* Check The safest way is to use a web application such as [https:/etc/httpdwww.amahi.org/confapps/adminer Adminer] or [https://www.d directory amahi.org/apps/phpmyadmin phpMyAdmin]. TO do it via command line, execute the command below for a file each ''id' that is associated with 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 appapplication. ** For example, 1001Monitor the '''/var/log/amahi-app-adminerinstaller.conf would be log''' file for Adminerprogress and errors via command line: tail -f /var/log/amahi-app-installer.log ** If it existsthe app continues to fail, remove itrecommend you seek professional assistance by [[Submit Bug Report|submitting a bug report]].1** Restart httpd Back to the [[Troubleshooting]].service-->