It does not look like a TLS problem, rather than your python console password does not match the director. You can find the password in the director configuration in the regarding director resource.

See the log messages, both of the methods (TLS-PSK and CRAM MD5) use the same password:

PSK is wrong --> WARNING lowlevel.__connect: Failed to connect via TLS-PSK. 
Trying plain connection.
...
Fallback to cleartext --> DEBUG lowlevel.__connect: Encryption: None
...
CRAM MD5 failed --> ERROR lowlevel._cram_md5_respond: failed: 1999 
Authorization failed


You should use at least Bareos 18.2.5 but avoid the daily builds from master (which is versioned on 19.x.y) unless you really know what you are doing.


Am 13.02.2019 um 17:18 schrieb Stefan Harbich:
Hello my dears,

I get the following error when starting triggerjob.py:

# triggerjob.py --debug --password f5IHQS...G9I0yd1 bareos.intern.harnet.de
DEBUG triggerjob.<module>: address: bareos.intern.example.com
DEBUG triggerjob.<module>: port: 9101
DEBUG triggerjob.<module>: dirname: ""
DEBUG triggerjob.<module>: name: *UserAgent*
DEBUG triggerjob.<module>: options: {'port': 9101, 'name': '*UserAgent*', 
'address': 'bareos.intern.harnet.de'}
DEBUG lowlevel.__init__: init
DEBUG lowlevel.__connect_plain: connected to bareos.intern.example.com:9101
DEBUG lowlevel.__connect_tls_psk: identity = R_CONSOLE *UserAgent*, password = 
32989512074...8ae2f31a7b68a4
WARNING lowlevel.__connect: Failed to connect via TLS-PSK. Trying plain 
connection.
DEBUG lowlevel.__connect_plain: connected to bareos.intern.example.com:9101
DEBUG lowlevel.__connect: Encryption: None
DEBUG lowlevel.send: Hello *UserAgent* calling

DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 54
DEBUG lowlevel._cram_md5_respond: (recv): auth cram-md5 
<490489026.1550074092@bareos-dir> ssl=1

DEBUG lowlevel.send: D9/fID52q2+wKVsR1xgw/C
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 27
ERROR lowlevel._cram_md5_respond: failed: 1999 Authorization failed.

Traceback (most recent call last):
   File "/usr/local/bin/triggerjob.py", line 66, in <module>
     director = bareos.bsock.DirectorConsoleJson(**parameter)
   File "/usr/lib/python2.7/dist-packages/bareos/bsock/directorconsolejson.py", 
line 15, in __init__
     super(DirectorConsoleJson, self).__init__(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/bareos/bsock/directorconsole.py", 
line 25, in __init__
     self.auth(name=name, password=password, auth_success_regex=b'^1000 OK.*$')
   File "/usr/lib/python2.7/dist-packages/bareos/bsock/lowlevel.py", line 162, 
in auth
     return self.__auth()
   File "/usr/lib/python2.7/dist-packages/bareos/bsock/lowlevel.py", line 172, 
in __auth
     raise AuthenticationError("failed (in response)")
bareos.exceptions.AuthenticationError: failed (in response)

I have installed the following:
# pip install sslpsk

Do I have to adjust a configuration?

Thank you in advance for your support and remain ...
Greetings from Stefan Harbich


--
Mit freundlichen Grüßen

 Frank Ueberschar                          [email protected]
 Bareos GmbH & Co. KG                      Phone: +49 221 63 06 93-88
 http://www.bareos.com                     Fax:   +49 221 63 06 93-10

 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens, P. Storz

--
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to