Re: [bareos-users] Can python-bareos work with 18.2.4rc? / IndexError: list index out of range

2019-01-14 Thread Christoph Haas
Am 14.01.19 um 17:35 schrieb Frank Ueberschar:
> Python code for Bareos Version 18.2 has to be revised due to protocol
> changes. Meanwhile to getting started with Python Bareos it is
> recommended to use Bareos 17.2. 

Are the protocol changes documented publicly so I could maybe help fix
the Python code?

Otherwise I'm a bit swamped. I hoped to get rid of frequent
bareos-directory segfaults by trying the RC (which works pretty well…
although the crashes still happen just as often as with 17.2). So I
guess there's no way back on the directory and database/catalog. Or is it?

…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.


Re: [bareos-users] Can python-bareos work with 18.2.4rc? / IndexError: list index out of range

2019-01-14 Thread Frank Ueberschar
Python code for Bareos Version 18.2 has to be revised due to protocol 
changes. Meanwhile to getting started with Python Bareos it is 
recommended to use Bareos 17.2.


.. frank

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 
     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.