Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCS agent can't contact server through proxy - 501 Protocol scheme 'connect' is not supported #459

Open
mcondamin opened this issue Feb 27, 2024 · 1 comment

Comments

@mcondamin
Copy link

mcondamin commented Feb 27, 2024

General informations

Operating system : Debian 12
Perl version : 5.36

OCS Inventory informations

Unix agent version : 2.10.0-3

Problem's description

Hi,
I'm having a problem connecting and sending data from clients to the OCS server when the agent is located behind an http proxy.
If the agent contacts the server directly without going through the proxy, the connection works fine.

Here is the agent configuration :

server=https://inventory.xxxx.com/ocsinventory
ca=/etc/ocsinventory/cacert.pem
ssl=1
proxy=192.168.174.130:8888

Connection from client using openssl command works fine
openssl s_client -proxy 192.168.174.130:8888 -showcerts -connect inventory.xxxxx.com:443

FYI, liblwp-protocol-https-perl package is already installed

Thank your for you help !

Inventory log file ( optional )

[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.10.0
[debug] Log system initialised (Stderr)
[debug] --scan-homedirs missing. Don't scan user directories
[debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__inventory.xxxxx.com_ocsinventory/ocsinv.adm
[debug] OCS Agent initialised
[debug] Turns hooks on for /etc/ocsinventory/modules.conf
[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.10.0
[debug] Log system initialised (Stderr)
[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.10.0
[debug] Log system initialised (Stderr)
[debug] Calling handlers : `start_handler'
[debug] [snmpscan] Calling snmp_start_handler
[debug]  - Net::SNMP loaded
[debug] [download] Calling download_start_handler
[debug]  - LWP loaded
[debug]  - LWP::Protocol::https loaded
[debug] Compress::Zlib is available.
[debug] Calling handlers : `prolog_writer'
[debug] checking XML
[debug] sending XML
[debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>pg-barman-2024-02-27-13-23-40</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[error] Cannot establish communication : 501 Protocol scheme 'connect' is not supported
@fbomj
Copy link
Contributor

fbomj commented Jul 10, 2024

Hi,

Did you installed LWP::Protocol::connect library ?

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants