On 14.11.2017 at 11:22 wrote Stefan Harbich:
>> Please run it on the director. Run it via cron every 10 minutes or so.
>> There is also the posibility to use Bareos *Admin* Jobs instead of cron,
>> but I propose you first get it working using cron.
> 
> Hello my dears,
> 
> before, I started a job for a laptop in the bareos-webui. The laptop was not 
> connected to the network at this time.
> 
> ...
> 2017-11-14 10:09:53   bareos-dir JobId 63: Fatal error: Failed to connect to 
> client "nmanwme01-fd".
> 2017-11-14 10:09:53   bareos-dir JobId 63: Fatal error: No Job status 
> returned from FD.
> 2017-11-14 10:09:53   bareos-dir JobId 63: Error: Bareos bareos-dir 17.2.3 
> (14Aug17):
> Build OS: x86_64-pc-linux-gnu debian Debian GNU/Linux 8.0 (jessie)
> JobId: 63
> Job: backup-nmanwme01-fd.2017-11-14_10.06.50_31
> Backup Level: Incremental, since=2017-11-13 04:00:05
> Client: "nmanwme01-fd" 16.2.4 (01Jul16) x86_64-pc-linux-gnu,ubuntu,Ubuntu 
> 16.04 LTS,xUbuntu_16.04,x86_64
> FileSet: "LinuxAll" 2017-11-04 04:00:00
> Pool: "Incremental" (From command line)
> Catalog: "MyCatalog" (From Client resource)
> Storage: "File" (From Job resource)
> Scheduled time: 14-Nov-2017 10:06:50
> Start time: 14-Nov-2017 10:06:52
> End time: 14-Nov-2017 10:09:53
> Elapsed time: 3 mins 1 sec
> Priority: 10
> FD Files Written: 0
> SD Files Written: 0
> FD Bytes Written: 0 (0 B)
> SD Bytes Written: 0 (0 B)
> Rate: 0.0 KB/s
> Software Compression: None
> VSS: no
> Encryption: no
> Accurate: no
> Volume name(s):
> Volume Session Id: 1
> Volume Session Time: 1510650077
> Last Volume Bytes: 0 (0 B)
> Non-fatal FD errors: 1
> SD Errors: 0
> FD termination status: Error
> SD termination status: Waiting on FD
> FD Secure Erase Cmd:
> Termination: *** Backup Error ***
> 
> 2017-11-14 10:06:52   bareos-dir JobId 63: Start Backup JobId 63, 
> Job=backup-nmanwme01-fd.2017-11-14_10.06.50_31
> 2017-11-14 10:06:52   bareos-dir JobId 63: Using Device "FileStorage" to 
> write.
> ...
> 
> After then i connected the laptop to the lan. As soon as I start the script 
> locally, nothing happens. The script ends with the following message:
> 
> ...
> root@dsme01:~# triggerjob.py -d --password 
> ........mQMZshcuQg920g7SOTtt................ bareos.intern.example.com
> 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.example.com'}
> DEBUG lowlevel.__init__: init
> DEBUG lowlevel.__connect: connected to bareos.intern.harnet.de:9101
> DEBUG lowlevel.send: Hello *UserAgent* calling
> 
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 55
> DEBUG lowlevel._cram_md5_respond: (recv): auth cram-md5 
> <1147136555.1510653866@bareos-dir> ssl=0
> 
> DEBUG lowlevel.send: tFsuq9+DQx/7L5++R9+jWA
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 13
> DEBUG lowlevel.send: auth cram-md5 <8638914490.1510653866@*UserAgent*> ssl=0
> 
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 23
> DEBUG lowlevel._cram_md5_challenge: received: hy/OLg/cDAVue6dUKDEQzD
> DEBUG lowlevel._cram_md5_challenge: string_to_base64, compatible:     
> hyHOLgrcDAVueqdUKDEQzw
> DEBUG lowlevel._cram_md5_challenge: string_to_base64, not compatible: 
> hy/OLg/cDAVue6dUKDEQzD
> DEBUG lowlevel.send: 1000 OK auth
> 
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 50
> DEBUG lowlevel.recv_msg: msg "1000 OK: bareos-dir Version: 17.2.3 (14 Aug 
> 2017)" matches regex "^1000 OK.*$"
> DEBUG lowlevel.send: .api json
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Command succeeded (-15)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 68
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Messages pending (-17)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Server ready and waiting (-18)
> DEBUG directorconsolejson._init_connection: {u'api': 2}
> DEBUG lowlevel.send: .api json compact=yes
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Start command execution (-16)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Command succeeded (-15)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 46
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Server ready and waiting (-18)
> DEBUG directorconsolejson._init_connection: {u'api': 2}
> DEBUG triggerjob.<module>: authentication successful
> DEBUG lowlevel.send: .jobs
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Start command execution (-16)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Command succeeded (-15)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 258
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Server ready and waiting (-18)
> DEBUG lowlevel.send: status director
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Start command execution (-16)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Command succeeded (-15)
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.recv_submsg:   submsg len: 61
> DEBUG lowlevel.__get_header:   remaining header len: 4
> DEBUG lowlevel.__set_status: Server ready and waiting (-18)
> ...
> 
> The script does not find the failed backup job. What am I still doing wrong?

The script is *not* looking for failed jobs. If you want this
(independently from this script), you have to use
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#directiveDirJobReschedule%20On%20Error

The scripts start jobs for connected client, that did not have run for
at least 24. You can change this value in the Python script, if you
like, for better testing.

Have you checked, the relevant clients are connected?

You see this by "status dir".



-- 
 Jörg Steffens                   joerg.steff...@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

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