You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-09-15 14:45:58

ViktorG
Member
Registered: 2021-04-13
Posts: 19

Fusioninventory agent [http client] communication error: 404 Not Found

GLPI 9.5.5 (Ubuntu 20.04.3 LTS) 192.168.30.129
FusionInventory 9.5+3.0
FusionInventory Agent 2.6 on server GLPI

[info] target server0: server http://192.168.30.129/plugins/fusioninventory/
[info] sending prolog request to server0
[error] [http client] communication error: 404 Not Found
[error] No answer from server at http://192.168.30.129/plugins/fusioninventory/

non https
other windows agents work fine

Offline

#2 2021-09-15 15:06:21

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 537
Website

Re: Fusioninventory agent [http client] communication error: 404 Not Found

Hi ViktorG,

you should enable "debug = 2" in config or registry (for windows agents) and restart the agent, you may see more details on the communication process and the resulting error. For example, you should see the start of the received answer which may contain informations related to the involved server.


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

#3 2021-09-15 15:14:21

ViktorG
Member
Registered: 2021-04-13
Posts: 19

Re: Fusioninventory agent [http client] communication error: 404 Not Found

thx, gbougard, done

[debug] Logger backend File initialised
[debug] FusionInventory Agent (2.6-1)
[debug] Configuration directory: /etc/fusioninventory
[debug] Data directory: /usr/share/fusioninventory
[debug] Storage directory: /var/lib/fusioninventory-agent
[debug] Lib directory: /usr/share/fusioninventory/lib
[debug] [target server0] Next server contact planned for Wed Sep 15 16:10:42 2021
[debug2] getAvailableTasks() : add of task Inventory version 1.10
[debug2] getAvailableTasks() : add of task Maintenance version 1.1
[debug2] getAvailableTasks() : add of task WakeOnLan version 2.2
[debug2] getAvailableTasks() : add of task WMI version 0.3
[debug2] isParamArrayAndFilled('tasks') : false
[debug] Available tasks:
[debug] - WakeOnLan: 2.2
[debug] - Inventory: 1.10
[debug] - Maintenance: 1.1
[debug] - WMI: 0.3
[debug] target server0: server http://192.168.30.129/plugins/fusioninventory/
[debug] Planned tasks for server0:
[debug] - WakeOnLan: 2.2
[debug] - Inventory: 1.10
[debug] - WMI: 0.3
[debug] target scheduler0: scheduler
[debug] Planned tasks for scheduler0:
[debug] - Maintenance: 1.1
[debug] Built by Teclib
[debug] Build time: 2020-11-27-16h37
[debug] Running in foreground mode
[info] target server0: server http://192.168.30.129/plugins/fusioninventory/
[debug] [http client] Using Compress::Zlib for compression
[info] sending prolog request to server0
[debug2] [http client] sending message:
 <?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
  <DEVICEID>glpi-2021-09-15-11-56-22</DEVICEID>
  <QUERY>PROLOG</QUERY>
  <TOKEN>....</TOKEN>
</REQUEST>
[error] [http client] communication error: 404 Not Found
[error] No answer from server at http://192.168.30.129/plugins/fusioninventory/

Offline

#4 2021-09-16 10:41:47

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 774
Website

Re: Fusioninventory agent [http client] communication error: 404 Not Found

My guess

[error] [http client] communication error: 404 Not Found
[error] No answer from server at http://192.168.30.129/plugins/fusioninventory/

No fusioninventory plugin, or wrong URL.

Offline

#5 2021-09-19 19:08:42

oj69
Member
From: Somewhere in the cloud
Registered: 2021-02-01
Posts: 157

Re: Fusioninventory agent [http client] communication error: 404 Not Found

It is a wrong URL ... mostly the URL´s are starting with .../glpi/plugings/fusioninventory/

Please check where you have installed your fusions inventory module

Offline

#6 2021-09-20 13:39:53

ViktorG
Member
Registered: 2021-04-13
Posts: 19

Re: Fusioninventory agent [http client] communication error: 404 Not Found

oj69 wrote:

It is a wrong URL ... mostly the URL´s are starting with .../glpi/plugings/fusioninventory/

Please check where you have installed your fusions inventory module

same mistake.

The agent is installed on the glpi server. http://"glpi.domain name":62354/

This is FusionInventory Agent 2.6-1
The current status is waiting
Next server target execution planned for:
http://192.168.30.129/glpi/plugins/fusioninventory/: Mon Sep 20 14:08:34 2021

Windows agents see the server by name http://"glpi.domain name"/plugins/fusioninventory/

Offline

#7 2021-09-20 15:58:10

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 537
Website

