glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
241 stars 60 forks source link

data collection tasks not running #56

Closed Badkempachi closed 2 years ago

Badkempachi commented 2 years ago

Documentation

Yes, I read it

Solution search

Yes, I read it

Professional support

No response

Is your help request related to a problem?

Tasks are not executed, in my case it was necessary to collect data. By activating the task, setting the execution time, specifying the goals and performers, and I only get the status prepared, after which it does not change the status. At the same time, GLPI 9.5.6 was deployed with the Fusion Inventory agent and, having performed the same configuration, the tasks are executed, and the agents transmit the data I need to understand that the configuration is performed correctly and I did not find a difference in the task settings in the versions. Based on the above, I ask you to help figure out why the tasks are not being completed.

Expected behavior

A data collection job is running and I am getting the values I need from the registry

Actions you've considered

I created other tasks, changed the time intervals and changed the type of collected resources. As a result, errors were found, but I do not know how to fix them.

Additional context

log output: [2022-01-25 16:23:47] glpiphplog.WARNING: *** PHP User Warning (512): H81:0 ?>4:;NG5=8O. A;8 K 8A?>;L7C5B5 ?@>:A8-A5@25@, =0AB@>9B5 53>. (Operation timed out after 5000 milliseconds with 0 out of 0 bytes received) in /var/www/html/glpi/src/Toolbox.php at line 1430 Backtrace : src/Toolbox.php:1430 trigger_error() src/GLPINetwork.php:304 Toolbox::callCurl() src/Marketplace/View.php:134 GLPINetwork::isServicesAvailable() src/Marketplace/View.php:259 Glpi\Marketplace\View::checkRegistrationStatus() src/Marketplace/View.php:114 Glpi\Marketplace\View::discover() src/CommonGLPI.php:687 Glpi\Marketplace\View::displayTabContentForItem() ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()

[2022-01-25 17:14:03] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 17:15:01] glpiphplog.CRITICAL: *** Uncaught Exception Error: Class 'Queryparam' not found in /var/www/html/glpi/marketplace/glpiinventory/inc/taskjobstate.class.php at line 671 Backtrace : src/CronTask.php:1001 PluginGlpiinventoryTaskjobstate::cronCleantaskjob() front/cron.php:82 CronTask::launch()

[2022-01-25 17:28:44] glpiphplog.CRITICAL: *** Uncaught Exception RuntimeException: Mode has not been set in /var/www/html/glpi/src/Agent/Communication/AbstractRequest.php at line 433 Backtrace : front/inventory.php:72 Glpi\Agent\Communication\AbstractRequest->getResponse()

[2022-01-25 17:28:44] glpiphplog.CRITICAL: *** Uncaught Exception RuntimeException: Mode has not been set in /var/www/html/glpi/src/Agent/Communication/AbstractRequest.php at line 433 Backtrace : front/inventory.php:72 Glpi\Agent\Communication\AbstractRequest->getResponse()

[2022-01-25 17:28:45] glpiphplog.CRITICAL: *** Uncaught Exception RuntimeException: Mode has not been set in /var/www/html/glpi/src/Agent/Communication/AbstractRequest.php at line 433 Backtrace : front/inventory.php:72 Glpi\Agent\Communication\AbstractRequest->getResponse()

[2022-01-25 17:44:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 18:14:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 18:44:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 19:14:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 19:44:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 20:14:02] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 20:44:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 21:14:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 21:44:02] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 22:14:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

[2022-01-25 22:44:01] glpiphplog.WARNING: *** PHP User Warning (512): Mising system_user config in /var/www/html/glpi/src/PendingReasonCron.php at line 70 Backtrace : src/PendingReasonCron.php:70 trigger_error() src/CronTask.php:1001 PendingReasonCron::cronPendingreason_autobump_autosolve() front/cron.php:82 CronTask::launch()

