HTTPS does not work through proxy

Bug #971983 reported by Luiz Angelo Daros de Luca
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
In Progress
Medium
mortheres

Bug Description

Hello,

When https_proxy is defined, ocsinventory-agent in unix always uses the proxy. However, it always fails with 400 error.

[Mon Apr 2 20:03:23 2012][info] Accountinfo file doesn't exist. I create an empty one.
[Mon Apr 2 20:03:23 2012][info] Going to sleep for 68 second(s)
[Mon Apr 2 20:03:35 2012] Running ocsinventory-agent --wait 1
[Mon Apr 2 20:03:35 2012][info] Going to sleep for 0 second(s)
[Mon Apr 2 20:03:35 2012][error] Cannot establish communication : 400 Bad Request
[Mon Apr 2 20:03:35 2012] End of cron job (/sbin:/bin:/usr/sbin:/usr/bin)

My proxy is a common squid and HTTPS works for other cases. My workarround is to undefine https_proxy in sysconfig, which is not a very good solution (but it works).

If this is not reproducible by developers, what information could I provide that helps to fix this problem?

Thanks,

Revision history for this message
Luiz Angelo Daros de Luca (luizluca) wrote :

PS: I'm using ver 2.0.4 in OpenSUSE12.1 x86_64

mortheres (mortheres)
affects: ocsinventory-deploy-tool → ocsinventory-unix-agent
Changed in ocsinventory-unix-agent:
assignee: nobody → mortheres (mortheres)
importance: Undecided → Medium
Revision history for this message
Frank (frank-bourdeau) wrote : Re: [Bug 971983] Re: HTTPS does not work through proxy

Re

Je te propose d'essayer de résoudre ce bug. Le souci sera de pouvoir
vérifier que cela fonctionne. Je n'ai pas de proxy à la maison, encore
moins un proxy via https
Je te soumettrai bien sûr "ma rustine" pour validation.

Je pense que tu vas être content :D

Frank

Le 03.04.2012 22:42, mortheres a écrit :
> ** Project changed: ocsinventory-deploy-tool =>
> ocsinventory-unix-agent
>
> ** Changed in: ocsinventory-unix-agent
> Assignee: (unassigned) => mortheres (mortheres)
>
> ** Changed in: ocsinventory-unix-agent
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are a member of OCS
> Inventory Dev Team, which is the registrant for OCS Inventory: OCS
> Unified Unix Agent.
> https://bugs.launchpad.net/bugs/971983
>
> Title:
> HTTPS does not work through proxy
>
> Status in OCS Unified Unix Agent:
> New
>
> Bug description:
> Hello,
>
> When https_proxy is defined, ocsinventory-agent in unix always uses
> the proxy. However, it always fails with 400 error.
>
> [Mon Apr 2 20:03:23 2012][info] Accountinfo file doesn't exist. I
> create an empty one.
> [Mon Apr 2 20:03:23 2012][info] Going to sleep for 68 second(s)
> [Mon Apr 2 20:03:35 2012] Running ocsinventory-agent --wait 1
> [Mon Apr 2 20:03:35 2012][info] Going to sleep for 0 second(s)
> [Mon Apr 2 20:03:35 2012][error] Cannot establish communication :
> 400 Bad Request
> [Mon Apr 2 20:03:35 2012] End of cron job
> (/sbin:/bin:/usr/sbin:/usr/bin)
>
> My proxy is a common squid and HTTPS works for other cases. My
> workarround is to undefine https_proxy in sysconfig, which is not a
> very good solution (but it works).
>
> If this is not reproducible by developers, what information could I
> provide that helps to fix this problem?
>
> Thanks,
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ocsinventory-unix-agent/+bug/971983/+subscriptions

Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: New → In Progress
Revision history for this message
Frank (frank-bourdeau) wrote :

Hi Luizluca

Can you test the latest trunk version of the agent, please and let me know if it goes correctly for you?
Thanks in advance.

Frank

Revision history for this message
Luiz Angelo Daros de Luca (luizluca) wrote :

Hello Frank,

I was only able to test with agent 2.0.5 (server 2.0.4). In this case, the problem still exists.

# PERL_LWP_SSL_CA_FILE=/var/lib/ocsinventory-agent/cacert.pem ocsinventory-agent --force --debug --server=https://ocs/ocsinventory --logfile=-
...
...
  <QUERY>INVENTORY</QUERY>
</REQUEST>
[Wed Sep 12 15:53:10 2012][error] Cannot establish communication : 400 Bad Request

I'm having some problem to checkout the trunk. I use opensuse and bazaar seems to be outdated, even with the brand-new opensuse 12.2 release.

# bzr checkout lp:~ocsinventory-dev/ocsinventory-unix-agent/trunk
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
bzr: ERROR: Unknown branch format: 'Bazaar-NG Loom branch format 6\n'

I found no alternative way to get a trunk snapshot.

Would I need to test both the server and the agent or the fix is only in the agent code? Would the agent trunk be compatible with server 2.0.4?

Revision history for this message
Riccardo Capecchi (riccio-cri) wrote :

Hello all,

I'd like to add our experiece to this bug.

Software used:

ocsinventory server 2.0.5 on Centos 5
ocsinventory agent 2.0.5 on Debian 6

Our remotemachine.com (debian 6) don't goes on the web directly so it uses our http://proxy.com:8080 to send its inventory to our server: https://ourocsserver.com/ocsinventory

Using the proxy option in ocsinventory-agent doesn't work, the server is not able to reach our ocs server.

To make it works we have set the Environment variable HTTPS_PROXY=proxy.com:8080
And commented the row 47 in the file lib/Ocsinventory/Agent/Network.pm.

With these 2 changes the server correctly contact our https address via proxy http.

Issue on LWP that could affect this: https://groups.google.com/forum/?hl=fi&fromgroups=#!topic/perl.libwww/Cu4OBrFAQ4c

Just as information

Using the proxy on a windows machien don't give any problem.

Best regards

Riccardo

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.