glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
252 stars 61 forks source link

Proxy must be specified as absolute URI when there is no proxy defined #755

Closed krenaudUR closed 2 months ago

krenaudUR commented 2 months ago

Bug reporting acknowledgment

Yes, I read it

Professional support

Yes, I know

Describe the bug

Hi, This is the first time I see that but a computer try to use a proxy to send inventory, but I don't know where it finds it, because there is no need for proxy for this computer. In the registry, the "proxy" line is empty. I already tried to uninstall the agent with deleting the folder left in program file. And after I install it in 1.10. But it's still telling me in the log : Proxy must be specified as absolute URI; '**:3128' is not at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 81 thread 1.

I don't know where it's finding this proxy. I believe there is something that tell glpi-agent that there is a proxy, but I don't know where.

(I attach the glpi-agent.log of this computer) glpi-agent.log

To reproduce

Hard to reproduce as It's only happened once on 900 computers. The only thing I know that's the inventory was blocked on version 1.4.0, but the agent did upgrade to 1.9.0, but it didn't solve the problem. Now it's on 1.10, but I uninstalled glpi-agent before, so it's not an upgrade.

Expected behavior

That it's send the inventory well, without the proxy because I didn't specify a proxy.

Operating system

Windows

GLPI Agent version

v1.10

GLPI version

10.0.16

GLPIInventory plugin or other plugin version

GLPI Inventory v1.x.x (See additional context below)

Additional context

GLPI Inventory Plugin 1.4.0

g-bougard commented 2 months ago

Hi @krenaudUR

this error comes from the api which validate environment variables for proxy related ones. So you probably have a system or user environment variable set like HTTP_PROXY and eventually check any which looks like *_PROXY.

krenaudUR commented 2 months ago

Hi @krenaudUR

this error comes from the api which validate environment variables for proxy related ones. So you probably have a system or user environment variable set like HTTP_PROXY and eventually check any which looks like *_PROXY.

Hi, @g-bougard

There was indeed a proxy set in the system variable of the computer. I deleted them. I will need to wait now because I can't restart the PC. Or it doesn't need a computer restart ? Because I still have the problem.

g-bougard commented 2 months ago

Did you simply try to restart the service ?

krenaudUR commented 2 months ago

Did you simply try to restart the service ?

Yes, just after I deleted the variable. But maybe it's need to be uninstall and install again ?

g-bougard commented 2 months ago

I don't think this is sufficient.

So you'll probably have to wait for a reboot.

krenaudUR commented 2 months ago

I don't think this is sufficient.

So you'll probably have to wait for a reboot.

After computer restart, the inventory is working again. Thanks