Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Unable to make it work #5

Open
niutechmx opened this issue Aug 31, 2016 · 3 comments
Open

Unable to make it work #5

niutechmx opened this issue Aug 31, 2016 · 3 comments

Comments

@niutechmx
Copy link

Hi, I'm unable to see what i'm doing wrong with the installation but i'm unable to make it work. I test that "su -s bconsole nagios" is working ok after adding the user nagios to the bacula group.

I'm assuming that the script must run in the bacula director server, not in the nagios server.

This is the error I get, any help is apreciatted.

Traceback (most recent call last):
File "./check_bacula_client", line 98, in
main(sys.argv)
File "./check_bacula_client", line 59, in main
child.expect(r'\n*')
File "/usr/lib/python2.6/site-packages/pexpect.py", line 1311, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "/usr/lib/python2.6/site-packages/pexpect.py", line 1325, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "/usr/lib/python2.6/site-packages/pexpect.py", line 1409, in expect_loop
raise TIMEOUT (str(e) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
<pexpect.spawn object at 0x7f91b3c21950>
version: 2.3 ($Revision: 399 $)
command: /usr/sbin/bconsole
args: ['/usr/sbin/bconsole', '-n']
searcher: searcher_re:
0: re.compile("\n*")
buffer (last 100 chars):
1000 OK: 1 bacula-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*
before (last 100 chars):
1000 OK: 1 bacula-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 30218
child_fd: 3
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1

@twpayne
Copy link
Owner

twpayne commented Aug 31, 2016

(Sorry if the following is wrong, it's been over five years since I last ran this software)

It looks like nagios_plugin_bacula is timing out connecting to the Bacula director.

The Nagios plugin runs as the user nagios. Please can you check that the nagios user can run the Bacula director without using a password.

What does

# su -s /usr/sbin/bconsole nagios

output?

@twpayne
Copy link
Owner

twpayne commented Aug 31, 2016

(Another possibility is that the output from the bconsole program has changed since this software was written, in which case this software needs to be updated).

@niutechmx
Copy link
Author

No problem twpayne, seems like the output of bconsole could have change since the program was written.
The user nagios can access bconsole without problem. I'll try to look at the source code to see if I can change anything. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant