CESNET / pakiti-server

Pakiti provides a monitoring mechanism to check the patching status of Linux systems.
BSD 2-Clause "Simplified" License
49 stars 35 forks source link

Installation problem #141

Closed tcatlas closed 6 years ago

tcatlas commented 6 years ago

Not sure what I am doing wrong, but after two attempts I still get a page with the title of the instance and a blue bar underneath. Nothing else other than the jumbotron content.

ex: https://i.imgur.com/PIAU1ZD.png

Any suggestions?

tauceti2 commented 6 years ago

Hi,

Can you have a look into the web server logs?

tcatlas commented 6 years ago
[Thu Jul 12 13:29:36.850348 2018] [ssl:warn] [pid 1236] AH01909: 192.168.0.201:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jul 12 13:29:36.850446 2018] [mpm_prefork:notice] [pid 1236] AH00163: Apache/2.4.33 (Ubuntu) OpenSSL/1.1.0h configured -- resuming normal operations
[Thu Jul 12 13:29:36.850451 2018] [core:notice] [pid 1236] AH00094: Command line: '/usr/sbin/apache2'
TEST7-1: (192.168.0.1:58830) Thu, 12 Jul 18 13:29:42 -0400: Exception
[Thu Jul 12 13:29:42.147667 2018] [:error] [pid 1855] [client 192.168.0.1:58830] PHP Fatal error:  Uncaught exception 'Exception' with message 'SQL query failed: Expression #1 of ORDER $

I don't have a valid certificate, but it seems like maybe there's a database issue?

tcatlas commented 6 years ago

Didn't mean to close.

kouril commented 6 years ago

It's certainly something related to the DB. I suggest to enable the DEBUG variable in the config file and also to check other log files in /var/log for messages from Pakiti.

tcatlas commented 6 years ago
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/common/Pakiti.php:45]: Pakiti initialized
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/common/Loader.php:88]: Class DbManager loaded
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/managers/DbManager.php:171]: Successfully conected to the database [dbName=pakiti3,dbHost=localhost,dbUser=pakiti3]
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/managers/DbManager.php:179]: Sql query: select attrValue from PakitiAttributes where attrName='dbVersion'
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/common/Loader.php:88]: Class DefaultManager loaded
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/common/Loader.php:88]: Class HostsManager loaded
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/managers/HostsManager.php:111]: Getting hosts count
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/common/Loader.php:88]: Class HostDao loaded
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/common/Utils.php:195]: Select SQL statement: select distinct Host.id from Host order by Host.hostname 
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/managers/DbManager.php:179]: Sql query: select distinct Host.id from Host order by Host.hostname 
TEST7-1: (10.102.11.113:59582) Fri, 13 Jul 18 10:18:11 -0400 [/var/www/pakiti3/src/managers/DbManager.php:181]: Exception
[Fri Jul 13 10:18:11.750734 2018] [:error] [pid 3355] [client 10.102.11.113:59582] PHP Fatal error:  Uncaught exception 'Exception' with message 'SQL query failed: Expression #1 of ORDER BY clause is not in SELECT list, references column 'pakiti3.Host.hostname' which is not in SELECT list; this is incompatible with DISTINCT' in /var/www/pakiti3/src/managers/DbManager.php:182\nStack trace:\n#0 /var/www/pakiti3/src/managers/DbManager.php(137): DbManager->rawQuery('select distinct...')\n#1 /var/www/pakiti3/src/dao/HostDao.php(279): DbManager->queryToSingleValueMultiRow('select distinct...')\n#2 /var/www/pakiti3/src/managers/HostsManager.php(112): HostDao->getHostsIds(NULL, -1, -1, NULL, NULL, NULL, -1, NULL, -1, -1)\n#3 /var/www/pakiti3/src/modules/gui/www/public/index.php(101): HostsManager->getHostsCount()\n#4 {main}\n  thrown in /var/www/pakiti3/src/managers/DbManager.php on line 182

This is the error with debug set to true in Config.php. Might this be because pakiti-client has yet to make a successful transaction with pakiti-server, or shouldn't it matter?

kouril commented 6 years ago

Pakiti should be able to display the initial page even without any report recorded. Could you share more details about your environment and installation? I tried and installed a new server (on clean Debian9) using the steps from https://github.com/CESNET/pakiti-server/blob/master/docs/installation.md. Some of them required a bit tweaking (wrong filenames, etc.) but once the installation was finished the server functioned just fine.

tcatlas commented 6 years ago

I will work on this next week and report back.

tcatlas commented 6 years ago

I still have yet to find time to work on this. I will close the issue for now and reopen if I still need assistance. Thanks for the help.