MySQL query error: SQL: INSERT INTO glpi_computerantiviruses (name, manufacturers_id, signature_version, is_active, is_uptodate, antivirus_version, is_dynamic, computers_id, date_creation, date_mod) VALUES ('Windows Defender', '1', '1.303.25.0', '', '1', '', '1', '5', '2022-01-26 12:22:20', '2022-01-26 12:22:20') Error: Incorrect integer value: '' for column GLPI.glpi_computerantiviruses.is_active at row 1 Backtrace : src/DBmysql.php:1180
src/CommonDBTM.php:652 DBmysql->insert() src/CommonDBTM.php:1242 CommonDBTM->addToDB() src/Inventory/Asset/Antivirus.php:138 CommonDBTM->add() src/Inventory/Asset/MainAsset.php:751 Glpi\Inventory\Asset\Antivirus->handle() src/Inventory/Asset/MainAsset.php:672 Glpi\Inventory\Asset\MainAsset->handleAssets() src/RuleImportAsset.php:954 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1496 RuleImportAsset->executeActions() src/RuleCollection.php:1583 Rule->process() src/Inventory/Asset/MainAsset.php:515 RuleCollection->processAllRules() src/Inventory/Inventory.php:658 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:324 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:318 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:83 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:292 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:212 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest() front/inventory.php:57 Glpi\Agent\Communication\AbstractRequest->handleRequest() {"user":"inventory@glpi.localhost"} [2022-01-26 12:59:16] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/src/DBmysql.php line 352
MySQL query error: SQL: INSERT INTO glpi_computerantiviruses (name, manufacturers_id, signature_version, is_active, is_uptodate, antivirus_version, is_dynamic, computers_id, date_creation, date_mod) VALUES ('Windows Defender', '1', '1.303.25.0', '', '1', '', '1', '5', '2022-01-26 12:59:16', '2022-01-26 12:59:16') Error: Incorrect integer value: '' for column GLPI.glpi_computerantiviruses.is_active at row 1 Backtrace : src/DBmysql.php:1180
src/CommonDBTM.php:652 DBmysql->insert() src/CommonDBTM.php:1242 CommonDBTM->addToDB() src/Inventory/Asset/Antivirus.php:138 CommonDBTM->add() src/Inventory/Asset/MainAsset.php:751 Glpi\Inventory\Asset\Antivirus->handle() src/Inventory/Asset/MainAsset.php:672 Glpi\Inventory\Asset\MainAsset->handleAssets() src/RuleImportAsset.php:942 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1496 RuleImportAsset->executeActions() src/RuleCollection.php:1583 Rule->process() src/Inventory/Asset/MainAsset.php:515 RuleCollection->processAllRules() src/Inventory/Inventory.php:658 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:324 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:318 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:83 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:292 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:212 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest() front/inventory.php:57 Glpi\Agent\Communication\AbstractRequest->handleRequest() {"user":"inventory@glpi.localhost"} [2022-01-26 15:46:58] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/src/DBmysql.php line 352 MySQL query error: SQL: INSERT INTO glpi_computerantiviruses (name, manufacturers_id, signature_version, is_active, is_uptodate, antivirus_version, is_dynamic, computers_id, date_creation, date_mod) VALUES ('Windows Defender', '1', '1.303.25.0', '', '1', '', '1', '5', '2022-01-26 15:46:57', '2022-01-26 15:46:57') Error: Incorrect integer value: '' for column GLPI.glpi_computerantiviruses.is_active at row 1 Backtrace : src/DBmysql.php:1180
src/CommonDBTM.php:652 DBmysql->insert() src/CommonDBTM.php:1242 CommonDBTM->addToDB() src/Inventory/Asset/Antivirus.php:138 CommonDBTM->add() src/Inventory/Asset/MainAsset.php:751 Glpi\Inventory\Asset\Antivirus->handle() src/Inventory/Asset/MainAsset.php:672 Glpi\Inventory\Asset\MainAsset->handleAssets() src/RuleImportAsset.php:942 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1496 RuleImportAsset->executeActions() src/RuleCollection.php:1583 Rule->process() src/Inventory/Asset/MainAsset.php:515 RuleCollection->processAllRules() src/Inventory/Inventory.php:658 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:324 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:318 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:83 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:292 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:212 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest() front/inventory.php:57 Glpi\Agent\Communication\AbstractRequest->handleRequest() {"user":"inventory@glpi.localhost"} [2022-01-27 00:03:28] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/src/DBmysql.php line 352
MySQL query error: SQL: INSERT INTO glpi_computerantiviruses (name, manufacturers_id, signature_version, is_active, is_uptodate, antivirus_version, is_dynamic, computers_id, date_creation, date_mod) VALUES ('Windows Defender', '1', '1.303.25.0', '', '1', '', '1', '5', '2022-01-27 00:03:28', '2022-01-27 00:03:28') Error: Incorrect integer value: '' for column GLPI.glpi_computerantiviruses.is_active at row 1 Backtrace : src/DBmysql.php:1180
src/CommonDBTM.php:652 DBmysql->insert() src/CommonDBTM.php:1242 CommonDBTM->addToDB() src/Inventory/Asset/Antivirus.php:138 CommonDBTM->add() src/Inventory/Asset/MainAsset.php:751 Glpi\Inventory\Asset\Antivirus->handle() src/Inventory/Asset/MainAsset.php:672 Glpi\Inventory\Asset\MainAsset->handleAssets() src/RuleImportAsset.php:942 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1496 RuleImportAsset->executeActions() src/RuleCollection.php:1583 Rule->process() src/Inventory/Asset/MainAsset.php:515 RuleCollection->processAllRules() src/Inventory/Inventory.php:658 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:324 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:318 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:83 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:292 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:212 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest() front/inventory.php:57 Glpi\Agent\Communication\AbstractRequest->handleRequest() {"user":"inventory@glpi.localhost"} [2022-01-27 15:30:36] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/src/DBmysql.php line 352 MySQL query error: SQL: INSERT INTO glpi_computerantiviruses (name, manufacturers_id, signature_version, is_active, is_uptodate, antivirus_version, is_dynamic, computers_id, date_creation, date_mod) VALUES ('Windows Defender', '1', '1.303.25.0', '', '1', '', '1', '6', '2022-01-27 15:30:35', '2022-01-27 15:30:35') Error: Incorrect integer value: '' for column GLPI.glpi_computerantiviruses.is_active at row 1 Backtrace : src/DBmysql.php:1180
src/CommonDBTM.php:652 DBmysql->insert() src/CommonDBTM.php:1242 CommonDBTM->addToDB() src/Inventory/Asset/Antivirus.php:138 CommonDBTM->add() src/Inventory/Asset/MainAsset.php:751 Glpi\Inventory\Asset\Antivirus->handle() src/Inventory/Asset/MainAsset.php:672 Glpi\Inventory\Asset\MainAsset->handleAssets() src/RuleImportAsset.php:954 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1496 RuleImportAsset->executeActions() src/RuleCollection.php:1583 Rule->process() src/Inventory/Asset/MainAsset.php:515 RuleCollection->processAllRules() src/Inventory/Inventory.php:658 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:324 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:318 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:83 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:292 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:212 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest() front/inventory.php:57 Glpi\Agent\Communication\AbstractRequest->handleRequest() {"user":"inventory@glpi.localhost"} [2022-01-27 15:44:34] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/src/DBmysql.php line 352
MySQL query error: SQL: INSERT INTO glpi_computerantiviruses (name, manufacturers_id, signature_version, is_active, is_uptodate, antivirus_version, is_dynamic, computers_id, date_creation, date_mod) VALUES ('Windows Defender', '1', '1.303.25.0', '', '1', '', '1', '6', '2022-01-27 15:44:34', '2022-01-27 15:44:34') Error: Incorrect integer value: '' for column GLPI.glpi_computerantiviruses.is_active at row 1 Backtrace : src/DBmysql.php:1180
src/CommonDBTM.php:652 DBmysql->insert() src/CommonDBTM.php:1242 CommonDBTM->addToDB() src/Inventory/Asset/Antivirus.php:138 CommonDBTM->add() src/Inventory/Asset/MainAsset.php:751 Glpi\Inventory\Asset\Antivirus->handle() src/Inventory/Asset/MainAsset.php:672 Glpi\Inventory\Asset\MainAsset->handleAssets() src/RuleImportAsset.php:942 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1496 RuleImportAsset->executeActions() src/RuleCollection.php:1583 Rule->process() src/Inventory/Asset/MainAsset.php:515 RuleCollection->processAllRules() src/Inventory/Inventory.php:658 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:324 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:318 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:83 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:292 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:212 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest() front/inventory.php:57 Glpi\Agent\Communication\AbstractRequest->handleRequest() {"user":"inventory@glpi.localhost"}

g-bougard commented 2 years ago

Hi @Badkempachi

please you forgot to be accurate on your environment setup. Can you clarify some points ?

I understand you're using GLPI 10.0.0-beta and GlpiInventory but can you confirm the versions ? You're on the glpi-agent github project and didn't report anything on used agent. I would more expect a glpi-agent output or log. What version are you using ?

If you didn't try it, can you try using glpi-agent nightly build as it includes some related fixes ?

Badkempachi commented 2 years ago

yes i am using GLPI 10.0.0-beta and GlpiInventory Agent version 1.1-git3042142e. agent_log.txt

Badkempachi commented 2 years ago
Информация о системе, установке и конфигурации
GLPI 10.0.0-dev ( => /var/www/html/glpi)
Installation mode: TARBALL
Current language:ru_RU

Server
 
Operating system: Linux glpi.localhost.ru 5.4.17-2136.302.7.2.1.el8uek.x86_64 #2 SMP Tue Jan 18 12:11:34 PST 2022 x86_64
PHP 7.4.27 fpm-fcgi (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apcu, bz2, calendar, cgi-fcgi, ctype, curl,
    date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl,
    pcre, pdo_mysql, pdo_sqlite, session, sockets, sodium, sqlite3, standard, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl,
    zip, zlib)
Setup: max_execution_time="30" memory_limit="256M" post_max_size="8M" safe_mode="" session.save_handler="files"
    upload_max_filesize="2M" 
