[SOLVED] Can't execute "rsnapshot"

    • OMV 4.x
    • Can't execute "rsnapshot"

      Hi,

      today i recognized that i can't execute rsnapshot. I got the following error:

      Source Code

      1. Fehler #0:
      2. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; /bin/sh daily xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 2>&1': /bin/sh: 0: Can't open daily in /usr/share/openmediavault/engined/rpc/rsnapshot.inc:202
      3. Stack trace:
      4. #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMVRpcServiceRsnapshot->{closure}('/tmp/bgstatusz9...', '/tmp/bgoutputB7...')
      5. #1 /usr/share/openmediavault/engined/rpc/rsnapshot.inc(204): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      6. #2 [internal function]: OMVRpcServiceRsnapshot->execute(Array, Array)
      7. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      8. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)
      9. #5 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('RSnapshot', 'execute', Array, Array, 1)
      10. #6 {main}

      Via Web-UI, i've re-created an entry on page "Rsnapshot", but the error still occurs.

      Installed versions:
      • OMV 4.1.22-1
      • openmediavault-rsnapshot 4.2.1
      • rsnapshot 1.4.2-1
      Thank you for your help.

      Regards,
      Rig
    • Hi,

      the following is simplified OMV-Code:

      PHP Source Code: /usr/share/openmediavault/engined/rpc/rsnapshot.inc

      1. class OMVRpcServiceRsnapshot extends \OMV\Rpc\ServiceAbstract {
      2. public function execute($params, $context)
      3. {
      4. // Create the background process.
      5. return $this->execBgProc(function($bgStatusFilename, $bgOutputFilename)
      6. use ($params, $level) {
      7. $cmdArgs = [];
      8. $cmdArgs[] = $GLOBALS['OMV_RSNAPSHOT_CRONSCRIPT'];
      9. $cmdArgs[] = $level;
      10. $cmdArgs[] = $params['uuid'];
      11. $cmd = new \OMV\System\Process('/bin/sh', $cmdArgs);
      12. $cmd->setRedirect2to1();
      13. $cmdLine = $cmd->getCommandLine();
      14. if (0 !== $this->exec($cmdLine, $output, $bgOutputFilename))
      15. throw new \OMV\ExecException($cmdLine, $output);
      16. return $output;
      17. }
      18. );
      19. }
      20. }
      Display All
      The code in line 9 returned an empty string. Something with the globals thems to be wrong?!?


      I decided to reinstall the package

      Shell-Script

      1. sudo apt-get install --reinstall openmediavault-rsnapshot
      and now everything works fine and rsnapshot is executeable from the OMV UI.


      Regards,
      Rig
    • rig wrote:

      Something with the globals thems to be wrong?!?
      When the plugin is installed, it adds an entry to /etc/default/openmediavault that looks like OMV_RSNAPSHOT_CRONSCRIPT="/var/lib/openmediavault/cron.d/rsnapshot". That must not have happened correctly on your system. I would have been curious to see what the installed state of the plugin was before you fixed it. I'm guessing it was not ii.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Users Online 1

      1 Guest