Syncoid fails to send to FreeNAS 13 with "Ambiguous output redirect"

I encountered this error attempting to run syncoid from a Ubuntu 22.04 system to a FreeNAS 13 system. Do I have a quoting error? The script starts with #!/bin/bash. Would this be an error missing pv or mbuffer local system, or mbuffer missing on the FreeNAS system?

Jed

/usr/sbin/syncoid -r $Q $NS --compress=none bookkeeper-pool/home \
    "root@bufnas02:bufpool/buf_admin/desktops/bookkeeper-pool"
+ /usr/sbin/syncoid -r --compress=none bookkeeper-pool/home root@bufnas02:bufpool/buf_admin/desktops/bookkeeper-pool
INFO: Sending oldest full snapshot bookkeeper-pool/home@00-bookkeeper (~ 376.1 MB) to new target filesystem:
Ambiguous output redirect.
mbuffer: error: outputThread: error writing to <stdout> at offset 0x38000: Broken pipe
7.52MiB 0:00:00 [ 833MiB/s] [>                                                                                                              ]  1%            
mbuffer: warning: error during output to <stdout>: Broken pipe
CRITICAL ERROR:  zfs send  'bookkeeper-pool/home'@'00-bookkeeper' | pv -p -t -e -r -b -s 394407600 | mbuffer  -q -s 128k -m 16M 2>/dev/null | ssh     -S /tmp/syncoid-root@bufnas02-1707092313 root@bufnas02 ' mbuffer  -q -s 128k -m 16M 2>/dev/null |  zfs receive  -s -F '"'"'bufpool/buf_admin/desktops/bookkeeper-pool'"'"'' failed: 256 at /usr/sbin/syncoid line 492.
INFO: Sending oldest full snapshot bookkeeper-pool/home/bufbooks@2022-12-16-backup (~ 3.6 GB) to new target filesystem:
Ambiguous output redirect.
mbuffer: error: outputThread: error writing to <stdout> at offset 0x38000: Broken pipe
mbuffer: warning: error during output to <stdout>: Broken pipe
4.38MiB 0:00:00 [ 461MiB/s] [>                                                                                                              ]  0%            
CRITICAL ERROR:  zfs send  'bookkeeper-pool/home/bufbooks'@'2022-12-16-backup' | pv -p -t -e -r -b -s 3907061192 | mbuffer  -q -s 128k -m 16M 2>/dev/null | ssh     -S /tmp/syncoid-root@bufnas02-1707092313 root@bufnas02 ' mbuffer  -q -s 128k -m 16M 2>/dev/null |  zfs receive  -s -F '"'"'bufpool/buf_admin/desktops/bookkeeper-pool/bufbooks'"'"'' failed: 256 at /usr/sbin/syncoid line 492.

This most likely indicates that the default shell for the user on the FreeNAS 13 host is csh/tcsh.

If you change the default shell of the user being used for replication on the FreeNAS 13 box to /bin/sh, you should see the errors clear. If you can’t manage that, removing mbuffer on that system will decrease performance (due to lack of buffering on one end), but it will work around the issue of csh’s extremely stupid redirect handling. :slight_smile:

1 Like