Re: Fusioninventory agent [http client] communication error: 404 Not Found

What do you when you try to access http://192.168.30.129/plugins/fusioninventory/ from an internet browser ?
Are you sure the HTTP server where GLPI & FusionInventory plugin is installed answer to request on the server IP ?
My guess is you have some HTTP server configuration issues.


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

#8 2021-09-20 16:04:24

ViktorG
Member
Registered: 2021-04-13
Posts: 19

Re: Fusioninventory agent [http client] communication error: 404 Not Found

solved it like this:
add in host file string
192.168.30.129 glpi."domain name"

Offline

#9 2021-09-20 22:14:12

oj69
Member
From: Somewhere in the cloud
Registered: 2021-02-01
Posts: 157

Re: Fusioninventory agent [http client] communication error: 404 Not Found

seams there are a lot of incorrect/inconsistent/sub-optimal configurations which cause malfunctions.

- make sure that all nodes (server and clients) are fully resolvable by DNS
- make sure that on the glpi server the fusionserver url is set with a correct and resolvable URL (an ip-address is not good at all). use a static ip address for the server to avoid resolver issues

in other words: practice networking best practices and a correct fusion configuration will make sure that you won´t have any hassle with it

Offline

#10 2021-10-21 19:07:03

macarleo
Member
Registered: 2021-10-09
Posts: 10

Re: Fusioninventory agent [http client] communication error: 404 Not Found

i have the same problem with GLPI 9.5.6 and linux centos FusionInventory Agent 2.3.21

log /var/log/fusioninventory.log

Thu Oct 21 18:58:18 2021][info] FusionInventory Agent exiting
[Thu Oct 21 18:58:18 2021][debug] FusionInventory Agent (2.3.21)
[Thu Oct 21 18:58:18 2021][debug] Configuration directory: /etc/fusioninventory
[Thu Oct 21 18:58:18 2021][debug] Data directory: /usr/share/fusioninventory
[Thu Oct 21 18:58:18 2021][debug] Storage directory: /var/lib/fusioninventory-agent
[Thu Oct 21 18:58:18 2021][debug] Lib directory: /usr/share/fusioninventory/lib
[Thu Oct 21 18:58:18 2021][debug] [target server0] Next server contact planned for Thu Oct 21 19:40:31 2021
[Thu Oct 21 18:58:18 2021][debug] Available tasks:
[Thu Oct 21 18:58:18 2021][debug] - ESX: 2.2.2
[Thu Oct 21 18:58:18 2021][debug] - Inventory: 1.3
[Thu Oct 21 18:58:18 2021][debug] - Collect: 2.4.0
[Thu Oct 21 18:58:18 2021][debug] - WakeOnLan: 2.2
[Thu Oct 21 18:58:18 2021][debug] - NetDiscovery: 2.3
[Thu Oct 21 18:58:18 2021][debug] - Deploy: 2.4
[Thu Oct 21 18:58:18 2021][debug] - NetInventory: 2.3
[Thu Oct 21 18:58:18 2021][debug] Planned tasks:
[Thu Oct 21 18:58:18 2021][debug] - ESX: 2.2.2
[Thu Oct 21 18:58:18 2021][debug] - Inventory: 1.3
[Thu Oct 21 18:58:18 2021][debug] - Collect: 2.4.0
[Thu Oct 21 18:58:18 2021][debug] - WakeOnLan: 2.2
[Thu Oct 21 18:58:18 2021][debug] - NetDiscovery: 2.3
[Thu Oct 21 18:58:18 2021][debug] - Deploy: 2.4
[Thu Oct 21 18:58:18 2021][debug] - NetInventory: 2.3
[Thu Oct 21 18:58:18 2021][info] FusionInventory Agent starting
[Thu Oct 21 18:58:18 2021][debug] [http server] HTTPD service started on port 62354
[Thu Oct 21 18:58:19 2021][debug] Running in background mode

[Thu Oct 21 18:59:05 2021][debug] [http server] request / from client 172.23.0.168
[Thu Oct 21 18:59:05 2021][debug] [http server] response status 200
[Thu Oct 21 18:59:11 2021][debug] [http server] request /now from client 172.23.0.168
[Thu Oct 21 18:59:11 2021][debug] [http server] rescheduling next contact for all targets right now
[Thu Oct 21 18:59:11 2021][debug] [http server] response status 200
[Thu Oct 21 18:59:11 2021][debug] [http client] Using Compress::Zlib for compression
[Thu Oct 21 18:59:11 2021][info] sending prolog request to server server0
[Thu Oct 21 18:59:11 2021][debug] forking process 0 to handle task ESX
[Thu Oct 21 18:59:11 2021][info] running task ESX
[Thu Oct 21 18:59:11 2021][error] [http client] communication error: 404 Not Found
[Thu Oct 21 18:59:11 2021][debug] forking process 0 to handle task Inventory
[Thu Oct 21 18:59:12 2021][info] running task Inventory
[Thu Oct 21 18:59:12 2021][debug] Running FusionInventory::Agent::Task::Inventory::AccessLog
[Thu Oct 21 18:59:12 2021][debug] Running FusionInventory::Agent::Task::Inventory::Generic
[Thu Oct 21 18:59:12 2021][debug] Running FusionInventory::Agent::Task::Inventory::Generic::Arch

