vbkunin / itop-docker

Combodo iTop docker image
https://hub.docker.com/r/vbkunin/itop/
MIT License
92 stars 51 forks source link

Fatal error: Uncaught ConfigException #23

Closed robonuka closed 3 years ago

robonuka commented 3 years ago

Docker run your image, then all stages of interactive setup done, after press "Install" button I get this error:

Fatal error: Uncaught ConfigException: Could not find configuration file: file = /var/www/html/conf/production/config-itop.php in /var/www/html/core/config.class.inc.php:1488 Stack trace: #0 /var/www/html/core/config.class.inc.php(1505): Config->CheckFile('configuration', '/var/www/html/c...') #1 /var/www/html/core/config.class.inc.php(1458): Config->Load('/var/www/html/c...') #2 /var/www/html/setup/wizardsteps.class.inc.php(2544): Config->__construct('/var/www/html/c...') #3 /var/www/html/setup/wizardcontroller.class.inc.php(193): WizStepDone->Display(Object(SetupPage)) #4 /var/www/html/setup/wizardcontroller.class.inc.php(132): WizardController->DisplayStep(Object(WizStepDone)) #5 /var/www/html/setup/wizardcontroller.class.inc.php(265): WizardController->Next() #6 /var/www/html/setup/index.php(58): WizardController->Run() #7 {main} thrown in /var/www/html/core/config.class.inc.php on line 1488

vbkunin commented 3 years ago

What command did you use to run?

robonuka commented 3 years ago

I run your docker image with this docker-compose

itop: container_name: itop image: vbkunin/itop:2.7.1 restart: always init: true expose:

There is no problems at all with running, but I found couple of misunderstanding features in web-setup process.

  1. At the first step of web-setup the button "Show detail" does not work. Nothing happens if I press it.
  2. At the last step of web-setup there is the same behavior for [+] buttons in list. Nothing happens if I press it.
  3. Press "Install" button I get this error message: Fatal error: Uncaught ConfigException: Could not find configuration file: file = /var/www/html/conf/production/config-itop.php in /var/www/html/core/config.class.inc.php:1488 Stack trace: #0 /var/www/html/core/config.class.inc.php(1505): Config->CheckFile('configuration', '/var/www/html/c...') #1 /var/www/html/core/config.class.inc.php(1458): Config->Load('/var/www/html/c...') #2 /var/www/html/setup/wizardsteps.class.inc.php(2544): Config->__construct('/var/www/html/c...') #3 /var/www/html/setup/wizardcontroller.class.inc.php(193): WizStepDone->Display(Object(SetupPage)) #4 /var/www/html/setup/wizardcontroller.class.inc.php(132): WizardController->DisplayStep(Object(WizStepDone)) #5 /var/www/html/setup/wizardcontroller.class.inc.php(265): WizardController->Next() #6 /var/www/html/setup/index.php(58): WizardController->Run() #7 {main} thrown in /var/www/html/core/config.class.inc.php on line 1488
vbkunin commented 3 years ago

I think something is wrong with your web server or network configuration. Check the browser console, the misunderstandings you are talking about may indicate a problem with loading js-scripts on the setup web page.

robonuka commented 3 years ago

Unfortunately I'm not a web-programmer and do not know how to debug js-scripts Web server... I'm using your docker image, so web-server is yours. Network... I deployed more then 10 another web-services in my VPS and each of them works fine. I think something wrong with iTop source zip. If I manually create the file /var/www/html/conf/production/config-itop.php with contents: (I took it from here: https://github.com/Super-Visions/docker-itop/tree/master/2.7)

<?php

$MySettings = array(
    'db_host'    => $_ENV['DB_HOSTNAME'],
    'db_name'    => $_ENV['DB_ENV_MYSQL_DATABASE'],
    'db_user'    => $_ENV['DB_ENV_MYSQL_USER'],
    'db_pwd'     => $_ENV['DB_ENV_MYSQL_PASSWORD'],
    'db_subname' => $_ENV['DB_PREFIX'],
);

$MyModuleSettings = array();
$MyModules = array('addons' => array());

Setup eats it fine, but after that tells me about another error: Warning: require_once(/var/www/html/env-production/dictionaries/languages.php): failed to open stream: No such file or directory in /var/www/html/core/metamodel.class.php on line 6439 Fatal error: require_once(): Failed opening required '/var/www/html/env-production/dictionaries/languages.php' (include_path='/var/www/html/lib/pear/archive_tar:/var/www/html/lib/pear/console_getopt:/var/www/html/lib/pear/pear-core-minimal/src:/var/www/html/lib/pear/pear_exception:.:/usr/local/lib/php') in /var/www/html/core/metamodel.class.php on line 6439

So I think authors forgot to put this file in source ZIP too. Unfortunately I do not know where to get it(

robonuka commented 3 years ago

I found the solution! iTop webserver works by HTTP, but frontend reverse-proxy works by HTTPS. So for correct setup process working I had to allow insecure content running in my web-browser for my iTop site. (by default insecure content it the Chrome is disabled)