Wednesday, December 25, 2013

Ensure BOINC Manager Connects to BOINC Client After Upgrade

I've been using Crunchbang 11 for a short while. A Debian (stable) -based GNU/Linux distribution, it has given new life to my 4 year old Intel Atom-based netbook.

I started helping out again in the projects of the World Community Grid (my last contribution was in September 2008). To donate computing time, you will need to install the BOINC package from the Debian repositories.

I have been content with the 7.0.27 version from the wheezy stable repo. Then I learned about upgrading packages using wheezy backports. It worked so well with LibreOffice and new kernels, I thought to myself why not update BOINC too?

So I did an
apt-get install -t wheezy-backports boinc --no-install-recommends
And everything went fine. Or so I thought.

When I tried to start the BOINC Manager using boincmgr, the project I joined didn't show up at all. Efforts to connect to localhost using the "Advanced --> Select computer..." menu didn't work.

htop still shows the individual tasks running at the background, so BOINC Client is working. The weird thing is that when you run "boinc" in a terminal, the data directory is my /home directory instead of the /var/lib/boinc-client that is specified during installation. The weirder thing is the last lines of output that show up:
25-Dec-2013 06:35:13 [---] GUI RPC bind to port 31416 failed: 98
gstate.init() failed
Error Code: -180

Running boinccmd in a terminal with any options (e.g. --get_state) will output "Authorization failure: -155".

I guess the new installs are configured like The Berkeley Installer where all the data will reside in the /home directory. I might be wrong, though.


I spent a good hour installing, uninstalling and reinstalling both stable and backported versions of BOINC. Still did not regain control of boinc-client through BOINC Manager.

Boinccmd and BOINC Manager both accepts the string inside the /etc/boinc-client/gui_rpc_auth.cfg as the password. When I looked at the file it was empty, so I deleted it and rebooted. There might be a more elegant way to regenerate the file (like restarting the boinc-client service) though.

Before I tried to upgrade to 7.0.65, invoking boincmgr without any other arguments will start BOINC Manager and automatically load up my data from /var/lib/boinc-client.

Now, whenever I want to run BOINC Manager and have it connect to boinc-client, I will need to input this everytime:

boincmgr --datadir=/var/lib/boinc-client --namehost=localhost --password=string-in-/etc/boinc-client/gui_rpc_auth.cfg

Fortunately Openbox has a customizable menu so I configured a Menu Item that will execute this command string. BOINC Manager is back with my tasks!