conf file agent.cfg


# send tasks results to an OCS server
# send tasks results to a FusionInventory for GLPI server
server = hxxp://192.168.1.1/plugins/fusioninventory/
# write tasks results in a directory
#local = /tmp

#
# Task definition options
#

# disable software deployment tasks
#no-task = deploy
#tasks = inventory,deploy,inventory

#
# Target scheduling options
#

# maximum delay before first target, in seconds
delaytime = 3600
# do not contact the target before next scheduled time
lazy = 0

#
# Inventory task specific options
#

# do not list local printers
# no-category = printer
# allow to scan user home directories
scan-homedirs = 1
# allow to scan user profiles
scan-profiles = 0
# save the inventory as HTML
html = 0
# timeout for inventory modules execution
backend-collect-timeout = 30
# always send data to server
force = 0
# additional inventory content file
additional-content =

#
# Package deployment task specific options
#

# do not use peer to peer to download files
no-p2p = 0

#
# Network options
#

# proxy address
proxy =
# user name for server authentication
user =
# password for server authentication
password =
# CA certificates directory
ca-cert-dir =
# CA certificates file
ca-cert-file =
# do not check server SSL certificate
no-ssl-check = 0
# connection timeout, in seconds
timeout = 180

#
# Web interface options
#

# disable embedded web server
no-httpd = 0
# network interface to listen to
httpd-ip = 192.168.1.1
# network port to listen to
httpd-port = 62354
# trust requests without authentication token
httpd-trust = 192.168.0.0/16

#
# Logging options
#

# Logger backend, either Stderr, File or Syslog (Stderr)
logger = stderr
# log file
logfile = /var/log/fusioninventory.log
# maximum log file size, in MB
logfile-maxsize = 10
# Syslog facility
logfacility = LOG_USER
# Use color in the console
color = 0

#
# Execution mode options
#

# add given tag to inventory results
tag =
# debug mode
debug = 2

# time to wait to reload config (0 means no reload, it's default value)
# conf-reload-interval = 0

what am I doing wrong?
Greetings
macarleo

Offline

#11 2021-10-21 19:47:14

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 537
Website

Re: Fusioninventory agent [http client] communication error: 404 Not Found

Hi macarleo,

this is not exactly the same problem. Here you're try to run an ESX task and the error is related to that task. Are you sure your ESX task is well defined ?

As the prolog request was answered you have no problem with the agent configuration.


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

#12 2021-10-22 08:52:28

macarleo
Member
Registered: 2021-10-09
Posts: 10

Re: Fusioninventory agent [http client] communication error: 404 Not Found

I make a premise I have no problems with the tasks of Network Discover and Network inventory (SNMP)

in the Agent module section all modules are activated,

Authentication for remote devices (VMware) and Remote devices to inventory (VMware) have been defined

a task has been defined using the Module Method Vmware host remote inventory

  in the job executions section I see prepared 1 not done yet 1

I think the configuration of the agent is correct but the job does not go into execution, even forcing the agent manually.

the only error message I find in the log is this: [error] [http client] communication error: 404 Not Found

i can't understand where i am wrong.

I forgot if I manually execute the shell commands the discovery works

# fusioninventory-esx --user root --password password --host esx-server --directory / tmp
# fusioninventory-injector -v --file /tmp/esx-server-2011-01-25-14-11-07.ocs -u https: // myserver / plugins / fusioninventory

sad

Offline

#13 2021-10-22 09:54:33

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 537
Website

Re: Fusioninventory agent [http client] communication error: 404 Not Found

I see maybe 2 sources for your problem:
1. your ESX password contains special characters that are badly stored by FusionInventory for GLPI plugin, maybe a '&', a '<' or a '>'. To fix that, you must fix it in database.
2. you have a wrong URL in the FusionInventory tab on your entitie configuration

Anyway, you should also upgrade your agent, it may report more helpful things in the journal. You may even want to switch directly to GLPI Agent which is IMHO the FusionInventory agent successor and behaves exactly like FusionInventory one.


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

