You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks again for all the work that has gone into this project. Very much looking forward to using it across our systems.
New install of pakiti-server master branch (20240513 - web gui reports v3.1.0) on Rocky Linux 9.4 (also tried with Fedora 39) and pakiti-client (also 20240513) gives 500 errors despite feeder set to synchronous mode.
Firstly, gzip added to src/common/Utils.php as below:
case "application/x-gzip" :
case "application/gzip" :
$contents = gzdecode($contents);
if ($contents === False)
throw new Exception("Failed to decompress gzip data");
Config.php:
<?php
final class Config extends DefaultConfig
{
public static $DB_HOST = "localhost";
public static $DB_NAME = "pakiti";
public static $DB_USER = "pakiti";
public static $DB_PASSWORD = "xxx";
# Pakiti operational mode
# 1 - Synchronous mode - process clients reports immediately, useful for small deployments with < 1000 hosts
# 2 - Asynchronous mode - process clients reports from the queue, needed in the deployments with > 1000 hosts
public static $FEEDER_MODE = 1;
public static $BACKUP = false;
public static $BACKUP_DIR = "/var/lib/pakiti";
public static $DEBUG = true;
}
Edited pakiti-client to make curl verbose:
# pakiti-client --disable-tls-checks --url http://127.0.0.1/pakiti/feed/
* Trying ::1:80...
* Connected to localhost (::1) port 80 (#0)
> POST /pakiti/feed/?protocol=5 HTTP/1.1
> Host: localhost
> User-Agent: curl/7.76.1
> Accept: */*
> Content-Length: 43651
> Content-Type: application/x-www-form-urlencoded
>
} [43651 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Date: Mon, 13 May 2024 19:09:42 GMT
< Server: Apache/2.4.57 (Rocky Linux)
< X-Powered-By: PHP/8.2.13
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection 0
Error: 0 at /usr/bin/pakiti-client line 385.
[root@pakiti log]#
SELinux is permissive:
# sudo getenforce
Permissive
Journald:
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class Pkg loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/modules/feeder/FeederModule.php:664]: Parsing packages
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/modules/feeder/FeederModule.php:416]: Preparing the report
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class StatsManager loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/managers/DbManager.php:152]: Sql query: select id from Host where hostname='pakiti' and ip='' and re>
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class HostDao loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/managers/HostsManager.php:39]: Getting the host ID
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class HostsManager loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class DefaultManager loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/modules/feeder/FeederModule.php:108]: Report from [reporterHost=localhost, reporterIp=127.0.0.1, clientVersion=5]
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/modules/feeder/FeederModule.php:891]: Computing the hash of the list of the packages
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/modules/feeder/FeederModule.php:874]: Computing the hash of the report header
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Utils.php:54]: Getting attribute [name=report] from the HTTP request
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Utils.php:54]: Getting attribute [name=mode] from the HTTP request
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Utils.php:54]: Getting attribute [name=protocol] from the HTTP request
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class Report loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class Host loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/managers/DbManager.php:152]: Sql query: select attrValue from PakitiAttributes where attrName='dbVersion'
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/managers/DbManager.php:144]: Successfully conected to the database [dbName=pakiti,dbHost=localhost,dbUser=pakiti]
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Loader.php:76]: Class DbManager loaded
May 13 20:30:32 pakiti Pakiti[39571]: (127.0.0.1:57608) Mon, 13 May 24 19:30:32 +0000 [/var/www/pakiti-server/src/common/Pakiti.php:24]: Pakiti initialized
Also tried on a CentOS v7.9.2009 box with pakiti-client-3.0.1-1.el7.noarch from epel:
pakiti-client --url='http://pakiti/pakiti/feed/'
HTTP/1.1 100 Continue
HTTP/1.1 500 Internal Server Error
Date: Mon, 13 May 2024 19:51:12 GMT
Server: Apache/2.4.57 (Rocky Linux)
X-Powered-By: PHP/8.2.13
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
pakiti-client: failed to send data using /bin/curl
Similar messages in logs. In the middle of troubleshooting, will pick up again tomorrow.
Thanks.
The text was updated successfully, but these errors were encountered:
benjamindonnachie
changed the title
New install returns 500 even if with Synchronous feeder
New install returns 500 even with Synchronous feeder
May 13, 2024
Hi, I was trying to install pakiti-server on CentOS 9(I'm not using it regularly, but I wanted to find out if it works and tried to replicate the problem that you have).
I had the problem to load even the website and finally I found out that error logs are in php-fpm(/var/log/php-fpm/www-error.log).
And to run the website I had to fix "Permission denied" on /etc/pakiti/Config.php and mysql incompability(similarly in Debian) in /etc/my.cnf.d/mysql-server.cnf with " sql-mode='' "
But pakiti-client was still not working with same error as you had. But there was "PHP Fatal error: Uncaught Error: Call to undefined function sem_get() in /var/www/pakiti-server/src/modules/feeder/FeederModule.php:339" so I installed "yum install php-process" and everything started working.
If it helped you, please let me know.
Thanks again for all the work that has gone into this project. Very much looking forward to using it across our systems.
New install of pakiti-server master branch (20240513 - web gui reports v3.1.0) on Rocky Linux 9.4 (also tried with Fedora 39) and pakiti-client (also 20240513) gives 500 errors despite feeder set to synchronous mode.
Firstly, gzip added to src/common/Utils.php as below:
Config.php:
Edited pakiti-client to make curl verbose:
SELinux is permissive:
Journald:
Apache access_log:
127.0.0.1 - - [13/May/2024:20:30:32 +0100] "POST /pakiti/feed/index.php?protocol=5 HTTP/1.1" 500 - "-" "curl/7.76.1"
Populated VDS and downloaded CVEs successfully. Website loads, reports 22,678 CVEs monitored.
Also tried on a CentOS v7.9.2009 box with pakiti-client-3.0.1-1.el7.noarch from epel:
Similar messages in logs. In the middle of troubleshooting, will pick up again tomorrow.
Thanks.
The text was updated successfully, but these errors were encountered: