oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
609 stars 137 forks source link

Can't locate object method "delay" via package "Mojo::IOLoop" #541

Closed Malvineous closed 3 years ago

Malvineous commented 3 years ago

I'm new to znapzend, setting it up for the first time, but when I go to test my configuration I'm getting an error and I'm not having much luck figuring out what is causing it:

# znapzend --noaction --debug --runonce=ssd
[...]
=== getBackupSet() : got 1 dataset(s) with a local backup plan
=== getBackupSet() : got 1 enabled-only dataset(s) with a local backup plan
[2021-02-18 16:12:04.47546] [1071478] [info] found a valid backup plan for ssd...
Can't locate object method "delay" via package "Mojo::IOLoop" at /opt/znapzend/lib/Mojo/IOLoop/ForkCall.pm line 27.

Is there some additional Perl package I need to install that isn't mentioned in the docs? Apparently I have Perl 5.32.0 installed.

angstymeat commented 3 years ago

I'm having the same issue. I edited the cpanfile to force version 8.73, and it appears to work, but the issue is that the 9.01 version of Mojolicious that's being pulled doesn't support that method anymore.

GICodeWarrior commented 3 years ago

For reference, this is the commit where delay is removed from Mojo::IOLoop. https://github.com/mojolicious/mojo/commit/dd97afb36096d9347002a8389df1be391a757f65#diff-3c49204bac352d9347fa9af68678e6e30cb5521e0dea588826d4ef5f7a43083fL68

And this is the line in ForkCall that's trying to use it. https://github.com/jberger/Mojo-IOLoop-ForkCall/blob/master/lib/Mojo/IOLoop/ForkCall.pm#L27

GICodeWarrior commented 3 years ago

This patch works for me:

--- znapzend-0.20.0/cpanfile    2020-03-23 08:00:35.000000000 -0700
+++ znapzend-0.20.0-patch/cpanfile      2021-02-20 22:28:29.518472832 -0800
@@ -1,4 +1,4 @@
-requires 'Mojolicious';
+requires 'Mojolicious', '>= 8.73, <9.0';
 requires 'Mojo::IOLoop::ForkCall';
 requires 'Scalar::Util', '>= 1.45';
-requires 'Test::Exception';
\ No newline at end of file
+requires 'Test::Exception';

After applying, I ran make clean, make, sudo make install, and sudo service znapzend restart.

freultwah commented 3 years ago

Can it really be considered a fix? I mean, the world does not stop turning, and p5-Mojolicious keeps getting updated. I just discovered the very hard way that I have had no snapshots made since 17 February, the very date p5-Mojolicious was updated to 9.01 in FreeBSD ports. At the end I did go and revert the port to 8.73, and even locked the package so that it would never get updated, but it's not a long-term solution, really.

oetiker commented 3 years ago

yes I agree :)