WAPT/CentOS Bug Agent?
Published: April 10, 2020 - 5:14 PM
I wanted to install a WAPT agent on a CentOS 7 server to use as a repository.
I'm using WAPT Community 1.8.1 on the server.
I downloaded the "tis-waptagent" package via YUM on the CentOS machine and followed the installation procedure on the wapt.fr website.
However, I can't get the service to start: the command
`systemctl start waptservice.service`
returned an error related to "locale.getdefaultlocale()[0].split('_')[0]".
=> After repeating the procedure several times, I observed that:
o In line 785 of "/opt/wapt/setuphelpers.py" there is the following instruction:
return locale.getdefaultlocale()[0].split('_')[0]
o This instruction calls the "getlocale" command to obtain a list of values corresponding to the locale language and keyboard settings, and retrieves the first element of this list (item "0"). This element is then split according to the separator character "_".
o However, the getlocale command returns nothing, and it is therefore impossible to perform a "split" on a variable that does not have the required type.
=
> I then tried the following corrective action: I commented out this instruction in the "setuphelpers" file and added an instruction just below it that forces the locale parameter to the value "en_US":
#return locale.getdefaultlocale()[0].split('_')[0]
return 'en_US.UFT8'
=> result: the service starts correctly.
However, now "systemctl status waptservice.service" returns a certificate error (even though I have correctly uploaded the server's certificate locally):
"WARNING Websocket connect params: [('x509 certificate routines', 'X509_check_private_key', 'key values mismatch')]"
=> Is this a configuration problem on my end, or is the "waptagent" package buggy? Is the language handling issue a bug?
Thank you
I'm using WAPT Community 1.8.1 on the server.
I downloaded the "tis-waptagent" package via YUM on the CentOS machine and followed the installation procedure on the wapt.fr website.
However, I can't get the service to start: the command
`systemctl start waptservice.service`
returned an error related to "locale.getdefaultlocale()[0].split('_')[0]".
=> After repeating the procedure several times, I observed that:
o In line 785 of "/opt/wapt/setuphelpers.py" there is the following instruction:
return locale.getdefaultlocale()[0].split('_')[0]
o This instruction calls the "getlocale" command to obtain a list of values corresponding to the locale language and keyboard settings, and retrieves the first element of this list (item "0"). This element is then split according to the separator character "_".
o However, the getlocale command returns nothing, and it is therefore impossible to perform a "split" on a variable that does not have the required type.
=
> I then tried the following corrective action: I commented out this instruction in the "setuphelpers" file and added an instruction just below it that forces the locale parameter to the value "en_US":
#return locale.getdefaultlocale()[0].split('_')[0]
return 'en_US.UFT8'
=> result: the service starts correctly.
However, now "systemctl status waptservice.service" returns a certificate error (even though I have correctly uploaded the server's certificate locally):
"WARNING Websocket connect params: [('x509 certificate routines', 'X509_check_private_key', 'key values mismatch')]"
=> Is this a configuration problem on my end, or is the "waptagent" package buggy? Is the language handling issue a bug?
Thank you