Jibri - Cannot run finalize script

HI Guys,

I’m getting the following error in my Jibri log file after recording a file.

Any Thoughts?

2020-04-07 04:58:36.354 SEVERE: [34] org.jitsi.jibri.service.impl.FileRecordingJibriService.finalize() Failed to run finalize script: java.io.IOException: Cannot run program “/home/steve/finalize_recording.sh”: error=2, No such file or directory with stack:

Thanks
Steve

*** SOLVED ***

I got this working. Seemed to be a combination of stupid permission problems and special characters hidden in the script file.

-Steve

may i ask the specific part of permission problem you’ve encountered in
finalize_recording_script_path, thanks in advance

Hi,

If it is ok, ill go thru a ‘checklist’ like format which helps me remember as well!

1/ in /etc/jitsi/jibri/config.json, place your target location for your file
// The path to the script which will be run on completed recordings
“finalize_recording_script_path”: “/home/steve/finalize”,
“xmpp_environments”: [

2/ in /home/steve/
the file finalize has the following ownership and permissions
-rwxrwxr-x 1 steve steve 1242 Apr 24 05:59 finalize

3/ within the file finalize I make sure that I correctly specify the shell to run the file. with my earlier problem it could not find /bin/ksh and that is why the problem was occuring along with ksh could not run the file because it was not executable ‘duh’.

4/ briefing about my finalize file:
My file takes the finalized recording and copies it to a NFS mounted NAS which is fronted by a wordpress site in order to share the file via a web page.
If you wish to see the result go to
http://www.opey.org/opeyit/ and go to emeet recordings If there are any recordings they will be there.

5/ Here is my finalize file
#!/bin/ksh
COMMAND=$0
RECORDINGS_DIR=$1

echo “$COMMAND” > /tmp/finalize.out
echo “$RECORDINGS_DIR” >> /tmp/finalize.out

The script exctracts the filename to prepare it for moving it to an external place, i.e. NAS drive

#Remove the meta-data file as it is not required
rm $RECORDINGS_DIR/metadata.json

#capture the filename of the recording
FILENAME=ls $RECORDINGS_DIR
echo “filename = $FILENAME” >> /tmp/finalize.out

#Move the recorded file to the WEB share
mv $RECORDINGS_DIR/$FILENAME /mnt/recordings/

Remove the old directory

rmdir $RECORDINGS_DIR

6/ on my jibri server I have the mounted NAS directory with a cron job running that copies files in the mounted directory under my wordpress site and then within wordpress I display them using a file list plug-in.

I hope this helps

i resolved it, ownership and permission i do some chown to jibri. thanks anyway :slight_smile: