Can't call method "open" on an undefined value

199 views
Skip to first unread message

ki0

unread,
Jul 31, 2014, 3:11:42 PM7/31/14
to rex-...@googlegroups.com
Hi group,

Im using version 0.50, my task does this:

task "FrontendDeploy", group => 'server', sub {
        my $params = shift;
        file "/var/deploy",
                ensure => "directory",
                owner => "deploy",
                group => "deploy",
                mode => "755";
        file "/var/www/logs",
                ensure => "directory",
                owner => "www-data",
                group => "www-data",
                mode => "755";
        upload "$params->{'workspace'}/$params->{'tag'}.tgz", "/var/deploy/";
        say run "tar -C /var/deploy/ -xzf /var/deploy/$params->{'tag'}.tgz";
        rm "/var/www/xxx";
        ln "/var/deploy/$params->{'tag'}/", "/var/www/xxx";
        ln  "/var/www/logs", "/var/www/xxx/logs";
        ln "/var/www/logs", "/var/www/xxx/server/adWeb/logs";
        rm "/var/deploy/$params->{'tag'}.tgz";
        service 'php5-fpm' => "restart";
};


When i run the task, i got this error:
[2014-07-31 20:58:16] DEBUG - Sudo: Executing: chgrp  www-data /var/www/logs
[2014-07-31 20:58:16] DEBUG - Shell/Bash: Got options:
[2014-07-31 20:58:16] DEBUG - $VAR1 = {
          'prepend_command' => 'sudo  -p \'\' -S'
        };

[2014-07-31 20:58:16] DEBUG - sudo: exec: sudo  -p '' -S sh -c "LC_ALL=C ; export LC_ALL; chgrp  www-data /var/www/logs "
[2014-07-31 20:58:16] DEBUG - SSH/executing: sudo  -p '' -S sh -c "LC_ALL=C ; export LC_ALL; chgrp  www-data /var/www/logs "
[2014-07-31 20:58:16] DEBUG - Sudo: Executing: chmod  755 /var/www/logs
[2014-07-31 20:58:16] DEBUG - Shell/Bash: Got options:
[2014-07-31 20:58:16] DEBUG - $VAR1 = {
          'prepend_command' => 'sudo  -p \'\' -S'
        };

[2014-07-31 20:58:16] DEBUG - sudo: exec: sudo  -p '' -S sh -c "LC_ALL=C ; export LC_ALL; chmod  755 /var/www/logs "
[2014-07-31 20:58:16] DEBUG - SSH/executing: sudo  -p '' -S sh -c "LC_ALL=C ; export LC_ALL; chmod  755 /var/www/logs "
[2014-07-31 20:58:17] DEBUG - Getting fs stat from /var/www/logs
[2014-07-31 20:58:17] DEBUG - Executing: perl -MFile::Spec -le 'print File::Spec->tmpdir'
[2014-07-31 20:58:17] DEBUG - Shell/Bash: Got options:
[2014-07-31 20:58:17] DEBUG - $VAR1 = {};
[2014-07-31 20:58:17] DEBUG - SSH/executing: LC_ALL=C ; export LC_ALL; perl -MFile::Spec -le 'print File::Spec->tmpdir'
[2014-07-31 20:58:17] DEBUG - /tmp
[2014-07-31 20:58:17] DEBUG - Opening /tmp/nqxcbqmucrse.tmp with mode: >
[2014-07-31 20:58:17] ERROR - Error executing task: Can't call method "open" on an undefined value at /var/lib/jenkins/perl5/perlbrew/perls/perl-5.18.1/lib/site_perl/5.18.1/Rex/Interface/File/OpenSSH.pm line 35.

[2014-07-31 20:58:17] WARN - Error running task/batch: Died at /var/lib/jenkins/perl5/perlbrew/perls/perl-5.18.1/lib/site_perl/5.18.1/Rex/Interface/Executor/Default.pm line 52.

It seems something is missing on file method but the directory is created so ... i dont know why is happening, this is happened from update to 0,50

Cheers

Jan Gehring

unread,
Jul 31, 2014, 3:24:13 PM7/31/14
to rex-...@googlegroups.com
Hi Fran,

could you please check if sftp is working? It seams that the subsystem isn't starting.

You need to use the sftp command to test it, because scp isn't using the sftp subsystem.

Thanks,

Jan


--
You received this message because you are subscribed to the Google Groups "Rex Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rex-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages