Is my ISPConfig APS installer now dead??

Discussion in 'Installation/Configuration' started by Rikski, Nov 29, 2016.

  1. Rikski

    Rikski New Member

    Hi,

    Hope someone can throw some light on this.

    With an older version of ISPconfig (pre-3.1) - the APS installer use to work, but since updating to 3.1 and 3.1.1p1 - it just appears dead when trying to install wordpress, joomla (which use to work).

    I complete all necessary fields and am then taken to the installed APS list - but does not show a new install in progress (like it use to) and no new files within the website either!?.

    My ISPConfig is running on Centos 7.2, but even when I turn on debug and stop cronjob and execute manually - I get no real diagnostics.

    This use to be so useful for me and would speed up installation of wordpress on a website no end.

    Any help would be appreciated.

    Thanks

    Rikski
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There are no known problems with the aps installer in 3.1. No installation candidate get's added in the aps installed apps list?
     
  3. Rikski

    Rikski New Member

    No nothing at all, and no debug output - any idea where I can start to fault find what is going on?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Compare the layout of the aps* tables in the ispconfig database ith the ones from the install/sql/ispconfig3.sql file from ispconfig tar.gz file, maybe a column is missing. And run a check and repair in phpmyadmin on the tables to ensure that none of the tables is crashed.
     
  5. Rikski

    Rikski New Member

    Thanks Til,

    After making a backup then dropping the aps* tables and recreating (blank) tables from a cut-down import from the original .sql file and rerunning update packagelist. Although I can select the package to install it never succeeds in installing - installation candidate does not get added in the aps installed apps list.

    Can you suggest any lines of code I could add to "aps_install_package.php" to help me diagnose the problem?
    (as from what I can see there are no debug lines within that section of code at present - so no debug info would be created?).

    I have now restored the backup sql (that I created before editing) as it does not appear to be this that is causing the issue.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, unfortunately, this code part is missing debug infos. My guess is that a sql query must fail. So you might try to set "public $show_error_messages = true;" in the mysql class in /usr/local/ispconfig/interface/lib/classes/ to see if you get any errors or warnings. It might be necessary to add a die at the end of the aps file that you are debugging to prevet that it redirects you to another page so you can't see any errors on the screen.
     
  7. lars.s

    lars.s New Member

    I'm currently testing ISPConfig and have exactly the same problem. I noticed that this happens more often if a customer has Let's Encrypt enabled. Maybe this is a clue to what the problem is? It could also just be a coincidence. It works just normally for some customers, while for others it doesn't. Something which might also be related:
    I'm currently using ISPConfig in a multiserver setup (1 management node for the control panel, 1 db node, 1 hosting node, 1 mail node) and the database for APS apps is (if the installation actually starts) always created on the management node although the selected DB server for the customer is different.

    Any ideas? Thank you.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Not easy to say but I guess the letsencrypt thing is a coincidence. And you do not get a record at all for the started aps installs in the installed packages list like the first poster?
     
  9. lars.s

    lars.s New Member

    No, for the customers where it isn't working I start the installation and get redirected to an empty list of APS instances. I can see however that there is a job in the queue for Changing the websites settings ("Webseiten Einstellungen ändern") EDIT: This just seems to set the correct PHP settings, trying it again won't add this job to the queue.
    For other customers it works just fine

    EDIT 2: But looking at it, this really seems to have something to do with the Lets Encrypt option. It doesnt matter, whether the customer activated it, just that it is available to him...
     
    Last edited: Dec 8, 2016
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please add a report to the bugtracker so we can try to reproduce it on our test servers. I tested aps as admin yesterday and it worked fine, but maybe it is just a client UI related problem.
     
  11. Kuhni

    Kuhni New Member

    Hi,
    I'm currently testing ISPConfig and have the same problem. I'm currently using ISPConfig in a multiserver setup (1 management node for the control panel, 1 db node, 2 web node, 1 mail node, 2 dns node) ISPConfig 3.1.13. I tested aps as admin, if I install a package like WordPress, I will not get any errors, the package will not be installed. The only log entries:
    /sites/aps_packagedetails_show.php?id=167 HTTP/1.1" 200 1657 ".../index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
    - - [18/Dec/2018:00:37:45 +0100] "GET /sites/aps_meta_packages/WordPress-5.0.1-259.app.zip/icon.png HTTP/1.1" 200 8534 ".../index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
    - - [18/Dec/2018:00:37:48 +0100] "GET /sites/aps_install_package.php?id=167 HTTP/1.1" 200 1776 ".../index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
    - - [18/Dec/2018:00:37:58 +0100] "POST /sites/aps_install_package.php?id=167 HTTP/1.1" 302 1815 ".../index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
    - - [18/Dec/2018:00:37:58 +0100] "GET /sites/aps_installedpackages_list.php HTTP/1.1" 200 1237 ".../index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"

    The package list is available and the DB is ok, operating system Ubuntu 18.04 PHP 7.2.
    Is there already a solution or how can I increase the log level further to find the problem (debug is set)
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    See last chapter of this post about ispconfig not writing changes to disk:

    https://www.howtoforge.com/community/threads/please-read-before-posting.58408/

    disable server.sh cronjob on the slave, enable debug log level for the slave, use aps installer to install a new package on the slave server and then run server.sh on the slave server to get more details.

    I used the aps installer in 3.1.13 a few days ago, so the code should be working fine in this ispconfig release.
     
  13. Kuhni

    Kuhni New Member

    The log file does not help me to solve the problem, following output:
    Master
    18.12.2018-22:25 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    18.12.2018-22:25 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    Slave
    18.12.2018-22:25 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    18.12.2018-22:25 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.

    In the attachment are the htf_report files from master and slave
     

    Attached Files:

  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Looks like there were no changes. Did you first disable cron jobs. then do some change in ISPConfig and only then run the server.sh? Then there should be changes and you would get something in the log for those.
     
    till likes this.
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    And is the app you install listed in the 'installed apps' list in ispconfig with a status like installing, or is the app not listed there at all?
     
  16. Kuhni

    Kuhni New Member

    That's correct, according to the log there was no change and I think the problem is with the master. See attached graphics, I do not like the redirect or is it correct?
    I have 2 slaves tested, always the same result, a website configured on the master, also the same result, it comes after the page "Installed packages"
     

    Attached Files:

  17. Kuhni

    Kuhni New Member

    After further testing, I come to a similar result as lars.s in Post #8, as soon as an APS package contains a database for installation, then the installation will not start. I can install the APS package "bbclone", the package "Workspace 365" is installed with error and packages like Wordpress or Typo3 are not installed as described by Rikski #1.
     
  18. Kuhni

    Kuhni New Member

    The problem I could find after reviewing the program parts.
    In the DB table "client" all values of the dafaul_dbserver are set to "0", which stops processing:
    ../classes/aps_guicontroller.inc.php

    $client = $app-> db-> queryOneRecord ("SELECT default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid =? ", $ websrv ['sys_groupid']);
    if (is_array ($ client) && $ client ['default_dbserver']> 0 && $ client ['default_dbserver']! = $ websrv ['server_id']) {
    $ mysql_db_server_id = $ app-> functions-> intval ($ client ['default_dbserver']);
    $ dbserver_config = $ web_config = $ app-> getconf-> get_server_config ($ app-> functions-> intval ($ mysql_db_server_id), 'server');
    ....
    $ mysql_db_remote_ips = $ webserver_config ['ip_address'];
    } else {
    / * I left this in place for a fallback that should NEVER! happen.
    * if we reach this point it means that there is NO default db server for the client
    * AND the webserver has NO db service enabled.
    * We have to abort the aps installation here ... so I added a return false
    * although this does not mean any error message to the user.
    * /
    return false;


    / * $ mysql_db_server_id = $ websrv ['server_id'];
    $ settings ['main_database_host'] = 'localhost';
    $ mysql_db_remote_access = 'n';
    $ mysql_db_remote_ips = ''; * /
    }

    Now my question, where are the default dbserver set for the clients, only in the limits settings is that possible, but this setting is not relevant, because the servers are set accordingly. If the website belongs to the admin also no installation of packages with DB connection is possible
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    I made a test install with DB based packages here on a fresh installation of ISPConfig and they work without a problem. So it might be an issue related to installations only that are based on older releases, maybe there was an update issue in the past on your server. The value should be set automatically in the DB since the default_server field was replaced by the database server field. I'll check that, thank you for posting your findings.
     
  20. Kuhni

    Kuhni New Member

    This is a clean install of the multiserver setup (December 2018) no updates have been made. The value is supplied by the DB, but that is "0" if I change this manually in the DB, then it works. But if I run 2 DB servers, which is the default DB server? Especially if the administrator or the reseller does this. Even if I configure a database for a client installation, the default DB server is not set ("0"). I need to manually configure the value in the client table of the ispconfig database. This also means that the administrator and the reseller can not install an ASP package (with DB installation) if all DB Server for Reselle and Admin are shared.
    Would not it be better if the DB could be selected during the ASP Packet Installation (with DB)?
     

Share This Page