Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1368236

Summary: Insights client does not respect NO_PROXY environment variable.
Product: Red Hat Enterprise Linux 6 Reporter: Lindani Phiri <lphiri>
Component: redhat-access-insightsAssignee: Richard Brantley <rbrantle>
Status: CLOSED ERRATA QA Contact: Jan Houska <jhouska>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.9CC: bnater, chenders, jhouska, lphiri, rbrantle
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: redhat-access-insights-1.0.13-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1368237 (view as bug list) Environment:
Last Closed: 2017-03-21 12:01:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1269194, 1353701, 1368237    

Description Lindani Phiri 2016-08-18 18:42:12 UTC
Description of problem:

When both the HTTP(S)_PROXY  and NO_PROXY environment variables are set,
the Insights client attempts to connect via the http proxy, even when the Insights destination url is in the NO_PROXY list.

Please see linked customer case for concrete scenario/example.


Version-Release number of selected component (if applicable):
1.0.11 or earlier

How reproducible:
Always


Steps to Reproduce:
1. Configure HTTPS_PROXY and NON_PROXY environment variables in a shell adding "cert-api.access.redhat.com" to the no proxy list
2. Attempt insights client registration
3. Monitor proxy server logs

Actual results:

Insights client connects to "cert-api.access.redhat.com" via the proxy set in HTTPS_PROXY variable

Expected results:

Insights client connects directly to "cert-api.access.redhat.com", without connecting proxy.

Comment 5 Lindani Phiri 2016-11-09 15:16:54 UTC
Build in brew:

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=521363

Comment 7 Jan Houska 2016-12-12 12:42:29 UTC
Hello,

It seems that bug is not repaired in current version:

version
# rpm -qa redhat-access*
redhat-access-insights-1.0.12-0.el6.noarch

Setup:
yum install squid -y
yum install redhat-access-insights -y
service squid start

Trial to reproduce bug:
## Trying to run it with NO_PROXY
# HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="https://cert-api.access.redhat.com:443"  redhat-access-insights --force-reregister
#  tail -1 /var/log/squid/access.log 
>>
1481545210.064    143 127.0.0.1 TCP_MISS/200 4926 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -

## Trying to run it without NO_PROXY
#  HTTPS_PROXY="http://127.0.0.1:3128"  redhat-access-insights --force-reregister
# tail -1 /var/log/squid/access.log 
>>
1481545335.073    145 127.0.0.1 TCP_MISS/200 4926 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -


I am expecting something like:
# tail -1 /var/log/squid/access.log 
>>
1481545335.073    145 127.0.0.1 TCP_MISS/200 4926 CONNECT cert-api.access.redhat.com:80 - DIRECT/23.4.189.16 -

but maybe I am wrong with my reproducer... 


Please let me know thak you. Yours        Jan Houška
Lindani Phiri <lphiri>
Richard Brantley <rbrantle>

Comment 8 Jan Houska 2016-12-12 12:45:12 UTC
Hello
Please see  "comment 7" (https://bugzilla.redhat.com/show_bug.cgi?id=1368236#c7).

Comment 9 Richard Brantley 2016-12-12 16:46:57 UTC
Can you try NO_PROXY with only the domain name, and domain name + port? I do not think it adheres to protocols.

NO_PROXY="cert-api.access.redhat.com"
NO_PROXY="cert-api.access.redhat.com:443"

Thanks!

Comment 10 Jan Houska 2016-12-13 13:37:16 UTC
I tried and nothing changed 
a) NO_PROXY="https://cert-api.access.redhat.com"

version: rpm -qa redhat-access-i*
redhat-access-insights-1.0.12-0.el6.noarch



yum install squid -y
yum install redhat-access-insights -y
service squid start
HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="https://cert-api.access.redhat.com" redhat-access-insights --register
>> ERROR: Could not determine branch information, exiting!
ERROR: Could not determine branch information, exiting!
See /var/log/redhat-access-insights/redhat-access-insights.log for more information
See /var/log/redhat-access-insights/redhat-access-insights.log for more information
Could not register system, running configuration test
Could not register system, running configuration test
Connection test config:
Proxy config: {'https': 'http://127.0.0.1:3128'}
Certificate Verification: /etc/redhat-access-insights/cert-api.access.redhat.com.pem
=== Begin Certificate Chain Test ===
depth=1
verify error:num=0
verify return:1
depth=0
verify error:num=0
verify return:1
---
Certificate chain
0 s :/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
1 s :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFfTCCA2WgAwIBAgIJAJGKz8qFAAADMA0GCSqGSIb3DQEBBQUAMIGwMQswCQYD
...
-----END CERTIFICATE-----