#14 2021-10-23 15:09:40

macarleo
Member
Registered: 2021-10-09
Posts: 10

Re: Fusioninventory agent [http client] communication error: 404 Not Found

in fact I use strong passwords.
I corrected with simple passwords but the problem was not solved.

I have analyzed several logs

in the log file /var/log/httpd/error_log I find this info:

[Sat Oct 23 14:17:18.787942 2021] [php7:notice] [pid 1446] [client 172.23.0.xxx:16011] PHP Notice:  Undefined offset: 1 in /var/www/html/glpi/inc/itiltemplatepredefinedfield.class.php on line 162
[Sat Oct 23 14:17:18.788093 2021] [php7:notice] [pid 1446] [client 172.23.0.xxx:16011] PHP Notice:  Undefined offset: 1 in /var/www/html/glpi/inc/itiltemplatepredefinedfield.class.php on line 162
[Sat Oct 23 14:17:20.150494 2021] [php7:notice] [pid 1772] [client 172.23.0.xxx:16012] PHP Notice:  Undefined offset: 1 in /var/www/html/glpi/inc/itiltemplatepredefinedfield.class.php on line 162
[Sat Oct 23 14:17:20.150680 2021] [php7:notice] [pid 1772] [client 172.23.0.xxx:16012] PHP Notice:  Undefined offset: 1 in /var/www/html/glpi/inc/itiltemplatepredefinedfield.class.php on line 162
[Sat Oct 23 14:21:30.501143 2021] [php7:warn] [pid 1454] [client 172.23.0.xxx:16399] PHP Warning:  error_log(/var/www/html/glpi/files/_log/pluginFusioninventory-jobs.log): failed to open stream: Permission denied in /var/www/html/glpi/inc/toolbox.class.php on line 677, referer: hxxp://demo.demo.int/plugins/fusioninventory/front/task.form.php?id=22
[Sat Oct 23 14:21:30.508942 2021] [php7:warn] [pid 1454] [client 172.23.0.xxx:16399] PHP Warning:  error_log(/var/www/html/glpi/files/_log/pluginFusioninventory-jobs.log): failed to open stream: Permission denied in /var/www/html/glpi/inc/toolbox.class.php on line 677, referer: hxxp://demo.demo.int/plugins/fusioninventory/front/task.form.php?id=22



I analyzed the

logs /var/www/html/glpi/files/_log/php-errors.log and found this:

[2021-10-23 14:16:55] glpiphplog.WARNING:   *** PHP Warning (2): mysqli::real_connect(): (HY000/2002): Connection refused in /var/www/html/glpi/inc/dbmysql.class.php at line 185
  Backtrace :
  inc/dbmysql.class.php:185                          mysqli->real_connect()
  inc/dbmysql.class.php:147                          DBmysql->connect()
  inc/dbconnection.class.php:192                     DBmysql->__construct()
  inc/dbconnection.class.php:274                     DBConnection::switchToMaster()
  inc/config.php:85                                  DBConnection::establishDBConnection()
  inc/includes.php:48                                include_once()
  plugins/fusioninventory/index.php:49               include()

[2021-10-23 14:21:30] glpiphplog.WARNING:   *** PHP Warning (2): error_log(/var/www/html/glpi/files/_log/pluginFusioninventory-jobs.log): failed to open stream: Permission denied in /var/www/html/glpi/inc/toolbox.class.php at line 677
  Backtrace :
  inc/toolbox.class.php:677                          error_log()
  plugins/fusioninventory/inc/toolbox.class.php:70   Toolbox::logInFile()
  plugins/fusioninventory/inc/task.class.php:494     PluginFusioninventoryToolbox::logIfExtradebug()
  plugins/fusioninventory/inc/task.class.php:930     PluginFusioninventoryTask->prepareTaskjobs()
  plugins/fusioninventory/inc/taskview.class.php:445 PluginFusioninventoryTask->forceRunning()
  plugins/fusioninventory/front/task.form.php:52     PluginFusioninventoryTaskView->submitForm()

[2021-10-23 14:21:30] glpiphplog.WARNING:   *** PHP Warning (2): error_log(/var/www/html/glpi/files/_log/pluginFusioninventory-jobs.log): failed to open stream: Permission denied in /var/www/html/glpi/inc/toolbox.class.php at line 677
  Backtrace :
  inc/toolbox.class.php:677                          error_log()
  plugins/fusioninventory/inc/toolbox.class.php:70   Toolbox::logInFile()
  plugins/fusioninventory/inc/task.class.php:690     PluginFusioninventoryToolbox::logIfExtradebug()
  plugins/fusioninventory/inc/task.class.php:930     PluginFusioninventoryTask->prepareTaskjobs()
  plugins/fusioninventory/inc/taskview.class.php:445 PluginFusioninventoryTask->forceRunning()
  plugins/fusioninventory/front/task.form.php:52     PluginFusioninventoryTaskView->submitForm()

