AnsweredAssumed Answered

HCP Log Collector connection issues.

Question asked by Aaron Smith on Jun 20, 2017
Latest reply on Mar 15, 2018 by Aleksandr Rainchik

So, I'm working on setting up HCI and HCP Log Collector and I'm running into an issue when trying to get the HCP Log Collector to connect to the HCP nodes to collect the logs. I ran a packet capture on the server that I have the Log Collector installed on to see what the network flow looked like but no traffic is generated when I run hcplogs. The following is the debug output from hcplogs. The output has been anonymized.

 

From my searching it looks like "_create_default_https_context" is possibly a function in the Python SSL module. I have multiple versions of python installed. I used Python 3.4 to install the Log Collector software. My hunch is that the wrong version of Python may be getting used to run the hcplogs, and that version may be missing the SSL module, or something like that.

 

Has anyone run into a similar issue?

 

Thanks in advance,

Aaron

 

[root@server01 bin]# hcplogs -i /opt/hcplogs/hcplogs_config.ini

06/20 13:19:37 [DEBUG ] hcplogs.log(130): logging initialized

06/20 13:19:37 [INFO  ] hcplogs.Config.__init__(206): Started run (user "root")

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(208): Configuration file content:

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(210): [target hcp1]

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   fqdn = admin.example.hcp.lan

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   user = logCollector

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   password = SomePassword

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   folder = osl1

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   last collected =

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(210): [access logs]

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   access = yes

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   admin = yes

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   mapi = yes

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   omit empty = yes

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(210): [local archive store]

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   enable = yes

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   path = /opt/hcplogs/_hcplogs.dir

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(210): [compliant archive store]

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   enable = no

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   path = https://n1.m.hcp72.archivas.com/rest/accesslogs

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   user = n

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   password = n01

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   retention = 0

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(210): [logging]

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   log to stdout = yes

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   log to file = no

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   logfile = /opt/hcplogs/_hcplogs.dir/_hcplogs.log

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   rotatemb = 10

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   backups = 9

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   status query = 10

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   debug = yes

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(210): [temporary store]

06/20 13:19:37 [DEBUG ] hcplogs.Config.__init__(212):   tempdir = /opt/hcplogs/_hcplogs.dir

06/20 13:19:37 [DEBUG ] hcplogs.__main__.main(51): creating handler for target osl1

06/20 13:19:37 [DEBUG ] hcplogs.loghandler.Handler.__init__(71): Handler initializing for target osl1

06/20 13:19:37 [DEBUG ] hcpsdk.NativeAuthorization.__init__(238): *I_NATIVE* authorization initialized for user: logmon

06/20 13:19:37 [DEBUG ] hcpsdk.NativeAuthorization.__init__(240): pre version 6:     Cookie: hcp-ns-auth=bG9nbW9u:68eacb97d86f0c4621fa2b0e17cabd8c

06/20 13:19:37 [DEBUG ] hcpsdk.NativeAuthorization.__init__(242): version 6+: Authorization: HCP bG9nbW9u:68eacb97d86f0c4621fa2b0e17cabd8c

06/20 13:19:40 [DEBUG ] hcpsdk.ips.Circle._addr(115): (re-) loaded IP address cache: ['10.x.x.x], dnscache = False

06/20 13:19:40 [DEBUG ] hcpsdk.ips.Circle._addr(116): issued IP address: 10.x.x.x

06/20 13:19:40 [DEBUG ] hcpsdk.Target.__init__(365): Target initialized: admin.example.hcp.lan:9090 - SSL = True

06/20 13:19:40 [DEBUG ] hcpsdk.Connection.__init__(520): Connection object initialized: IP None (admin.example.hcp.lan) - timeout: 30 - idletime: 30.0 - retries: 0

06/20 13:19:40 [DEBUG ] hcpsdk.mapi.logs.Logs.mark(114): mark log with "HCPLOGS begins a log download session (remote user=root)"

06/20 13:19:40 [DEBUG ] hcpsdk.Connection.request(633): URL = /mapi/logs?mark=HCPLOGS+begins+a+log+download+session+%28remote+user%3Droot%29

06/20 13:19:40 [DEBUG ] hcpsdk.Connection.request(658): POST: About to request for /mapi/logs?mark=HCPLOGS+begins+a+log+download+session+%28remote+user%3Droot%29

06/20 13:19:40 [DEBUG ] hcpsdk.Connection.request(681): Connection needs to be opened

06/20 13:19:40 [DEBUG ] hcpsdk.ips.Circle._addr(116): issued IP address: 10.x.x.x

06/20 13:19:40 [ERROR ] hcpsdk.mapi.logs.Logs.mark(118): Can't connect, retry failed ('module' object has no attribute '_create_default_https_context')

06/20 13:19:40 [ERROR ] hcplogs.__main__.main(56): creation of handler for target osl1 failed

      hint: Connection to admin.example.hcp.lan failed

      hint: Can't connect, retry failed ('module' object has no attribute '_create_default_https_context')

06/20 13:19:40 [INFO  ] hcplogs.__main__.main(118): Finished run (user "root")

Outcomes