subject=/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
issuer=/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
=== End Certificate Chain Test: SUCCESS ===

=== Begin Upload URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/uploads/
HTTP Status Code: 401
HTTP Status Text: Unauthorized
Connection failed
=== End Upload URL Connection Test: FAILURE ===

=== Begin API URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/
HTTP Status Code: 200
HTTP Status Text: OK
Successfully connected to: https://cert-api.access.redhat.com/r/insights/
=== End API URL Connection Test: SUCCESS ===


Connectivity tests completed with some errors

cat /var/log/squid/access.log
>> 1481621080.516    289 127.0.0.1 TCP_MISS/200 4926 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1481621080.718     56 127.0.0.1 TCP_MISS/200 4526 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1481621080.805    285 127.0.0.1 TCP_MISS/200 5326 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1481621081.055    249 127.0.0.1 TCP_MISS/200 4739 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -

b) NO_PROXY="cert-api.access.redhat.com"
/*new machine*/

version: rpm -qa redhat-access-i*
redhat-access-insights-1.0.12-0.el6.noarch



yum install squid -y
yum install redhat-access-insights -y
service squid start

HTTPS_PROXY="https://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights           
This machine has not yet been registered.
This machine has not yet been registered.
Use --register to register this machine.
Use --register to register this machine.
Exiting
Exiting
[0 root@qeos-133 ~]# cat /var/log/squid/access.log                                           [0 root@qeos-133 ~]# HTTPS_PROXY="https://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --register
ERROR: Could not determine branch information, exiting!
ERROR: Could not determine branch information, exiting!
See /var/log/redhat-access-insights/redhat-access-insights.log for more information
See /var/log/redhat-access-insights/redhat-access-insights.log for more information
Could not register system, running configuration test
Could not register system, running configuration test
Connection test config:
Proxy config: {'https': 'https://127.0.0.1:3128'}
Certificate Verification: /etc/redhat-access-insights/cert-api.access.redhat.com.pem
=== Begin Certificate Chain Test ===
depth=1
verify error:num=0
verify return:1
depth=0
verify error:num=0
verify return:1
---
Certificate chain
0 s :/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
1 s :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFfTCCA2WgAwIBAgIJAJGKz8qFAAADMA0GCSqGSIb3DQEBBQUAMIGwMQswCQYD
...
-----END CERTIFICATE-----

subject=/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
issuer=/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
=== End Certificate Chain Test: SUCCESS ===

=== Begin Upload URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/uploads/
HTTP Status Code: 401
HTTP Status Text: Unauthorized
Connection failed
=== End Upload URL Connection Test: FAILURE ===

=== Begin API URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/
HTTP Status Code: 200
HTTP Status Text: OK
Successfully connected to: https://cert-api.access.redhat.com/r/insights/
=== End API URL Connection Test: SUCCESS ===


Connectivity tests completed with some errors
[0 root@qeos-133 ~]# cat /var/log/squid/access.log1481622437.795    159 127.0.0.1 TCP_MISS/200 4926 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1481622438.030     67 127.0.0.1 TCP_MISS/200 4526 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1481622438.121    323 127.0.0.1 TCP_MISS/200 5326 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1481622438.310    187 127.0.0.1 TCP_MISS/200 4739 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -

Comment 11 Jan Houska 2017-01-09 09:01:54 UTC
Verified:

New Pass:
redhat-access-insights-1.0.13-2.el6.noarch

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Registering into Redhat Access Insights Service. :: actually running 'redhat-access-insights --register | tee output.log'
Could not auto configure, falling back to static config
See /var/log/redhat-access-insights/redhat-access-insights.log for additional information
ERROR: Could not determine branch information, exiting!
See /var/log/redhat-access-insights/redhat-access-insights.log for more information
Could not register system, running configuration test
ERROR: Could not determine branch information, exiting!
See /var/log/redhat-access-insights/redhat-access-insights.log for more information
Could not register system, running configuration test
Connection test config:
Proxy config: None
Certificate Verification: /etc/redhat-access-insights/cert-api.access.redhat.com.pem
=== Begin Certificate Chain Test ===
depth=1
verify error:num=0
verify return:1
depth=0
verify error:num=0
verify return:1
---
Certificate chain
0 s :/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
1 s :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFfTCCA2WgAwIBAgIJAJGKz8qFAAADMA0GCSqGSIb3DQEBBQUAMIGwMQswCQYD
...
JS6OHVlTlKcEDnhVkPS3i5qjuS/PtSq0CwH8bzYKFJayLDY/z36Zv6PdttzmU
Yb1NSDcJejHJ80pMINutyYQ=
-----END CERTIFICATE-----

