256
Logo

Cssh (Cluster SSH) Can't Read Perl Error

So I was having problems running the cool Cluster SSH script under Ubuntu Dapper. Specifically, I was running clusterssh version 3.18.1-1ubuntu2 with libx11-protocol-perl version 0.54-2.

The problem I was seeing was something like the following message with no other information -- even in debug mode.

Can't read: at /usr/share/perl5/X11/Protocol.pm line 2303

The problem turned out to be actually on line 2306 with the importing of X11::Auth and a bug in that module. Here's a patch which fixes the problem:

*** /usr/share/perl5/X11/Auth.pm.ORG	Thu Sep 14 12:20:30 2006
--- /usr/share/perl5/X11/Auth.pm	Thu Sep 14 13:28:30 2006
***************
*** 56,71 ****
      push @a, $type;
  
      $x = unpack("n", $self->read(2)); # Address
!     push @a, $self->read($x);
  
      $x = unpack("n", $self->read(2)); # Display `number'
!     push @a, $self->read($x);
  
      $x = unpack("n", $self->read(2)); # Authorization name
!     push @a, $self->read($x);
  
      $x = unpack("n", $self->read(2)); # Authorization data
!     push @a, $self->read($x);
  
      return @a;
  }
--- 56,71 ----
      push @a, $type;
  
      $x = unpack("n", $self->read(2)); # Address
!     push @a, ($x == 0 ? "" : $self->read($x));
  
      $x = unpack("n", $self->read(2)); # Display `number'
!     push @a, ($x == 0 ? "" : $self->read($x));
  
      $x = unpack("n", $self->read(2)); # Authorization name
!     push @a, ($x == 0 ? "" : $self->read($x));
  
      $x = unpack("n", $self->read(2)); # Authorization data
!     push @a, ($x == 0 ? "" : $self->read($x));
  
      return @a;
  }

Basically, this perl module is trying to read your .Xauthority file in your home directory, and was trying to do a read of 0 bytes on one of the fields which it was not handling appropriately.

Hope this helps.

Free Spam Protection   Eggnog Recipe   Android ORM   Simple Java Magic   JMX using HTTP   OAuth 2.0 Simple Example   Great Eggnog Recipe