Software: Apache/2.4.37 (Oracle Linux) OpenSSL/1.1.1k ()
    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
Server Software: MariaDB Server
    Server Version: 10.3.28-MariaDB
    Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    Parameters: root@localhost/GLPI
    Host info: Localhost via UNIX socket

PHP version (7.4.27) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, json, simplexml.
curl extension is installed.
gd extension is installed.
intl extension is installed.
libxml extension is installed.
zlib extension is installed.
Database engine version (10.3.28) is supported.
The log file has been created successfully.
Write access to /var/www/html/glpi/files/_cache has been validated.
Write access to /var/www/html/glpi/config has been validated.
Write access to /var/www/html/glpi/files/_cron has been validated.
Write access to /var/www/html/glpi/files has been validated.
Write access to /var/www/html/glpi/files/_dumps has been validated.
Write access to /var/www/html/glpi/files/_graphs has been validated.
Write access to /var/www/html/glpi/files/_lock has been validated.
Write access to /var/www/html/glpi/files/_pictures has been validated.
Write access to /var/www/html/glpi/files/_plugins has been validated.
Write access to /var/www/html/glpi/files/_rss has been validated.
Write access to /var/www/html/glpi/files/_sessions has been validated.
Write access to /var/www/html/glpi/files/_tmp has been validated.
Write access to /var/www/html/glpi/files/_uploads has been validated.
Web access to the files directory should not be allowed but this cannot be checked automatically on this instance.
Make sure access to error log file (/files/_log/php-errors.log) is forbidden; otherwise review .htaccess file and web server configuration.
SELinux configuration is OK.
exif extension is installed.
ldap extension is installed.
openssl extension is installed.
zip extension is installed.
bz2 extension is installed.
Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to /var/www/html/glpi/marketplace has been validated.
Timezones seems loaded in database.

GLPI constants
 
GLPI_ROOT: /var/www/html/glpi
GLPI_CONFIG_DIR: /var/www/html/glpi/config
GLPI_VAR_DIR: /var/www/html/glpi/files
GLPI_MARKETPLACE_DIR: /var/www/html/glpi/marketplace
GLPI_USE_CSRF_CHECK: 1
GLPI_CSRF_EXPIRES: 7200
GLPI_CSRF_MAX_TOKENS: 100
GLPI_USE_IDOR_CHECK: 1
GLPI_IDOR_EXPIRES: 7200
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: 
GLPI_TELEMETRY_URI: https://telemetry.glpi-project.org
GLPI_INSTALL_MODE: TARBALL
GLPI_NETWORK_MAIL: glpi@teclib.com
GLPI_NETWORK_SERVICES: https://services.glpi-network.com
GLPI_MARKETPLACE_ALLOW_OVERRIDE: 1
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: 1
GLPI_USER_AGENT_EXTRA_COMMENTS: 
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: 1
GLPI_AJAX_DASHBOARD: 1
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_DEMO_MODE: 0
GLPI_DOC_DIR: /var/www/html/glpi/files
GLPI_CACHE_DIR: /var/www/html/glpi/files/_cache
GLPI_CRON_DIR: /var/www/html/glpi/files/_cron
GLPI_DUMP_DIR: /var/www/html/glpi/files/_dumps
GLPI_GRAPH_DIR: /var/www/html/glpi/files/_graphs
GLPI_LOCAL_I18N_DIR: /var/www/html/glpi/files/_locales
GLPI_LOCK_DIR: /var/www/html/glpi/files/_lock
GLPI_LOG_DIR: /var/www/html/glpi/files/_log
GLPI_PICTURE_DIR: /var/www/html/glpi/files/_pictures
GLPI_PLUGIN_DOC_DIR: /var/www/html/glpi/files/_plugins
GLPI_RSS_DIR: /var/www/html/glpi/files/_rss
GLPI_SESSION_DIR: /var/www/html/glpi/files/_sessions
GLPI_TMP_DIR: /var/www/html/glpi/files/_tmp
GLPI_UPLOAD_DIR: /var/www/html/glpi/files/_uploads
GLPI_INVENTORY_DIR: /var/www/html/glpi/files/_inventories
GLPI_NETWORK_REGISTRATION_API_URL: https://services.glpi-network.com/api/registration/
GLPI_MARKETPLACE_PLUGINS_API_URI: https://services.glpi-network.com/api/glpi-plugins/
GLPI_I18N_DIR: /var/www/html/glpi/locales
GLPI_VERSION: 10.0.0-dev
GLPI_SCHEMA_VERSION: 10.0.0-dev@5d5ed159d30f08ffa4fb9065d7c3f64855d5d4e1
GLPI_MARKETPLACE_PRERELEASES: 1
GLPI_MIN_PHP: 7.4.0
GLPI_YEAR: 2021