subject=/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
issuer=/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
=== End Certificate Chain Test: SUCCESS ===

=== Begin Upload URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/uploads/
HTTP Status Code: 401
HTTP Status Text: Unauthorized
Connection failed
=== End Upload URL Connection Test: FAILURE ===

=== Begin API URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/
HTTP Status Code: 200
HTTP Status Text: OK
Successfully connected to: https://cert-api.access.redhat.com/r/insights/
=== End API URL Connection Test: SUCCESS ===


Connectivity tests completed with some errors
:: [   PASS   ] :: Registering into Redhat Access Insights Service. (Expected 1, got 1)
:: [   PASS   ] :: File 'output.log' should contain 'Connectivity tests completed with some errors' 
:: [  BEGIN   ] :: Asking for Redhat Access Insights Service status :: actually running 'redhat-access-insights --status | tee output2.log'
Could not auto configure, falling back to static config
See /var/log/redhat-access-insights/redhat-access-insights.log for additional information
System is NOT registered. Unregistered at 2017-01-06T13:28:17.443418
Insights API says this machine is NOT registered.
:: [   PASS   ] :: Asking for Redhat Access Insights Service status (Expected 1, got 1)
:: [   PASS   ] :: File 'output2.log' should contain 'System is NOT registered.' 
:: [   PASS   ] :: File 'output2.log' should not contain 'System is registered. Registered at' 
'f096c530-2ed2-42aa-b67a-42c1e6fb0b93'
Test result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49796038/journal.txt
    Info: Searching AVC errors produced since 1483727356.38 (Fri Jan  6 13:29:16 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.eu9iFm
:
   AvcLog: /mnt/testarea/tmp.eu9iFm

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Old fail:
redhat-access-insights-1.0.8-13.el6.noarch

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Registering into Redhat Access Insights Service. :: actually running 'redhat-access-insights --register | tee output.log'
Could not auto configure, falling back to static config
See /var/log/redhat-access-insights/redhat-access-insights.log for additional information
ERROR: Could not determine branch information, exiting!
See /var/log/redhat-access-insights/redhat-access-insights.log for more information
Could not register system, running configuration test
Connection test config:
Proxy config: None
Certificate Verification: /etc/redhat-access-insights/cert-api.access.redhat.com.pem
=== Begin Certificate Chain Test ===
depth=1
verify error:num=0
verify return:1
depth=0
verify error:num=0
verify return:1
---
Certificate chain
0 s :/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
1 s :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
  i :/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFfTCCA2WgAwIBAgIJAJGKz8qFAAADMA0GCSqGSIb3DQEBBQUAMIGwMQswCQYD
...
qvqJS6OHVlTlKcEDnhVkPS3i5qjuS/PtSq0CwH8bzYKFJayLDY/z36Zv6PdttzmU
Yb1NSDcJejHJ80pMINutyYQ=
-----END CERTIFICATE-----

subject=/C=US/ST=NORTH CAROLINA/L=Raleigh/O=Red Hat/OU=Red Hat Network/CN=cert-api.access.redhat.com
issuer=/C=US/ST=North Carolina/L=Raleigh/O=Red Hat, Inc./OU=Red Hat Network/CN=Entitlement Master CA/emailAddress=ca-support
---
=== End Certificate Chain Test: SUCCESS ===

=== Begin Upload URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/uploads/
HTTP Status Code: 401
HTTP Status Text: Unauthorized
Connection failed
=== End Upload URL Connection Test: FAILURE ===

=== Begin API URL Connection Test ===
Testing: https://cert-api.access.redhat.com/r/insights/
HTTP Status Code: 200
HTTP Status Text: OK
Successfully connected to: https://cert-api.access.redhat.com/r/insights/
=== End API URL Connection Test: SUCCESS ===


Connectivity tests completed with some errors
:: [   PASS   ] :: Registering into Redhat Access Insights Service. (Expected 1, got 1)
:: [   PASS   ] :: File 'output.log' should contain 'Connectivity tests completed with some errors' 
:: [  BEGIN   ] :: Asking for Redhat Access Insights Service status :: actually running 'redhat-access-insights --status | tee output2.log'
Could not auto configure, falling back to static config
See /var/log/redhat-access-insights/redhat-access-insights.log for additional information
System is registered. Registered at 2017-01-06T13:28:11.963643
Insights API says this machine is NOT registered.
:: [   PASS   ] :: Asking for Redhat Access Insights Service status (Expected 1, got 1)
:: [   FAIL   ] :: File 'output2.log' should contain 'System is NOT registered.' 
:: [   FAIL   ] :: File 'output2.log' should not contain 'System is registered. Registered at' 
'00347c51-d824-450a-a983-b60fe215b01d'
Test result: FAIL
   metric: 2
   Log: /var/tmp/beakerlib-49796036/journal.txt
    Info: Searching AVC errors produced since 1483727290.06 (Fri Jan  6 13:28:10 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.anl86Y
:
   AvcLog: /mnt/testarea/tmp.anl86Y

:::::::::::::::::::::::::::::::::::::::::::

Comment 12 Jan Houska 2017-01-09 09:06:37 UTC
Wrong Test posted!   I made a mistake.  The output is not relevant into bz1368236.

(In reply to Jan Houska from comment #11)
> Verified:
> 
> New Pass:
> redhat-access-insights-1.0.13-2.el6.noarch
> 
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> :::
> :: [   LOG    ] :: Test
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
...
> :: [   FAIL   ] :: File 'output2.log' should not contain 'System is
> registered. Registered at' 
> '00347c51-d824-450a-a983-b60fe215b01d'
> Test result: FAIL
>    metric: 2
>    Log: /var/tmp/beakerlib-49796036/journal.txt
>     Info: Searching AVC errors produced since 1483727290.06 (Fri Jan  6
> 13:28:10 2017)
>      Searching logs...
>      Info: No AVC messages found.
>  Writing to /mnt/testarea/tmp.anl86Y
> :
>    AvcLog: /mnt/testarea/tmp.anl86Y
> 
> :::::::::::::::::::::::::::::::::::::::::::

Comment 13 Jan Houska 2017-01-09 14:33:54 UTC
Verified:

Old FAIL:
redhat-access-insights-1.0.8-13.el6.noarch
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 1st Test NO_PROXY value set:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose  > registration-1st.log'
:: [   PASS   ] :: Command 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose  > registration-1st.log' (Expected 0, got 0)
:: [   FAIL   ] :: Number of connections to cert-api.access.redhat.com is unchanged after connection (Assert: '1' should equal '0')
****************************
Content of the log file (/var/log/squid/access.log): 
*************************
1483955473.430    361 127.0.0.1 TCP_MISS/200 1978 CONNECT xmlrpc.rhn.redhat.com:443 - DIRECT/10.4.127.44 -
1483955473.808    298 127.0.0.1 TCP_MISS/200 4889 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
****************************
:: [   FAIL   ] :: File 'registration-1st.log' should contain 'Found NO_PROXY set. Checking NO_PROXY cert-api.access.redhat.com against base URL' 
****************************
Content of the log file (registration-1st.log): 
*************************
Logging initialized
invoked with args: {'status': False, 'reregister': True, 'conf': '/etc/redhat-access-insights/redhat-access-insights.conf', 'from_stdin': False, 'no_gpg': False, 'verbose': True, 'display_name': None, 'silent': False, 'support': False, 'version': False, 'no_tar_file': False, 'offline': False, 'test_connection': False, 'keep_archive': False, 'update': False, 'to_stdout': False, 'compressor': 'gz', 'no_upload': False, 'group': None, 'validate': False, 'from_file': False, 'retries': 1, 'unregister': False, 'register': False, 'quiet': False, 'no_schedule': False}
Version: 1.0.8
Could not find machine-id file, creating
Creating /etc/redhat-access-insights/machine-id
Machine-ID: db0d4c38-3cae-492c-a1f0-468615e7da2b
username:
collection_rules_url:None
gpg:True
app_name:redhat-access-insights
trace:False
loglevel:DEBUG
auto_config:True
insecure_connection:False
authmethod:BASIC
base_url:cert-api.access.redhat.com/r/insights
auto_update:True
branch_info_url:None
obfuscate:False
systemid:None
cert_verify:/etc/redhat-access-insights/cert-api.access.redhat.com.pem
obfuscate_hostname:False
no_schedule:False
upload_url:None
api_url:None
Trying to auto-configure Satellite 6...
[Errno 2] No such file or directory: '/etc/pki/consumer/cert.pem'
System is not registered to Satellite 6
Trying to auto-configure Satellite 5...
Found Satellite 5 config
Found hostname xmlrpc.rhn.redhat.com/redhat_access
System is registered to Satellite 5.
Attempting to auto configure!
Attempting to auto configure hostname: xmlrpc.rhn.redhat.com/redhat_access
Attempting to auto configure CA cert: /usr/share/rhn/RHNS-CA-CERT
Attempting to auto configure proxy: None
Verifying Connectivity
username:
collection_rules_url:None
gpg:True
app_name:redhat-access-insights
trace:False
loglevel:DEBUG
auto_config:True
insecure_connection:False
authmethod:BASIC
base_url:xmlrpc.rhn.redhat.com/redhat_access/r/insights
auto_update:True
branch_info_url:None
obfuscate:False
cert_verify:/usr/share/rhn/RHNS-CA-CERT
obfuscate_hostname:False
no_schedule:False
upload_url:None
api_url:None
ENV Proxy: http://127.0.0.1:3128
hostname: xmlrpc.rhn.redhat.com ip: 10.4.127.44
Proxy hostname: 127.0.0.1:3128 ip: 127.0.0.1
Obtaining branch information from https://xmlrpc.rhn.redhat.com/redhat_access/r/insights/v1/branch_info
GET branch_info status: 404

Failed to parse response from Satellite 5
Could not auto configure, falling back to static config
See /var/log/redhat-access-insights/redhat-access-insights.log for additional information
This host has already been registered.
Setting schedule to daily
Could not remove cron.weekly
Automatic daily scheduling for Insights has been enabled.
ENV Proxy: http://127.0.0.1:3128
hostname: cert-api.access.redhat.com ip: 23.4.189.16
Proxy hostname: 127.0.0.1:3128 ip: 127.0.0.1
Obtaining branch information from https://cert-api.access.redhat.com/r/insights/v1/branch_info
GET branch_info status: 401
Branch information: {"message": "Unauthorized: null user"}
ERROR: Could not determine branch information
****************************
'e8fe1bc8-8200-4d41-a800-e4b715247a33'
1st-Test-NO-PROXY-value-set- result: FAIL
   metric: 2
   Log: /var/tmp/beakerlib-49840120/journal.txt
    Info: Searching AVC errors produced since 1483955472.25 (Mon Jan  9 04:51:12 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.RPYDLa
:
   AvcLog: /mnt/testarea/tmp.RPYDLa

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 2nd Test without NO_PROXY value:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'HTTPS_PROXY="http://127.0.0.1:3128" redhat-access-insights --force-reregister --verbose  > registration-2nd.log'
:: [   PASS   ] :: Command 'HTTPS_PROXY="http://127.0.0.1:3128" redhat-access-insights --force-reregister --verbose  > registration-2nd.log' (Expected 0, got 0)
:: [   PASS   ] :: Squid log should contain one access to cert-api.access.redhat.com more (Assert: '1' should equal '1')
:: [   PASS   ] :: File '/var/log/squid/access.log' should contain 'cert-api.access.redhat.com:443' 
:: [   PASS   ] :: File 'registration-2nd.log' should not contain 'Found NO_PROXY set. Checking NO_PROXY cert-api.access.redhat.com  against base URL' 
'75dc389d-6abb-49b6-9b3f-6c9be3dd0e75'
2nd-Test-without-NO-PROXY-value- result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49840120/journal.txt
    Info: Searching AVC errors produced since 1483955476.2 (Mon Jan  9 04:51:16 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.RPYDLa
:
   AvcLog: /mnt/testarea/tmp.RPYDLa

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 3rdTest NO_PROXY value set:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose > registration-3rd.log'
:: [   PASS   ] :: Command 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose > registration-3rd.log' (Expected 0, got 0)
:: [   FAIL   ] :: Number of connections to cert-api.access.redhat.com is unchanged after connection (Assert: '3' should equal '2')
****************************
Content of the log file (/var/log/squid/access.log): 
*************************
1483955473.430    361 127.0.0.1 TCP_MISS/200 1978 CONNECT xmlrpc.rhn.redhat.com:443 - DIRECT/10.4.127.44 -
1483955473.808    298 127.0.0.1 TCP_MISS/200 4889 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1483955477.164    361 127.0.0.1 TCP_MISS/200 1978 CONNECT xmlrpc.rhn.redhat.com:443 - DIRECT/10.4.127.44 -
1483955477.417    246 127.0.0.1 TCP_MISS/200 4889 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
1483955480.998    361 127.0.0.1 TCP_MISS/200 1978 CONNECT xmlrpc.rhn.redhat.com:443 - DIRECT/10.4.127.44 -
1483955481.258    253 127.0.0.1 TCP_MISS/200 4889 CONNECT cert-api.access.redhat.com:443 - DIRECT/23.4.189.16 -
****************************
:: [   FAIL   ] :: File 'registration-3rd.log' should contain 'Found NO_PROXY set. Checking NO_PROXY cert-api.access.redhat.com against base URL' 
****************************
Content of the log file (registration-3rd.log): 
*************************
Logging initialized
invoked with args: {'status': False, 'reregister': True, 'conf': '/etc/redhat-access-insights/redhat-access-insights.conf', 'from_stdin': False, 'no_gpg': False, 'verbose': True, 'display_name': None, 'silent': False, 'support': False, 'version': False, 'no_tar_file': False, 'offline': False, 'test_connection': False, 'keep_archive': False, 'update': False, 'to_stdout': False, 'compressor': 'gz', 'no_upload': False, 'group': None, 'validate': False, 'from_file': False, 'retries': 1, 'unregister': False, 'register': False, 'quiet': False, 'no_schedule': False}
Version: 1.0.8
Could not find machine-id file, creating
Creating /etc/redhat-access-insights/machine-id
Machine-ID: 402f6393-46f3-4227-a68f-1a6d09b4d234
username:
collection_rules_url:None
gpg:True
app_name:redhat-access-insights
trace:False
loglevel:DEBUG
auto_config:True
insecure_connection:False
authmethod:BASIC
base_url:cert-api.access.redhat.com/r/insights
auto_update:True
branch_info_url:None
obfuscate:False
systemid:None
cert_verify:/etc/redhat-access-insights/cert-api.access.redhat.com.pem
obfuscate_hostname:False
no_schedule:False
upload_url:None
api_url:None
Trying to auto-configure Satellite 6...
[Errno 2] No such file or directory: '/etc/pki/consumer/cert.pem'
System is not registered to Satellite 6
Trying to auto-configure Satellite 5...
Found Satellite 5 config
Found hostname xmlrpc.rhn.redhat.com/redhat_access
System is registered to Satellite 5.
Attempting to auto configure!
Attempting to auto configure hostname: xmlrpc.rhn.redhat.com/redhat_access
Attempting to auto configure CA cert: /usr/share/rhn/RHNS-CA-CERT
Attempting to auto configure proxy: None
Verifying Connectivity
username:
collection_rules_url:None
gpg:True
app_name:redhat-access-insights
trace:False
loglevel:DEBUG
auto_config:True
insecure_connection:False
authmethod:BASIC
base_url:xmlrpc.rhn.redhat.com/redhat_access/r/insights
auto_update:True
branch_info_url:None
obfuscate:False
cert_verify:/usr/share/rhn/RHNS-CA-CERT
obfuscate_hostname:False
no_schedule:False
upload_url:None
api_url:None
ENV Proxy: http://127.0.0.1:3128
hostname: xmlrpc.rhn.redhat.com ip: 10.4.127.44
Proxy hostname: 127.0.0.1:3128 ip: 127.0.0.1
Obtaining branch information from https://xmlrpc.rhn.redhat.com/redhat_access/r/insights/v1/branch_info
GET branch_info status: 404

Failed to parse response from Satellite 5
Could not auto configure, falling back to static config
See /var/log/redhat-access-insights/redhat-access-insights.log for additional information
This host has already been registered.
Found cron.daily
Automatic daily scheduling for Insights has been enabled.
ENV Proxy: http://127.0.0.1:3128
hostname: cert-api.access.redhat.com ip: 23.4.189.16
Proxy hostname: 127.0.0.1:3128 ip: 127.0.0.1
Obtaining branch information from https://cert-api.access.redhat.com/r/insights/v1/branch_info
GET branch_info status: 401
Branch information: {"message": "Unauthorized: null user"}
ERROR: Could not determine branch information
****************************
'f5b53d96-feb9-43d9-b0b0-e69c68a0534c'
3rdTest-NO-PROXY-value-set- result: FAIL
   metric: 2
   Log: /var/tmp/beakerlib-49840120/journal.txt
    Info: Searching AVC errors produced since 1483955480.01 (Mon Jan  9 04:51:20 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.RPYDLa
:
   AvcLog: /mnt/testarea/tmp.RPYDLa

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'squidStop'
squid (pid  21492) is running...
Stopping squid: ................[  OK  ]
:: [  BEGIN   ] :: Waiting for squid to stop listening on port 3128 :: actually running 'rlWatchdog 'while ss -tan | grep -q :3128; do sleep 1; done' 120'
:: [ 04:51:56 ] :: Runnning while ss -tan | grep -q :3128; do sleep 1; done, with 120 seconds timeout
:: [ 04:52:20 ] :: Command ended itself, I am not killing it.
/usr/share/beakerlib/testing.sh: line 851: 22214 Terminated              eval "sleep $timeout; touch __INTERNAL_TIMEOUT"
:: [   PASS   ] :: Waiting for squid to stop listening on port 3128 (Expected 0, got 0)
:: [   PASS   ] :: Command 'squidStop' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'popd'
/mnt/tests/CoreOS/redhat-access-insights/Regression/bz1368236-Insights-client-does-not-respect-NO-PROXY
:: [   PASS   ] :: Command 'popd' (Expected 0, got 0)
:: [  BEGIN   ] :: Removing tmp directory :: actually running 'rm -r /tmp/tmp.EaF6yDFiEl'
:: [   PASS   ] :: Removing tmp directory (Expected 0, got 0)
'a955d8ed-25fd-4809-9827-9d5e63e83491'
Cleanup result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49840120/journal.txt
    Info: Searching AVC errors produced since 1483955483.64 (Mon Jan  9 04:51:23 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.RPYDLa
:
   AvcLog: /mnt/testarea/tmp.RPYDLa

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Test run ID   : 49840120
:: [   LOG    ] :: Package       : redhat-access-insights
:: [   LOG    ] :: Installed:    : redhat-access-insights-1.0.8-13.el6.noarch 
:: [   LOG    ] :: beakerlib RPM : beakerlib-1.11-1.el6
:: [   LOG    ] :: bl-redhat RPM : beakerlib-redhat-1-23.el6
:: [   LOG    ] :: Test started  : 2017-01-09 04:51:03 EST
:: [   LOG    ] :: Test finished : 2017-01-09 04:52:22 EST
:: [   LOG    ] :: Test name     : /CoreOS/redhat-access-insights/Regression/bz1368236-Insights-client-does-not-respect-NO-PROXY
:: [   LOG    ] :: Distro:       : Red Hat Enterprise Linux Server release 6.8 (Santiago)
:: [   LOG    ] :: Hostname      : ibm-ps701-01-lp1.rhts.eng.bos.redhat.com
:: [   LOG    ] :: Architecture  : ppc64

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


New Pass:
redhat-access-insights-1.0.13-2.el6.noarch

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 1st Test NO_PROXY value set:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose  > registration-1st.log'
ERROR: Could not determine branch information
:: [   PASS   ] :: Command 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose  > registration-1st.log' (Expected 0, got 0)
:: [   PASS   ] :: Number of connections to cert-api.access.redhat.com is unchanged after connection (Assert: '0' should equal '0')
:: [   PASS   ] :: File 'registration-1st.log' should contain 'Found NO_PROXY set. Checking NO_PROXY cert-api.access.redhat.com against base URL' 
'760f56ff-eba3-48e2-a4c6-e187883446d9'
1st-Test-NO-PROXY-value-set- result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49840122/journal.txt
    Info: Searching AVC errors produced since 1483955633.02 (Mon Jan  9 04:53:53 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.AW6VHv
:
   AvcLog: /mnt/testarea/tmp.AW6VHv

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 2nd Test without NO_PROXY value:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'HTTPS_PROXY="http://127.0.0.1:3128" redhat-access-insights --force-reregister --verbose  > registration-2nd.log'
ERROR: Could not determine branch information
:: [   PASS   ] :: Command 'HTTPS_PROXY="http://127.0.0.1:3128" redhat-access-insights --force-reregister --verbose  > registration-2nd.log' (Expected 0, got 0)
:: [   PASS   ] :: Squid log should contain one access to cert-api.access.redhat.com more (Assert: '1' should equal '1')
:: [   PASS   ] :: File '/var/log/squid/access.log' should contain 'cert-api.access.redhat.com:443' 
:: [   PASS   ] :: File 'registration-2nd.log' should not contain 'Found NO_PROXY set. Checking NO_PROXY cert-api.access.redhat.com  against base URL' 
'c304cc3d-759a-417a-88b9-fc39af12043f'
2nd-Test-without-NO-PROXY-value- result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49840122/journal.txt
    Info: Searching AVC errors produced since 1483955636.77 (Mon Jan  9 04:53:56 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.AW6VHv
:
   AvcLog: /mnt/testarea/tmp.AW6VHv

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 3rdTest NO_PROXY value set:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose > registration-3rd.log'
ERROR: Could not determine branch information
:: [   PASS   ] :: Command 'HTTPS_PROXY="http://127.0.0.1:3128" NO_PROXY="cert-api.access.redhat.com" redhat-access-insights --force-reregister --verbose > registration-3rd.log' (Expected 0, got 0)
:: [   PASS   ] :: Number of connections to cert-api.access.redhat.com is unchanged after connection (Assert: '1' should equal '1')
:: [   PASS   ] :: File 'registration-3rd.log' should contain 'Found NO_PROXY set. Checking NO_PROXY cert-api.access.redhat.com against base URL' 
'e8834baa-586c-474f-968f-04c0a936206c'
3rdTest-NO-PROXY-value-set- result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49840122/journal.txt
    Info: Searching AVC errors produced since 1483955640.65 (Mon Jan  9 04:54:00 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.AW6VHv
:
   AvcLog: /mnt/testarea/tmp.AW6VHv

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'squidStop'
squid (pid  24993) is running...
Stopping squid: ................[  OK  ]
:: [  BEGIN   ] :: Waiting for squid to stop listening on port 3128 :: actually running 'rlWatchdog 'while ss -tan | grep -q :3128; do sleep 1; done' 120'
:: [ 04:54:36 ] :: Runnning while ss -tan | grep -q :3128; do sleep 1; done, with 120 seconds timeout
:: [ 04:54:53 ] :: Command ended itself, I am not killing it.
/usr/share/beakerlib/testing.sh: line 851: 25711 Terminated              eval "sleep $timeout; touch __INTERNAL_TIMEOUT"
:: [   PASS   ] :: Waiting for squid to stop listening on port 3128 (Expected 0, got 0)
:: [   PASS   ] :: Command 'squidStop' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'popd'
/mnt/tests/CoreOS/redhat-access-insights/Regression/bz1368236-Insights-client-does-not-respect-NO-PROXY
:: [   PASS   ] :: Command 'popd' (Expected 0, got 0)
:: [  BEGIN   ] :: Removing tmp directory :: actually running 'rm -r /tmp/tmp.Gxoeozj8e5'
:: [   PASS   ] :: Removing tmp directory (Expected 0, got 0)
'278fbccf-342b-4972-b468-b5a9d90c43aa'
Cleanup result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49840122/journal.txt
    Info: Searching AVC errors produced since 1483955644.32 (Mon Jan  9 04:54:04 2017)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.AW6VHv
:
   AvcLog: /mnt/testarea/tmp.AW6VHv

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Test run ID   : 49840122
:: [   LOG    ] :: Package       : redhat-access-insights
:: [   LOG    ] :: Installed:    : redhat-access-insights-1.0.13-2.el6.noarch 
:: [   LOG    ] :: beakerlib RPM : beakerlib-1.11-1.el6
:: [   LOG    ] :: bl-redhat RPM : beakerlib-redhat-1-23.el6
:: [   LOG    ] :: Test started  : 2017-01-09 04:53:44 EST
:: [   LOG    ] :: Test finished : 2017-01-09 04:54:55 EST
:: [   LOG    ] :: Test name     : /CoreOS/redhat-access-insights/Regression/bz1368236-Insights-client-does-not-respect-NO-PROXY
:: [   LOG    ] :: Distro:       : Red Hat Enterprise Linux Server release 6.8 (Santiago)
:: [   LOG    ] :: Hostname      : ibm-ps701-01-lp1.rhts.eng.bos.redhat.com
:: [   LOG    ] :: Architecture  : ppc64

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Comment 15 errata-xmlrpc 2017-03-21 12:01:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0797.html