Sunday, September 29, 2013

CSSH on MacOS X 10.8+

I assume that you've already known what CSSH (or ClusterSSH in formal) is. In short, it is a way for control many Unix/Linux boxes in parallel in the same way.

I always use CSSH on my Fedora box at work, but this is the first time I have to use it at my home to control my cluster. And my laptop's operating system is Mac OS X 10.8. That is the problem.

Installation of CSSH on Mac OS X seems to be simple. If you want to do it in a lazy way like me, use port.

sudo port install cssh

Then, you try to connect to some host, for example.

cssh root@somehost

It should works well??? Oh no, some strange error message occur like the one as follows.

Can't connect to display `tmp/launch-P6rxkT/org.macosforge.xquartz:0': Invalid argument at /opt/local/lib/perl5/vendor_perl/5.12.4/X11/Protocol.pm line 2270

If you open file Protocol.pm and go to line number 2270, you will see that it try to use INETSocket (wrong) instead of UNIXSocket (right). That is because $host is not equal to "unix". Now you have to change something here to let it use UNIXSocket by checking whether $host contains "xquartz" or not. You change the line number 2262 (the IF command before the error line) from

if ($host eq 'unix') {

to

if ($host eq 'unix' || index($host, "xquartz") != -1) {

(Ahh, that's the error of Perl 5.12.4 distribution of  Mac Ports.)

That's all. Let's try again and see everything goes well.

2 comments:

jowe said...

really i love this great work to share good post MacOS Seirra download iso i love this website is great and working helping site

Data Science Course in Bangalore said...

I was very happy to find this site. I really enjoyed reading this article today and think it might be one of the best articles I have read so far. I wanted to thank you for this excellent reading !! I really enjoy every part and have bookmarked you to see the new things you post. Well done for this excellent article. Please keep this work of the same quality.
Data Science Course in Bangalore