You may want to try out Bareos 18.2.5 released last week.

Am 14.01.2019 um 14:09 schrieb Christoph Haas:
Dear list,

I would like to use python-bareos to get some data from the director. I
haven't used python-bareos before so I can't tell if this is related to
18.2.4rc or my idiocy. :)

When running the bconsole code from
https://github.com/bareos/bareos/blob/master/python-bareos/bin/bconsole-json.py
I get this trace:

./myconsole -p 'MyExtremely/SuperSecretPassword' bareos.pmd5.org
Traceback (most recent call last):
   File "./myconsole", line 40, in <module>
     director = bareos.bsock.DirectorConsoleJson(**parameter)
   File
"/home/chaas/projekte/bandsalat-django/virtualenv/lib/python3.6/site-packages/bareos/bsock/directorconsolejson.py",
line 15, in __init__
     super(DirectorConsoleJson, self).__init__(*args, **kwargs)
   File
"/home/chaas/projekte/bandsalat-django/virtualenv/lib/python3.6/site-packages/bareos/bsock/directorconsole.py",
line 19, in __init__
     self.auth(name=name, password=password, auth_success_regex=b'^1000
OK.*$')
   File
"/home/chaas/projekte/bandsalat-django/virtualenv/lib/python3.6/site-packages/bareos/bsock/lowlevel.py",
line 77, in auth
     return self.__auth()
   File
"/home/chaas/projekte/bandsalat-django/virtualenv/lib/python3.6/site-packages/bareos/bsock/lowlevel.py",
line 85, in __auth
     (ssl, result_compatible, result) =
self._cram_md5_respond(password=self.password.md5(), tls_remote_need=0)
   File
"/home/chaas/projekte/bandsalat-django/virtualenv/lib/python3.6/site-packages/bareos/bsock/lowlevel.py",
line 372, in _cram_md5_respond
     chal = msg_list[2]
IndexError: list index out of range

The Python package I installed was taken from
http://download.bareos.org/bareos/release/18.2/Debian_9.0/python-bareos_18.2.4rc2-0.orig.tar.gz

The same error appears when using this often-quoted snippet:

import bareos.bsock
password=bareos.bsock.Password('NTLfNvKlm3ObWOSuW8o/gCrOSm6QFs4JhE06bFESge6h')

directorconsole=bareos.bsock.DirectorConsoleJson(address='bareos.pmd5.org',
password=password)

I read there were some changed regarding authentication and encryption
in 18.2. Could it be that the Python code needs adjusting?

I know a little Python but not so much about the internal protocol
spoken on port 9101. I'm willing to help is anyone pushes me in the
right direction.

Thanks for your time.

…Christoph



--
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+unsubscr...@googlegroups.com.
To post to this group, send email to bareos-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to