Page 1 of 1

[SOLVED] Error on Raspberry Pi 3+

Published: Dec 19, 2022 - 11:47
by haxo_914
Hello,

I just installed the WAPT agent on a Raspberry Pi 3+ with the aim of setting it up as a secondary repository.
But when I run `sudo wapt-get register`,

I get the following error

: FATAL ERROR: EWaptException: Unable to register: waptserver https://xxx.xxx.xxx.xxx not available.

Do you have any idea what the problem might be?
I searched for the documentation to install WAPT but couldn't find it, so I adapted it from https://www.wapt.fr/en/doc-2.3/wapt-dep ... macos.html.

Thank you

. Best regards.

Re: Error on Raspberry Pi 3+

Published: Dec 21, 2022 - 12:28
by dcardon
Hello,

what version of WAPT are you using? What version of Linux are you using on your Raspberry Pi 3? Debian ARM packages are currently only compiled for Debian 10. Could you be using Debian 11?

Regards,

Denis

Re: Error on Raspberry Pi 3+

Published: Dec 21, 2022 - 1:35 PM
by haxo_914
Hello,
I have indeed failed to complete all my homework. :)

root@raspberrypi:~# cat /etc/*release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

Agent installed from deb https://wapt.tranquil.it/debian/wapt-2.2/buster main" > /etc/apt/sources.list.d/wapt.list

So, version 2.2 of the agent.

Thank you for your help

Sincerely

Re: Error on Raspberry Pi 3+

Published: Dec 26, 2022 - 5:33 PM
by dcardon
Good morning,

Thank you for the additional information. Is there a proxy or firewall filtering traffic between the agent and the server? Could you try running the register in debug mode?

Code: Select all

wapt-get -l debug register
Sincerely,

Denis

Re: Error on Raspberry Pi 3+

Published: Dec 27, 2022 - 08:18
by haxo_914
Good morning,

There is no FW and/or proxy between the agent and the server at the moment.
For my tests, both are in the same network and on the same switch and VLAN.

Here is the result of the command.

Code: Select all

2022-12-27 08:13:27,196 DEBUG Default encoding : utf-8
2022-12-27 08:13:27,196 DEBUG Caller: ['/opt/wapt/wapt-get.py', '-l', 'debug', 'register']
2022-12-27 08:13:27,197 DEBUG Python path ['/opt/wapt', '/opt/wapt', '/opt/wapt/lib/python38.zip', '/opt/wapt/lib/python3.8', '/opt/wapt/lib/python3.8/lib-dynload', '/opt/wapt/lib/python3.8/site-packages']
2022-12-27 08:13:27,197 INFO Using local waptservice configuration /opt/wapt/wapt-get.ini
2022-12-27 08:13:27,198 DEBUG Config file: /opt/wapt/wapt-get.ini
2022-12-27 08:13:27,208 DEBUG Thread 1995895808 is connecting to wapt db
2022-12-27 08:13:27,212 DEBUG DB Start transaction
2022-12-27 08:13:27,213 DEBUG DB commit
Using config file: /opt/wapt/wapt-get.ini
2022-12-27 08:13:27,363 DEBUG Using host certificate /opt/wapt/private/raspberrypi.pem for repo global auth
2022-12-27 08:13:27,364 INFO User Groups:[]
2022-12-27 08:13:27,366 INFO WAPT base directory : /opt/wapt
2022-12-27 08:13:27,367 INFO Package cache dir : /opt/wapt/cache
2022-12-27 08:13:27,367 INFO WAPT DB Structure version: 20210420
Registering host against server: https://10.xxx.xxx.xxx
2022-12-27 08:13:27,369 DEBUG Loading ssl context with cert /opt/wapt/private/raspberrypi.crt and key /opt/wapt/private/raspberrypi.pem
2022-12-27 08:13:27,379 DEBUG Starting new HTTPS connection (1): 10.xxx.xxx.xxx:443
2022-12-27 08:13:27,434 DEBUG Wapt server https://10.xxx.xxx.xxx unavailable (SSLError: HTTPSConnectionPool(host='10xxx.xxx.xxx', port=443): Max retries exceeded with url: /ping (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))))
FATAL ERROR : EWaptException: Unable to register: waptserver https://10.xxx.xxx.xxx not available
Traceback (most recent call last):
  File "/opt/wapt/wapt-get.py", line 1647, in <module>
    main()
  File "/opt/wapt/wapt-get.py", line 1341, in main
    result['register'] = mywapt.register_computer(
  File "/opt/wapt/common.py", line 5908, in register_computer
    raise EWaptException('Unable to register: waptserver %s not available' % self.waptserver.server_url)
waptpackage.EWaptException: Unable to register: waptserver https://10.xxx.xxx.xxx not available
Thank you for your help

Sincerely

Re: Error on Raspberry Pi 3+

Published: Dec 27, 2022 - 09:24
by sfonteneau
Hello,

could you please provide your wapt-get.ini file so I can check the value of verify_cert?

The message indicates:
CERTIFICATE_VERIFY_FAILED

Re: Error on Raspberry Pi 3+

Published: Dec 27, 2022 - 09:34
by haxo_914
Hello,

after running several tests, I had removed the line `verify_cert=0`.

I put it back, restarted the service, and then ran the command `wapt-get -l debug register`.

And now it works.

The issue is therefore closed.

Thank you all for your help.

Sincerely.