Error in the python-bareos Plugin

45 views
Skip to first unread message

stefan....@harnet.de

unread,
Jan 16, 2023, 3:34:00 AM1/16/23
to bareos-users
Hello, my dears,
I get the following error message when calling "triggerjob.py":
...
root@dsme01:~# /usr/local/bin/triggerjob.py --password gYl8UCe/4EnxFfsBdW5dzzWads+QdhCh2fDjDSjI+KC0 bareos.intern.example.com
Traceback (most recent call last):
  File "/usr/local/bin/triggerjob.py", line 66, in <module>
    director = bareos.bsock.DirectorConsoleJson(**parameter)
  File "/usr/local/lib/python3.10/site-packages/bareos/bsock/directorconsolejson.py", line 59, in __init__
    super(DirectorConsoleJson, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/bareos/bsock/directorconsole.py", line 186, in __init__
    self.connect(address, port, dirname, ConnectionType.DIRECTOR, name, password)
  File "/usr/local/lib/python3.10/site-packages/bareos/bsock/lowlevel.py", line 165, in connect
    return self.__connect()
  File "/usr/local/lib/python3.10/site-packages/bareos/bsock/lowlevel.py", line 183, in __connect
    self.__connect_tls_psk()
  File "/usr/local/lib/python3.10/site-packages/bareos/bsock/lowlevel.py", line 259, in __connect_tls_psk
    self.socket = sslpsk.wrap_socket(
  File "/usr/local/lib/python3.10/site-packages/sslpsk/sslpsk.py", line 106, in wrap_socket
    _ssl_set_psk_client_callback(sock, cb)
  File "/usr/local/lib/python3.10/site-packages/sslpsk/sslpsk.py", line 73, in _ssl_set_psk_client_callback
    ssl_id = _sslpsk.sslpsk_set_psk_client_callback(_sslobj(sock))
  File "/usr/local/lib/python3.10/site-packages/sslpsk/sslpsk.py", line 55, in _sslobj
    return sock._sslobj._sslobj
AttributeError: '_ssl._SSLSocket' object has no attribute '_sslobj'
...
There seems to be something wrong with the encryption. Can you help me?
I'm running version 22.0.2.
Greetings from Stefan Harbich

stefan....@harnet.de

unread,
Jan 18, 2023, 5:56:47 AM1/18/23
to bareos-users
Hello,
i use Python version 3.10. Doesn't python-bareos work with version 3.10?

Jörg Steffens

unread,
Jan 18, 2023, 6:15:23 AM1/18/23
to bareos...@googlegroups.com
Hallo,

that looks as if you run into a problem with TLS-PSK.
I guess you have the Python module sslpsk installed.
Unfortenatly, this module does not work with current versions of Python.

To get rid of the error and make python-bareos scripts work you have to
uninstall the sslpsk module and use python-bareos without encryption.

Regards,
Jörg

On 18.01.23 at 11:56 wrote stefan....@harnet.de:
> Hello,
> i use Python version 3.10. Doesn't python-bareos work with version 3.10?
>
> stefan....@harnet.de schrieb am Montag, 16. Januar 2023 um 09:34:00 UTC+1:
>
> Hello, my dears,
> I get the following error message when calling "triggerjob.py":
> ...
> root@dsme01:~# /usr/local/bin/triggerjob.py --password
> gYl8UCe/4EnxFfsBdW5dzzWads+QdhCh2fDjDSjI+KC0
> bareos.intern.example.com <http://bareos.intern.example.com>
> --
> You received this message because you are subscribed to the Google
> Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bareos-users...@googlegroups.com
> <mailto:bareos-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bareos-users/6931cc9e-a859-46d5-8be0-d71a5218d916n%40googlegroups.com <https://groups.google.com/d/msgid/bareos-users/6931cc9e-a859-46d5-8be0-d71a5218d916n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Jörg Steffens joerg.s...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 630693-91
http://www.bareos.com Fax: +49 221 630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer:
S. Dühr, M. Außendorf, Jörg Steffens, P. Storz


stefan....@harnet.de

unread,
Jan 18, 2023, 7:23:39 AM1/18/23
to bareos-users
Hello,
it runs with python version 3.9.2. It does not run with version 3.10
Greetings from Stefan Harbich
Reply all
Reply to author
Forward
0 new messages