Libraries
 
htmlawed/htmlawed version 1.2.6 in (/var/www/html/glpi/vendor/htmlawed/htmlawed)
phpmailer/phpmailer version 6.5.3 in (/var/www/html/glpi/vendor/phpmailer/phpmailer/src)
simplepie/simplepie version 1.5.6 in (/var/www/html/glpi/vendor/simplepie/simplepie/library)
mpdf/mpdf in (/var/www/html/glpi/vendor/mpdf/mpdf/src)
michelf/php-markdown in (/var/www/html/glpi/vendor/michelf/php-markdown/Michelf)
true/punycode in (/var/www/html/glpi/vendor/true/punycode/src)
iamcal/lib_autolink in (/var/www/html/glpi/vendor/iamcal/lib_autolink)
sabre/dav in (/var/www/html/glpi/vendor/sabre/dav/lib/DAV)
sabre/http in (/var/www/html/glpi/vendor/sabre/http/lib)
sabre/uri in (/var/www/html/glpi/vendor/sabre/uri/lib)
sabre/vobject in (/var/www/html/glpi/vendor/sabre/vobject/lib)
laminas/laminas-i18n in (/var/www/html/glpi/vendor/laminas/laminas-i18n/src)
laminas/laminas-servicemanager in (/var/www/html/glpi/vendor/laminas/laminas-servicemanager/src)
monolog/monolog in (/var/www/html/glpi/vendor/monolog/monolog/src/Monolog)
sebastian/diff in (/var/www/html/glpi/vendor/sebastian/diff/src)
elvanto/litemoji in (/var/www/html/glpi/vendor/elvanto/litemoji/src)
symfony/console in (/var/www/html/glpi/vendor/symfony/console)
scssphp/scssphp in (/var/www/html/glpi/vendor/scssphp/scssphp/src)
laminas/laminas-mail in (/var/www/html/glpi/vendor/laminas/laminas-mail/src/Protocol)
laminas/laminas-mime in (/var/www/html/glpi/vendor/laminas/laminas-mime/src)
rlanvin/php-rrule in (/var/www/html/glpi/vendor/rlanvin/php-rrule/src)
blueimp/jquery-file-upload in (/var/www/html/glpi/vendor/blueimp/jquery-file-upload/server/php)
ramsey/uuid in (/var/www/html/glpi/vendor/ramsey/uuid/src)
psr/log in (/var/www/html/glpi/vendor/psr/log/Psr/Log)
psr/simple-cache in (/var/www/html/glpi/vendor/psr/simple-cache/src)
psr/cache in (/var/www/html/glpi/vendor/psr/cache/src)
league/csv in (/var/www/html/glpi/vendor/league/csv/src)
mexitek/phpcolors in (/var/www/html/glpi/vendor/mexitek/phpcolors/src/Mexitek/PHPColors)
guzzlehttp/guzzle in (/var/www/html/glpi/vendor/guzzlehttp/guzzle/src)
guzzlehttp/psr7 in (/var/www/html/glpi/vendor/guzzlehttp/psr7/src)
glpi-project/inventory_format in (/var/www/html/glpi/vendor/glpi-project/inventory_format/lib/php)
wapmorgan/unified-archive in (/var/www/html/glpi/vendor/wapmorgan/unified-archive/src)
paragonie/sodium_compat in (/var/www/html/glpi/vendor/paragonie/sodium_compat/src)
symfony/cache in (/var/www/html/glpi/vendor/symfony/cache)
html2text/html2text in (/var/www/html/glpi/vendor/html2text/html2text/src)
symfony/dom-crawler in (/var/www/html/glpi/vendor/symfony/dom-crawler)
twig/twig in (/var/www/html/glpi/vendor/twig/twig/src)
twig/string-extra in (/var/www/html/glpi/vendor/twig/string-extra)
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php80 in (/var/www/html/glpi/vendor/symfony/polyfill-php80)