in the log file /var/www/html/glpi/files/_log/pluginFusioninventory-jobs.log I find this info:

2021-10-23 14:46:02 [@demo.demo.int]
Preparing tasks jobs, task id:
2021-10-23 14:47:01 [@demo.demo.int]
Preparing tasks jobs, task id:
2021-10-23 14:48:01 [@demo.demo.int]
Preparing tasks jobs, task id:
2021-10-23 14:49:02 [@demo.demo.int]
Preparing tasks jobs, task id:


in crontab -e there is this info

* * * * * /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null
0 */1 * * * cd /var/www/html/glpi/scripts && php -q -f ldap_mass_sync.php -- action=1 server_id=1
0 */1 * * * cd /var/www/html/glpi/scripts && php -q -f ldap_mass_sync.php -- action=0 server_id=1

assignment of permissions to the website

chmod -R 755 / var / www / html / glpi && chown -R apache: apache / var / www / html / glpi
chcon -R -t httpd_sys_rw_content_t / var / www / html / glpi /
setsebool -P httpd_can_network_connect 1
setsebool -P httpd_can_network_connect_db 1
setsebool -P httpd_can_sendmail 1

Offline

#15 2021-10-24 14:51:08

macarleo
Member
Registered: 2021-10-09
Posts: 10

Re: Fusioninventory agent [http client] communication error: 404 Not Found

small update, since I applied the permissions commands:
chmod -R 755 / var / www / html / glpi && chown -R apache: apache / var / www / html / glpi
chcon -R -t httpd_sys_rw_content_t / var / www / html / glpi /

I have no more errors in the log described above.

however the task / job on ESX is not working is in the prepared state but is not being executed.

as an anomaly I keep seeing in the log file /var/log/fusioninventory.log

the following error:
[Oct 24 10:59:11 2021] [info] ESX running task
[Oct 24 10:59:11 2021] [error] [http client] communication error: 404 Not Found

I don't know how to fix it ...

Greetings
macarleo

Offline

#16 2021-10-24 21:41:54

macarleo
Member
Registered: 2021-10-09
Posts: 10

Re: Fusioninventory agent [http client] communication error: 404 Not Found

I worked all weekend for a simple problem.
but in the end I succeeded.

the log [error] [http client] communication error: 404 Not Found refers to software calls when trying to inventory the vmware task.

actually to understand this I switched to version 2.6 of the fusioninventory agent using the following documentation hxxp://fusioninventory.org/documentation/agent/installation/linux/rhel.html
the new fusioninventory agent returns additional info in the log as calls of this type: hxxp: //demo.demo.int/plugins/fusioninventory/? action = getConfig & task [ESX] = 2.6 & machineid = demo.demo.int-2021-10 -04-10-22-54

I tried to make calls to this url but it returned error 400

finally I discovered that it was related to an incorrect configuration in the Administration -> Entities -> NameEntities -> FusionInventory -> Service Url section

by defaul it proposed me a value that I have not changed for example hxxp: //demo.demo.int/glpi/ajax/marketplace.php

I changed the url to hxxp: //demo.demo.int/glpi.
Finally I removed all the tasks, removed the agent from agent management on fusion inventory, removed asset computer, restarted the fusion inventory agent and rescheduled the tasks. after re-running the inventory the job was completed successfully ...


now I have a doubt that the fact that I have applied the following permissions is correct?
chmod -R 755 / var / www / html / glpi && chown -R apache: apache / var / www / html / glpi
chcon -R -t httpd_sys_rw_content_t / var / www / html / glpi /

good luck

Offline

#17 2023-05-30 12:16:24

B.Hind
Member
Registered: 2023-05-19
Posts: 1

Re: Fusioninventory agent [http client] communication error: 404 Not Found

ViktorG wrote:

solved it like this:
add in host file string
192.168.30.129 glpi."domain name"



Where did you add this line exacly please,
I have the same issue.

Offline

#18 2024-01-31 19:53:58

emrd
Member
Registered: 2024-01-31
Posts: 2

Re: Fusioninventory agent [http client] communication error: 404 Not Found

glpi.your.server/marketplace/fusioninventory/

Found it wasn't installed in plugins through a locate command.

Offline

Board footer

Powered by FluxBB