Rsync problem; connection refused

I was trying to rsync over some content between two linux servers (RHE5) at the office, and I kept getting:


servername: Connection refused
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)

It was driving me batty. Rsync was set up on both servers, I could rsync from my workstation to either of them just fine. What was the problem rsync’ing between them??

I found excellent info in this ServerFault answer:

Try verbose mode in rsync by adding -vvv to see where it is failing.

Are you using a very old version of rsync that doesn’t default to using ssh (older than 2.6.0)? If so, try adding -e ssh to force ssh mode.
Phil Hollenback

I used the '-vvv' option to get very verbose output when I tried the command. And, ah ha! It was trying to use rsh for the connection.

Getting it to work was just a matter of adding the option '-e ssh' after my other options, and it worked!

(I’m going to start writing posts documenting problems I ran into, and how I fixed them. It helps me remember, and maybe could help others.)

Installing/upgrading Firefox in a Linux environment

This is pretty simple, but I wanted to write up how to install/upgrade Firefox manually, in a Linux environment.

First thing that was tricky is, where is the “proper” place to install it? There is much debate on this point still, but I believe that installing to the /opt directory seems to make the most sense.

So we’ve downloaded the Firefox version we want to install:

[text]firefox-7.0.1.tar.bz2[/text]

It is sitting in a directory:

[text]/home/tim/downloads/[/text]

I open up a terminal and type:

[text]sudo tar -jxvf /home/tim/downloads/firefox-7.0.1.tar.bz2 -C /opt/[/text]

What is this command? Let’s break it down:

  • sudo – “The following commands we are going to run as super user”, necessary for putting things in the opt directory.
  • tar -jxvf – The tar program is what can compress and uncompress archives. We are using the options jxvf
    • j – the compression method that was used is bzip2
    • x – We are going to be extracting the archive.
    • v – We want the output to be verbose, so we’ll see every file extracted.
    • f – We are going to tell it the file to extract.
  • /home/tim/downloads/firefox-7.0.1.tar.bz2 – The full path to the Firefox archive we are going to be installing.
  • -C /opt/ – We want to specify the directory /opt/ as where it is going to be extracted to.

Then, bam Firefox should be extracted to the /opt/firefox directory. Then what do we need to do? Well, depending on your Linux distribution, you need to add a shortcut to that to your menu somewhere, so it’s easy to get to. The program the shortcut should point to is:

[text]/opt/firefox/firefox[/text]

UPGRADE: For upgrading your Firefox install you have in the /opt/ dir, you do the exact same thing. 🙂

Now I don’t have to spend the 1 min remembering how to do this every time a new version of Firefox comes out. Hope it helps others.