LDAP directories
 
Server: '192.168.60.2', Port: '389', BaseDN: 'DC=localhost,DC=ru', Connection filter:
        '(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))', RootDN:
        'ldapsearch-glpi@localhost.ru', Use TLS: none

SQL replicas
 
Not active

Notifications
 
Way of sending emails: PHP

Plugins list
 
    connections          Name: Connections                    Version: 10.0.0-rc2 State: Enabled
    manageentities       Name: Entities portal                Version: 4.0.0-rc1  State: Enabled
    glpiinventory        Name: GLPI Inventory                 Version: 1.0.0-rc3  State: Enabled
    addressing           Name: IP Adressing                   Version: 3.0.0-rc2  State: Enabled
    mreporting           Name: Подробные отчеты          Version: 1.8.0-rc1  State: Enabled
    shellcommands        Name: Служебные команды        Version: 4.0.0-rc2  State: Enabled
    typology             Name: Типологий                      Version: 3.0.0-rc1  State: Enabled

g-bougard commented 2 years ago

Hi @Badkempachi

in place of https://glpi.localhost.ru/front/inventory.php as server url in your agent config, can you set it to https://glpi.localhost.ru/plugins/glpiinventory or https://glpi.localhost.ru/marketplace/glpiinventory depending on the way you installed GlpiInventory plugin ? This is required as finally your agent actually don't request the plugin as it should but native inventory which by itself still not support Collect task.

I see also you are indeed using GLPI 10 development version, can you confirm the git revision of your development version ?

Badkempachi commented 2 years ago

Hi @Badkempachi

in place of https://glpi.localhost.ru/front/inventory.php as server url in your agent config, can you set it to https://glpi.localhost.ru/plugins/glpiinventory or https://glpi.localhost.ru/marketplace/glpiinventory depending on the way you installed GlpiInventory plugin ? This is required as finally your agent actually don't request the plugin as it should but native inventory which by itself still not support Collect task.

I see also you are indeed using GLPI 10 development version, can you confirm the git revision of your development version ?

If I found the correct information, then version 10.0.0-dev@5d5ed159d30f08ffa4fb9065d7c3f64855d5d4e1 is used

Badkempachi commented 2 years ago

Thanks, now the tasks are completed. But I did not see this information in the documentation about the need to change the address, and when installing the agent, it is recommended to use the address that you used earlier. But I also had another problem, I get an error before trying to view the collected data from the agent glpierror .

Badkempachi commented 2 years ago

[2022-01-28 16:21:08] glpiphplog.ALERT: PHP Compile Error (64): Cannot declare class Glpi\Socket, because the name is already in use in /var/www/html/glpi/src/Socket.php at line 0
[2022-01-28 16:21:33] glpiphplog.ALERT:
PHP Compile Error (64): Cannot declare class Glpi\Socket, because the name is already in use in /var/www/html/glpi/src/Socket.php at line 0
[2022-01-28 16:21:36] glpiphplog.ALERT: PHP Compile Error (64): Cannot declare class Glpi\Socket, because the name is already in use in /var/www/html/glpi/src/Socket.php at line 0
[2022-01-28 16:21:39] glpiphplog.ALERT:
PHP Compile Error (64): Cannot declare class Glpi\Socket, because the name is already in use in /var/www/html/glpi/src/Socket.php at line 0
[2022-01-28 16:21:43] glpiphplog.ALERT: PHP Compile Error (64): Cannot declare class Glpi\Socket, because the name is already in use in /var/www/html/glpi/src/Socket.php at line 0
[2022-01-28 16:22:06] glpiphplog.ALERT:
PHP Compile Error (64): Cannot declare class Glpi\Socket, because the name is already in use in /var/www/html/glpi/src/Socket.php at line 0
[2022-01-28 16:22:07] glpiphplog.ALERT: PHP Compile Error (64): Cannot declare class Glpi\Socket, because the name is already in use in /var/www/html/glpi/src/Socket.php at line 0
[2022-01-28 16:22:10] glpiphplog.NOTICE:
PHP Notice (8): Undefined offset: 5 in /var/www/html/glpi/marketplace/glpiinventory/inc/taskjobstate.class.php at line 799 Backtrace : ...ce/glpiinventory/inc/taskjobstate.class.php:165 PluginGlpiinventoryTaskjobstate->showStatesForComputer() src/CommonGLPI.php:687 PluginGlpiinventoryTaskjobstate::displayTabContentForItem() ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()

