View Issue Details

IDProjectCategoryView StatusLast Update
0000511bareos-corefile daemonpublic2015-11-19 19:17
Reportertimp Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformFreeBSDOSFreeBSDOS Version10.2-RELEASE x64
Summary0000511: bpipe plugin: Error closing stream for pseudo file
DescriptionHi!
I tried to use bareos from FreeBSD ports tree.
Looks like bpipe doesn't work.

Fatal error: bpipe plugin: Error closing stream for pseudo file /MySQL/mydb.sql

bareos-dir's FileSet config contains:
Plugin = "bpipe:file=/MySQL/mydb.sql:reader=mysqldump -uuser
-ppassword --databases mydb:writer=/bin/sh -c 'cat - > /tmp/mydb.sql'"

bareos-fd's config contains:
Plugin Directory = /usr/local/lib/bareos/plugins
Plugin Names = "bpipe"


I use
FreeBSD 10.2-RELEASE amd64 GENERIC
bareos-client-15.2_1
bareos-server-15.2_1

P.S. hint from https://bugs.bareos.org/view.php?id=422 didn't help.
Steps To ReproduceInstall bareos from FreeBSD ports tree and try to take advantage of bpipe plugin.
Tagsbpipe, fd, freebsd, plugin

Relationships

related to 0000422 closed bpipe plugin: Error closing stream for pseudo file file: 268435664 

Activities

joergs

joergs

2015-11-06 17:18

developer   ~0001936

Have you read
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#BpipePlugin
especially the part of:
"Please note that the two items above describing the ”reader” and ”writer”, these programs are ”executed” by Bareos, which means there is no shell inerpretation of any command line arguments you might use. "

You should test to set reader and writer to a single program without parameter and specify the full path of the program, like

Plugin = "bpipe:file=/MySQL/mydb.sql:reader=/usr/local/bin/mysqldump.sh:writer=/usr/local/bin/writer.sh"
timp

timp

2015-11-11 17:23

reporter   ~0001955

So the examples from documentation is not right?
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-427000H.2.3
joergs

joergs

2015-11-13 08:31

developer   ~0001958

The documentation you are pointing to seems to be correct.
However, In your example, you use "writer=/bin/sh -c 'cat - > /tmp/mydb.sql'" which might causes problems. The approach I pointed out is safe.

Have you tested it?
timp

timp

2015-11-18 15:35

reporter   ~0001993

Last edited: 2015-11-18 15:39

> The documentation you are pointing to seems to be correct.
> However, In your example, you use "writer=/bin/sh -c 'cat - > /tmp/mydb.sql'" which might causes problems. The approach I pointed out is safe.
>
> Have you tested it?

No matter how I set the `writer` part I get that fatar error message.

For example, no luck with:

Plugin = "bpipe:file=/MySQL/mydb.sql:reader=mysqldump -uuser
-ppassword --databases mydb:writer="
(writer is empty)
or
Plugin = "bpipe:file=/MySQL/mydb.sql:reader=mysqldump -uuser
-ppassword --databases mydb:writer=mysql -uuser -ppassword mydb"
(this one is described in documentation)
or
Plugin = "bpipe:file=/MySQL/mydb.sql:reader=mysqldump -uuser
-ppassword --databases mydb:writer=/usr/local/bin/scriptwithcat.sh"
(this one is described in doc)

Neither works.

timp

timp

2015-11-18 15:37

reporter   ~0001994

However, this one works

Plugin = "bpipe:file=/MySQL/mydb.sql:reader=/usr/local/bin/mysqldump.sh:writer=/usr/local/bin/writer.sh"
(you proposed)
joergs

joergs

2015-11-19 19:16

developer   ~0002007

I'm glad, that at least one configuration works for you. I rechecked the documentation using 2 Linux machines and it works like expected. Maybe some other behaviour from FreeBSD on parameter handling in execvp?

I'm closing this for now. During the tests, I found a bug in the documentation (some bpipe examples do miss the "writer=" parameter). I'll fix that one soon and may strengthen the advice to use commands without parameter.

Issue History

Date Modified Username Field Change
2015-09-02 11:59 timp New Issue
2015-09-02 12:03 timp Tag Attached: bpipe
2015-09-02 12:03 timp Tag Attached: fd
2015-09-02 12:03 timp Tag Attached: freebsd
2015-09-02 12:03 timp Tag Attached: plugin
2015-11-06 17:18 joergs Note Added: 0001936
2015-11-06 17:18 joergs Status new => feedback
2015-11-06 17:26 joergs Relationship added related to 0000422
2015-11-11 17:23 timp Note Added: 0001955
2015-11-11 17:23 timp Status feedback => new
2015-11-13 08:31 joergs Note Added: 0001958
2015-11-13 08:31 joergs Status new => feedback
2015-11-18 15:35 timp Note Added: 0001993
2015-11-18 15:35 timp Status feedback => new
2015-11-18 15:37 timp Note Added: 0001994
2015-11-18 15:39 timp Note Edited: 0001993
2015-11-19 19:16 joergs Note Added: 0002007
2015-11-19 19:16 joergs Status new => resolved
2015-11-19 19:16 joergs Resolution open => fixed
2015-11-19 19:16 joergs Assigned To => joergs
2015-11-19 19:17 joergs Status resolved => closed
2015-11-19 19:17 joergs Assigned To joergs =>