duncs / clusterssh

Cluster SSH - Cluster Admin Via SSH
https://github.com/duncs/clusterssh/wiki
890 stars 79 forks source link

Clusterssh 4.14 fails due to missing "resolve_names" #123

Closed madworm closed 4 years ago

madworm commented 4 years ago

OS: openSUSE Tumbelweed

Tk::Error: Can't locate object method "resolve_names" via package "App::ClusterSSH::Window" at /usr/lib/perl5/vendor_perl/5.28.1/App/ClusterSSH/Window/Tk.pm line 357.
 App::ClusterSSH::Window::Tk::add_host_by_name at /usr/lib/perl5/vendor_perl/5.28.1/App/ClusterSSH/Window/Tk.pm line 357
 App::ClusterSSH::Window::Tk::__ANON__ at /usr/lib/perl5/vendor_perl/5.28.1/App/ClusterSSH/Window/Tk.pm line 1746
 Tk callback for .#menu.#menu#hosts
 Tk::__ANON__ at /usr/lib/perl5/vendor_perl/5.28.1/x86_64-linux-thread-multi/Tk.pm line 251
 Tk::Menu::Invoke at /usr/lib/perl5/vendor_perl/5.28.1/x86_64-linux-thread-multi/Tk/Menu.pm line 532
duncs commented 4 years ago

Can you confirm what version of perl you are running?

madworm commented 4 years ago
perl-Text-Diff-1.45-1.6.noarch
perl-base-5.28.1-3.3.x86_64
perl-Archive-Zip-1.64-1.4.noarch
perl-Test-Differences-0.67-1.3.noarch
perl-Authen-SASL-2.16-6.7.noarch
perl-XML-SAX-1.02-1.1.noarch
perl-HTML-Tagset-3.20-73.10.noarch
perl-Test-Exception-0.430000-1.9.noarch
perl-URI-1.76-1.4.noarch
perl-XML-XPath-1.44-1.5.noarch
perl-Devel-Symdump-2.18-1.7.noarch
perl-Algorithm-Diff-1.1903-1.13.noarch
perl-List-MoreUtils-XS-0.428-1.7.x86_64
perl-Error-0.17028-1.1.noarch
perl-Crypt-SmbHash-0.12-158.11.x86_64
perl-HTTP-Cookies-6.04-1.6.noarch
perl-Parse-RecDescent-1.967015-1.8.x86_64
perl-Data-Dump-1.23-1.10.noarch
perl-Params-Util-1.07-9.20.x86_64
perl-MailTools-2.21-1.1.noarch
perl-CPAN-Changes-0.400002-2.6.noarch
perl-File-Which-1.23-1.4.noarch
perl-Cpanel-JSON-XS-4.12-1.2.x86_64
perl-XML-Parser-2.44-2.1.x86_64
perl-File-ShareDir-1.112-1.4.noarch
perl-IO-HTML-1.001-1.10.noarch
perl-Sort-Naturally-1.03-5.12.noarch
perl-Digest-SHA1-2.13-19.20.x86_64
perl-HTTP-Date-6.02-9.10.noarch
perl-Devel-StackTrace-2.04-1.2.noarch
perl-IO-Socket-SSL-2.066-2.2.noarch
perl-TimeDate-2.30-1.5.noarch
perl-XML-Dumper-0.81-69.10.x86_64
perl-Win-Hivex-1.3.18-1.2.x86_64
perl-Module-Build-0.422900-1.3.noarch
perl-apparmor-2.13.3-1.2.x86_64
perl-Term-ReadKey-2.38-1.2.x86_64
perl-Digest-HMAC-1.03-20.11.noarch
perl-String-ShellQuote-1.04-6.5.noarch
perl-Tk-804.034-1.9.x86_64
perl-HTML-Parser-3.72-1.18.x86_64
perl-Bootloader-0.925-1.1.x86_64
perl-Carp-Clan-6.07-1.5.noarch
perl-5.28.1-3.3.x86_64
perl-Test-Trap-0.3.4-1.5.noarch
perl-Net-DBus-1.1.0-1.21.x86_64
perl-Net-SMTP-SSL-1.04-1.7.noarch
perl-libwww-perl-6.39-1.3.noarch
perl-XML-Twig-3.52-1.8.noarch
perl-DBD-SQLite-1.64-1.1.x86_64
perl-Readonly-2.05-1.8.noarch
perl-gettext-1.07-1.30.x86_64
perl-Net-HTTP-6.19-1.3.noarch
perl-Test-Pod-Coverage-1.10-3.11.noarch
perl-X11-Protocol-0.56-14.10.x86_64
perl-Exporter-Tiny-1.002001-1.4.noarch
perl-SNMP-5.8-3.1.x86_64
perl-Term-ReadLine-Gnu-1.36-1.4.x86_64
perl-DBI-1.642-1.6.x86_64
perl-X500-DN-0.29-108.10.x86_64
perl-Sys-Guestfs-1.38.0-10.1.x86_64
perl-XML-SAX-Expat-0.51-4.4.noarch
perl-X11-Protocol-Other-31-1.1.x86_64
perl-Try-Tiny-0.30-1.5.noarch
perl-Exception-Class-1.44-1.5.noarch
perl-List-MoreUtils-0.428-1.5.noarch
subversion-perl-1.12.2-2.1.x86_64
perl-Net-SSLeay-1.88-1.3.x86_64
perl-HTTP-Negotiate-6.01-9.11.noarch
perl-LWP-Protocol-https-6.07-1.4.noarch
perl-Sub-Uplevel-0.2800-1.4.noarch
perl-Capture-Tiny-0.48-1.5.noarch
perl-XML-LibXML-2.0134-1.4.x86_64
perl-Pod-Coverage-0.23-5.12.noarch
perl-Digest-MD4-1.9-5.21.x86_64
perl-Image-ExifTool-11.50-1.1.noarch
perl-File-Listing-6.04-9.11.noarch
perl-LWP-MediaTypes-6.04-1.3.noarch
perl-libintl-perl-1.31-1.6.x86_64
perl-IO-Tty-1.12-1.22.x86_64
perl-WWW-RobotRules-6.02-9.11.noarch
perl-HTTP-Daemon-6.06-1.1.noarch
perl-XML-NamespaceSupport-1.12-1.7.noarch
perl-Class-Inspector-1.36-1.1.noarch
perl-Class-Data-Inheritable-0.08-77.10.noarch
perl-File-RandomAccess-11.50-1.1.noarch
perl-Encode-Locale-1.05-1.10.noarch
perl-File-Slurp-9999.28-1.1.noarch
perl-Bit-Vector-7.4-1.22.x86_64
perl-Expect-1.35-1.6.noarch
perl-Test-Pod-1.52-1.5.noarch
perl-XML-Simple-2.25-1.5.noarch
perl-Config-Crontab-1.45-1.7.noarch
perl-HTTP-Message-6.18-1.4.noarch
perl-XML-SAX-Base-1.09-1.8.noarch
yast2-perl-bindings-4.1.0-1.5.x86_64
perl-Date-Calc-6.4-1.10.noarch
duncs commented 4 years ago

I have tested this on 5.30.0 and it worked without issue using default options.

Are you using any command line switches? Have you made any changes to files under ~/.clusterssh/?

madworm commented 4 years ago

Not that I remember.

I've only created /etc/clusters like so:

test-cluster root@localhost [etc etc]

etfiat commented 4 years ago

Now fails on Debian testing...

Tk::Error: Can't locate object method "resolve_names" via package "App::ClusterSSH::Window" at /usr/share/perl5/App/ClusterSSH/Window/Tk.pm line 357.
 App::ClusterSSH::Window::Tk::add_host_by_name at /usr/share/perl5/App/ClusterSSH/Window/Tk.pm line 357
 App::ClusterSSH::Window::Tk::__ANON__ at /usr/share/perl5/App/ClusterSSH/Window/Tk.pm line 1746
 Tk callback for .#menu.#menu#hosts
 Tk::__ANON__ at /usr/lib/x86_64-linux-gnu/perl5/5.30/Tk.pm line 251
 Tk::Menu::Invoke at /usr/lib/x86_64-linux-gnu/perl5/5.30/Tk/Menu.pm line 532
 <ButtonRelease>
 (command bound to event)
duncs commented 4 years ago

I'll see if I can replicate

duncs commented 4 years ago

Installed debian-testing using netinst image downloaded today installed all prereq's using apt as root:

apt install build-essential libmodule-build-perl
apt install libtk-perl libx11-protocol-perl libdata-dump-perl libfile-which-perl libtest-trap-perl
apt install libxml-simple-perl libsort-naturally-perl libexception-class-perl libtest-differences-perl
apt install apt install libexception-class-perl libtest-differences-perl libx11-protocol-other-perl

As my own user extract tarball, build and test

tar zvfx App-ClusterSSH-4.14.tar.gz
cd App-ClusterSSH-4.14/
perl ./Build.PL
./Build
./Build test

no errors

t/00-load.t .............. ok   
t/01l10n.t ............... ok   
t/02base.t ............... ok     
t/05getopts.t ............ ok     
t/10host.t ............... ok      
t/15config.t ............. ok     
t/20helper.t ............. ok    
t/30cluster.t ............ ok    
t/80clusterssh.t ......... ok   
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/boilerplate.t .......... ok   
t/changes.t .............. skipped: Author tests not required for installation
t/pod-coverage.t ......... skipped: Test::Pod::Coverage 1.08 required for testing POD coverage
t/pod.t .................. skipped: Test::Pod 1.22 required for testing POD
t/range.t ................ ok     
All tests successful.

can run bin/cssh without error and the console window opens as expected.

Any ideas what I am doing differently to you?

etfiat commented 4 years ago

All looks ok, but the crash ocurs when I try to open an ssh session.

etfiat commented 4 years ago

I have news...

Only fails from menu, commandline works great!! $ clusterssh ceph Opening to: cephadm@10.0.13.51 cephadm@10.0.13.52 cephadm@10.0.13.53 cephadm@10.0.13.54 cephadm@10.0.13.55 cephadm@10.0.13.56 cephadm@10.0.65.120 cephadm@10.0.65.121

Selecting ceph from Hosts/Add Host(s) or Cluster(s): Tk::Error: Can't locate object method "resolve_names" via package "App::ClusterSSH::Window" at /home/user/test/clusterssh-master/bin/../lib/App/ClusterSSH/Window/Tk.pm line 349. App::ClusterSSH::Window::Tk::add_host_by_name at /home/user/test/clusterssh-master/bin/../lib/App/ClusterSSH/Window/Tk.pm line 349 App::ClusterSSH::Window::Tk::ANON at /home/user/test/clusterssh-master/bin/../lib/App/ClusterSSH/Window/Tk.pm line 1746 Tk callback for .#menu.#menu#hosts Tk::ANON at /usr/lib/x86_64-linux-gnu/perl5/5.30/Tk.pm line 251 Tk::Menu::Invoke at /usr/lib/x86_64-linux-gnu/perl5/5.30/Tk/Menu.pm line 532

(command bound to event)
tmancill commented 4 years ago

@duncs If it helps, (a) I can reproduce the problem on Debian testing and unstable, and (b) the problem doesn't occur after reverting back to 4.13.2. It is worth noting that Debian didn't pick up 4.13.2_01 or 4.13.2_02, so the full changeset is release-4.13.2...v4.14.

When reproduce the steps in https://github.com/duncs/clusterssh/issues/123#issuecomment-595147651 and run ./bin/cssh from the resulting build, I get the same error as reported when I try to add a host using the "Hosts -> Add Host(s) or Cluster(s)" menu option or the Control-Shift-plus hotkey combination.

I will continue to try to tracking this down in Debian bug #960127. My gut is that something about the refactoring between these releases causes this.

update - it appears that you are in the process of releasing 4.15 while I was looking this. Thank you!

tmancill commented 4 years ago

https://github.com/duncs/clusterssh/commit/276cab701468c461c49bcc9f8e4df5a4cd02e415 resolves the issue for the Debian packaging - thanks!

duncs commented 4 years ago

I have (finally) released 4.15 which fixes this issue. Thanks.

madworm commented 4 years ago

I'm still getting very much the same error, just for line 359.

clusterssh-4.15-2.1.noarch

FredNass commented 4 years ago

I'm also seeing this since upgrading to Fedora 32, with clusterssh-4.15-1.fc32.noarch.

Tk::Error: Can't locate object method "resolve_names" via package "App::ClusterSSH::Window" at /usr/share/perl5/vendor_perl/App/ClusterSSH/Window/Tk.pm line 360. App::ClusterSSH::Window::Tk::add_host_by_name at /usr/share/perl5/vendor_perl/App/ClusterSSH/Window/Tk.pm line 360 App::ClusterSSH::Window::Tk::ANON at /usr/share/perl5/vendor_perl/App/ClusterSSH/Window/Tk.pm line 1751 Tk callback for .#menu.#menu#hosts Tk::ANON at /usr/lib64/perl5/vendor_perl/Tk.pm line 251 Tk::Menu::Invoke at /usr/lib64/perl5/vendor_perl/Tk/Menu.pm line 532

(command bound to event)
antofthy commented 4 years ago

Same error on fc31 version which is clusterssh-4.14-1.fc31

It works fine when starting, eg cssh host host host only fails for 'add hosts'

duncs commented 4 years ago

I have just uploaded 4.16 to CPAN - please try it out to ensure it resolves your problem

http://search.cpan.org/~duncs/App-ClusterSSH-v4.16

FredNass commented 4 years ago

Hello Duncan, it works! Thanks. :clap: (link to 4.16)