[2022-01-28 16:22:10] glpiphplog.NOTICE: *** PHP Notice (8): Undefined offset: 5 in /var/www/html/glpi/marketplace/glpiinventory/inc/taskjobstate.class.php at line 802 Backtrace : ...ce/glpiinventory/inc/taskjobstate.class.php:165 PluginGlpiinventoryTaskjobstate->showStatesForComputer() src/CommonGLPI.php:687 PluginGlpiinventoryTaskjobstate::displayTabContentForItem() ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()

[2022-01-28 16:22:10] glpiphplog.NOTICE: *** PHP Notice (8): Undefined offset: 5 in /var/www/html/glpi/marketplace/glpiinventory/inc/taskjobstate.class.php at line 799 Backtrace : ...ce/glpiinventory/inc/taskjobstate.class.php:165 PluginGlpiinventoryTaskjobstate->showStatesForComputer() src/CommonGLPI.php:687 PluginGlpiinventoryTaskjobstate::displayTabContentForItem() ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()

[2022-01-28 16:22:10] glpiphplog.NOTICE: *** PHP Notice (8): Undefined offset: 5 in /var/www/html/glpi/marketplace/glpiinventory/inc/taskjobstate.class.php at line 802 Backtrace : ...ce/glpiinventory/inc/taskjobstate.class.php:165 PluginGlpiinventoryTaskjobstate->showStatesForComputer() src/CommonGLPI.php:687 PluginGlpiinventoryTaskjobstate::displayTabContentForItem() ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()

[2022-01-28 16:22:10] glpiphplog.NOTICE: *** PHP Notice (8): Undefined offset: 5 in /var/www/html/glpi/marketplace/glpiinventory/inc/taskjobstate.class.php at line 799 Backtrace : ...ce/glpiinventory/inc/taskjobstate.class.php:165 PluginGlpiinventoryTaskjobstate->showStatesForComputer() src/CommonGLPI.php:687 PluginGlpiinventoryTaskjobstate::displayTabContentForItem() ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()

[2022-01-28 16:22:10] glpiphplog.NOTICE: *** PHP Notice (8): Undefined offset: 5 in /var/www/html/glpi/marketplace/glpiinventory/inc/taskjobstate.class.php at line 802 Backtrace : ...ce/glpiinventory/inc/taskjobstate.class.php:165 PluginGlpiinventoryTaskjobstate->showStatesForComputer() src/CommonGLPI.php:687 PluginGlpiinventoryTaskjobstate::displayTabContentForItem() ajax/common.tabs.php:107 CommonGLPI::displayStandardTab()

g-bougard commented 2 years ago

I don't know right now for the server-side error you're reporting. But can you attach the lines related to the collect task run from the agent log ? Have you checked the log in the task ? Did it report some datas has been collected ?

Yes, sorry about the documentation, we need to clarify that URL problem.

Badkempachi commented 2 years ago

Я не знаю прямо сейчас об ошибке на стороне сервера, о которой вы сообщаете. Но можете ли вы прикрепить строки, относящиеся к запуску задачи сбора, из журнала агента? Вы проверили журнал в задаче? Он сообщил, что некоторые данные были собраны?

Да, извините за документацию, нам нужно прояснить эту проблему с URL.

unfortunately he was unable to decode the data. here is the log itself : [Fri Jan 28 16:15:20 2022][debug2] path mandatory value is present in job [Fri Jan 28 16:15:20 2022][debug2] path mandatory value is present in job [Fri Jan 28 16:15:20 2022][debug2] path mandatory value is present in job [Fri Jan 28 16:15:20 2022][debug2] path mandatory value is present in job [Fri Jan 28 16:15:20 2022][debug2] path mandatory value is present in job [Fri Jan 28 16:15:20 2022][debug2] Starting a collect job... [Fri Jan 28 16:15:20 2022][debug2] Collect job has uuid: 61f3ec535e049 [Fri Jan 28 16:15:20 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=setAnswer&uuid=61f3ec535e049&method=POST [Fri Jan 28 16:15:20 2022][debug2] [http client] POST: action=setAnswer&_glpi_csrf_token=8d94187e68ba310ede0789b99632bcc3cfc53ec2a113c66bdcde4393470ef4c9&OMSLastUpdated=0x01A138C7&_sid=2&uuid=61f3ec535e049&_cpt=1 [Fri Jan 28 16:15:20 2022][error] [http client] Can't decode JSON content, starting with [Fri Jan 28 16:15:20 2022][debug2] Starting a collect job... [Fri Jan 28 16:15:20 2022][debug2] Collect job has uuid: 61f3ec535e049 [Fri Jan 28 16:15:20 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=setAnswer&uuid=61f3ec535e049&method=POST [Fri Jan 28 16:15:20 2022][debug2] [http client] POST: action=setAnswer&FriendlyName=Kaspersky%20Outlook%20Anti-Virus%20Addin&_sid=3&uuid=61f3ec535e049&_cpt=1 [Fri Jan 28 16:15:20 2022][error] [http client] Can't decode JSON content, starting with [Fri Jan 28 16:15:20 2022][debug2] Starting a collect job... [Fri Jan 28 16:15:20 2022][debug2] Collect job has uuid: 61f3e98644788 [Fri Jan 28 16:15:20 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=setAnswer&uuid=61f3e98644788&method=POST [Fri Jan 28 16:15:20 2022][debug2] [http client] POST: action=setAnswer&OMSLastUpdated=0x01A138C7&_sid=2&uuid=61f3e98644788&_cpt=1 [Fri Jan 28 16:15:20 2022][error] [http client] Can't decode JSON content, starting with [Fri Jan 28 16:15:20 2022][debug2] Starting a collect job... [Fri Jan 28 16:15:20 2022][debug2] Collect job has uuid: 61f3e98644788 [Fri Jan 28 16:15:20 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=setAnswer&uuid=61f3e98644788&method=POST [Fri Jan 28 16:15:20 2022][debug2] [http client] POST: action=setAnswer&FriendlyName=Kaspersky%20Outlook%20Anti-Virus%20Addin&_sid=3&uuid=61f3e98644788&_cpt=1 [Fri Jan 28 16:15:20 2022][error] [http client] Can't decode JSON content, starting with [Fri Jan 28 16:15:20 2022][debug2] Starting a collect job... [Fri Jan 28 16:15:20 2022][debug2] Collect job has uuid: 61f3e9863f7dc [Fri Jan 28 16:15:20 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=setAnswer&uuid=61f3e9863f7dc&method=POST [Fri Jan 28 16:15:20 2022][debug2] [http client] POST: action=setAnswer&FriendlyName=Kaspersky%20Outlook%20Anti-Virus%20Addin&_sid=4&uuid=61f3e9863f7dc&_cpt=1 [Fri Jan 28 16:15:20 2022][error] [http client] Can't decode JSON content, starting with [Fri Jan 28 16:15:20 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=jobsDone&uuid=61f3e98644788 [Fri Jan 28 16:15:21 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=jobsDone&uuid=61f3ec535e049 [Fri Jan 28 16:15:21 2022][debug2] http://glpi.localhost.ru/marketplace/glpiinventory/b/collect/?action=jobsDone&uuid=61f3e9863f7dc [Fri Jan 28 16:15:21 2022][debug] new thread 8 to handle task NetDiscovery [Fri Jan 28 16:15:21 2022][debug] NetDiscovery task not supported by server [Fri Jan 28 16:15:22 2022][debug] new thread 9 to handle task RemoteInventory [Fri Jan 28 16:15:22 2022][debug] Remote inventory task execution disabled: no remote set [Fri Jan 28 16:15:22 2022][debug] new thread 10 to handle task NetInventory [Fri Jan 28 16:15:22 2022][debug] NetInventory task not supported by server [Fri Jan 28 16:15:22 2022][debug] new thread 11 to handle task Deploy

but he got the required values correctly glpierror5

g-bougard commented 2 years ago

Yes, the agent seems to run the data collection as expected. The [error] [http client] Can't decode JSON content, starting with lines are still fixed in glpi master and are not a problem. You should now open an issue on glpiinventory-plugin project linking this one. In your issue, you should describe all the setup you made with your collect task, or at least giving a sample: collect information and task setup. With that I'll try to reproduce the case on monday. Thank you for your involving.