Page 1 of 1

[SOLVED] Ubuntu agent problem

Published: March 7, 2025 - 10:39
by thomas789
INFO:

WAPT Server version: 2.6.0.16552
WAPT Agent version: 2.6.0
WAPT Console version: 2.6.0.16767
My admin PC version: Ubuntu 24.04

Good morning,

I have noticed for the past few days that actions are impossible on my Ubuntu system because of step Update server with this host's status erroneous with the following elements:

Code: Select all

'utf-8' codec can't decode byte 0x9f in position 1680: invalid start byte
Traceback (most recent call last):
  File "<string>", line 1684, in run
  File "/opt/wapt/waptservice/waptservice_common.py", line 870, in run
    self._run()
  File "/opt/wapt/waptservice/waptservice_common.py", line 1221, in _run
    self.result = self.wapt.update_server_status(force=self.force, excluded_keys=self.excluded_keys, errors = errors)
  File "/opt/wapt/common.py", line 6803, in update_server_status
    if not self.waptserver_available():
  File "/opt/wapt/common.py", line 6909, in waptserver_available
    return self.waptserver and self.waptserver.available()
  File "/opt/wapt/common.py", line 2076, in available
    with self.get_requests_session() as session:
  File "/opt/wapt/common.py", line 1738, in get_requests_session
    if self.client_private_key and is_pem_key_encrypted(self.client_private_key):
  File "/opt/wapt/waptutils.py", line 837, in is_pem_key_encrypted
    pem_content = f.read()
  File "/opt/wapt/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9f in position 1680: invalid start byte

utf-8' codec can't decode byte 0x9f in position 1680: invalid start byte : faulty string is 'b'-----BEGIN RSA PRIVATE KEY----........
Key problem even though there haven't been any changes?

Thank you in advance, best regards.

Re: Ubuntu agent problem

Published: March 7, 2025 - 1:50 PM
by sfonteneau
Are all Ubuntu installations in the same state?

It looks like the key pair in /opt/wapt/private is incorrectly encoded...
Should I delete it and then re-register to see if that helps?

Re: Ubuntu agent problem

Published: March 7, 2025 - 2:12 PM
by thomas789
Hello,

this seems to fix the problem,

thank you, best regards.

Re: Ubuntu agent problem

Published: March 10, 2025 - 09:51
by dcardon
Hi Thomas,

regarding the problem, it was quite obvious and the fix was fairly simple, but I'm still wondering how it could have happened. It's a file that's generated and read by Wapt, so I don't see how there could have been an encoding error at some point...

What version was the first Wapt agent installed on these machines?

Regards,

Denis

Re: Ubuntu agent problem

Published: March 12, 2025 - 4:28 PM
by thomas789
Hello,

I unfortunately no longer have the history for that post, but it must be version 2.5.5. In any case, since updating to the latest version of the agent and following the tip above, the problem is no longer present. Thank you.

Re: Ubuntu agent problem

Published: March 28, 2025 - 12:28
by dcardon
Hi Thomas,

thanks for the feedback :-) , I'm marking the topic as resolved.

Denis