BOINC-AUSTRALIA FORUM

Members Only => ALL ABOUT HARDWARE => ALL THINGS LINUX => Topic started by: NudgeyNR on March 25, 2023, 12:53:58 PM

Title: Problems running Boinc
Post by: NudgeyNR on March 25, 2023, 12:53:58 PM
Recently installed Kubuntu as a VM and then installed Boinc through a package manager.

When i run boinc i get a chdir error, i proceeded to investigate and discovered that it needs to be run with sudo privileges.

Why is it not doing this itself ?

How do i make it run with sudo privileges ?

Also been trying to get it to autorun on startup.
Title: Re: Problems running Boinc
Post by: Dark Angel on March 25, 2023, 03:19:10 PM
By rights it should have started automatically once you installed it, then you manage it using the Boinc Manager application (boincmgr).  The client should start automatically as a service on boot.
Title: Re: Problems running Boinc
Post by: Dingo on March 25, 2023, 06:59:26 PM
I had problems as well with privileges.  This fixed the problem for me.

Run these commands from a Terminal window

sudo systemctl start boinc-client  // This just starts boinc

top  // this will show the running processes to see if tasks are running.

If they are then you should be able to run BOINC Manager from the gui but if it does not start use the following.


cd /usr/bin

./boincmgr

When running these command note any error messages.  If all went well and no error messages on reboot just run sudo systemctl start boinc-client

I still run mine manually as it does not start on reboot.  Should look into it but it is in a VirtualBox and I start that up manually so just one more step to start BOINC.

Let me know how you go.





Title: Re: Problems running Boinc
Post by: NudgeyNR on March 26, 2023, 02:20:11 PM
Quote from: Dingo on March 25, 2023, 06:59:26 PMI had problems as well with privileges.  This fixed the problem for me.

Run these commands from a Terminal window

sudo systemctl start boinc-client  // This just starts boinc

top  // this will show the running processes to see if tasks are running.

If they are then you should be able to run BOINC Manager from the gui but if it does not start use the following.


cd /usr/bin

./boincmgr

When running these command note any error messages.  If all went well and no error messages on reboot just run sudo systemctl start boinc-client

I still run mine manually as it does not start on reboot.  Should look into it but it is in a VirtualBox and I start that up manually so just one more step to start BOINC.

Let me know how you go.







Boinc runs but no wu's start when i start the service.

Boincmgr needs sudo to run aswell

Boinc does not run automatically after being installed.
Title: Re: Problems running Boinc
Post by: Dark Angel on March 26, 2023, 08:59:47 PM
What command did you use to install?

Sudo apt-get install boinc boinc-client boinc-manager ?
Title: Re: Problems running Boinc
Post by: tazzduke on March 26, 2023, 11:09:06 PM
Hi NudgeyNR

Might I suggest you spin up a VM running Linux Mint 20.2, here is the download link

https://linuxmint.com/download_all.php (https://linuxmint.com/download_all.php)

I installed it via the Synaptic program.

Either that, can you please tell us

Kubuntu Version
Kernel Version
Boinc Version

Also can you tell us the owner and group, do a ll command on /var/lib/boinc, which will give you all the details
Title: Re: Problems running Boinc
Post by: NudgeyNR on March 28, 2023, 10:39:44 PM
Quote from: tazzduke on March 26, 2023, 11:09:06 PMHi NudgeyNR

Might I suggest you spin up a VM running Linux Mint 20.2, here is the download link

https://linuxmint.com/download_all.php (https://linuxmint.com/download_all.php)

I installed it via the Synaptic program.

Either that, can you please tell us

Kubuntu Version
Kernel Version
Boinc Version

Also can you tell us the owner and group, do a ll command on /var/lib/boinc, which will give you all the details

I used Discover Software Center on Kubuntu 21.10.

Kernel versiio - 5.19.0-38-generic.

Boinc version - 7.20.5

ll - lrwxrwxrwx 1 boinc boinc 12 Sep 13  2022 /var/lib/boinc -> boinc-client/

I hope that is everything.
Title: Re: Problems running Boinc
Post by: ryzenmulti on March 29, 2023, 06:06:34 AM
Maybe it is where you are installing it from (the folder you run from when installing boinc). Is it desktop or some other? Where you a user or admin/root when you installed it?

I know on Manjaro Linux it matters where I installed Boinc from (arch linux uses pacman package manager) and make sure I am the user, not root. For simplicity I use the user home folder (cd ~) when I run 'sudo pacman -S boinc' and boinc project folders all get installed from there. If I installed from the desktop folder, then I'd have to run it from there. If you were the root user then there are issues with file ownership.

Always running from the folder I installed from creates no issues on arch.
Title: Re: Problems running Boinc
Post by: tazzduke on March 29, 2023, 07:57:04 AM
Hi NudgeyNR

Thats a start, will do some further digging and see what I can come up with for you.

Cheers
Title: Re: Problems running Boinc
Post by: tazzduke on March 29, 2023, 11:10:56 PM
Good Evening NudgeyNR

Well I went and spun up a Kubuntu 22.10
Completed the updates,
I installed the boinc software, using the muon package manager.

Need to add the normal user to the sudoers file, before it can do sudo commands.
To do this
Open up a Konsole and switch to root by doing the following.
Type in SU and press enter
It will ask for a password, this is normally the same one that you log in with.
Then enter the follwoing command
usermod -aG sudo username (username is the name of the normal user for the machine)
Once this has been done, reboot the machine.

Now you should be able to complete the following successfully.

Then you will need to do the following - in a normal user console.

1. start boinc service

sudo systemctl start boinc-client.service

2. to add user to boinc group

sudo /usr/sbin/usermod -G boinc -a $(whoami)

3. add read/write permission to

sudo chmod g+rw /var/lib/boinc

4.  symlink as per Berkeley

ln -s /var/lib/boinc/gui_rpc_auth.cfg /home/username/gui_rpc_auth.cfg

"Where username is the actual username for the user of that machine"

Logout (or reboot) and log back in.

5.  Start Client Service

sudo systemctl start boinc-client.service

6. Auto start the service on boot

sudo systemctl enable boinc-client.service.

FInd your BOINC shortcut in the menu and double click on it.

Hope this got you going, as it worked for me.

Oops forgot to add, if this has worked for you, next is to get the actual boinc-client to autostart on boot

goto application launcher
goto settings
goto system settings
select startup and shutdown
select autostart
select add (to add an application)
select system
select boinc
select ok

Now we should be all good and up and running.

Let me know how it goes. also allow for a bit of time difference and work schedule.

Regards

PS.  Edited due spelling errors and also we were dealing with Kubuntu 22.10 which is different to Kubuntu 22.04.
Title: Re: Problems running Boinc
Post by: ryzenmulti on March 30, 2023, 12:41:32 AM
Quick question - is a shortcut to enable a service to start on boot the following?
sudo systemctl enable boinc
Title: Re: Problems running Boinc
Post by: tazzduke on March 30, 2023, 07:55:48 AM
Quote from: ryzenmulti on March 30, 2023, 12:41:32 AMQuick question - is a shortcut to enable a service to start on boot the following?
sudo systemctl enable boinc

This is the command to autostart the boinc service on boot (not the client though)
sudo systemctl enable boinc-client.service
Title: Re: Problems running Boinc
Post by: NudgeyNR on March 31, 2023, 10:42:18 PM
Everything works with no errors until i try and create the symlink.

I get the error - ln: failed to create symbolic link '/home/boinc-4/gui_rpc_auth.cfg': File exists

I haven't gone any further that that as yet.
Title: Re: Problems running Boinc
Post by: NudgeyNR on March 31, 2023, 10:55:50 PM
Also he is a link to Kubuntu 22.10.

https://cdimage.ubuntu.com/kubuntu/releases/22.10/release/kubuntu-22.10-desktop-amd64.iso (https://cdimage.ubuntu.com/kubuntu/releases/22.10/release/kubuntu-22.10-desktop-amd64.iso)
Title: Re: Problems running Boinc
Post by: tazzduke on April 01, 2023, 10:27:48 AM
Okay, error is saying link exists, try going on with the next steps.
Title: Re: Problems running Boinc
Post by: tazzduke on April 03, 2023, 08:40:01 PM
Also let us know how you went.

Title: Re: Problems running Boinc
Post by: NudgeyNR on April 04, 2023, 09:35:24 AM
Tried the rest of the commands and it did not work.

Still have to manually run it via a sudo command.
Title: Re: Problems running Boinc
Post by: tazzduke on April 04, 2023, 04:45:34 PM
Hi NudgeyNR

which command do you have to run as sudo??

On another note, you could also spin up another VM running Kubuntu 22.04 and then do the instructions (if you have the time or energy), cause it could be something to do with Kubuntu 22.10.

Regards

Title: Re: Problems running Boinc
Post by: tazzduke on April 04, 2023, 06:25:24 PM
Bugger, its something to do with the extra security they implemented in Kubuntu 22.10.

I installed a fresh VM of Kubuntu 22.10, installed Boinc, via the package manager.
Then I had to do the following steps as well, this was after trying to start the boinc.client service.  it told me my user was not in the sudoers file.

Add the normal user to the SUDO group by doing the following
Type SU in a konsole, this will switch to the Root, (should be the same password you use to login with)
Type in the following command usermod -aG sudo username (where username is the name of the user)
reboot the system.

That should fix it.  I managed to get BOINC up and running on a Kubuntu 22.10 VM / BOINC Version 7.20.2

Regards
Title: Re: Problems running Boinc
Post by: NudgeyNR on April 04, 2023, 11:57:13 PM
Quote from: tazzduke on March 29, 2023, 11:10:56 PMGood Evening NudgeyNR

Well I went and spun up a Kubuntu 22.10
Completed the updates,
I installed the boinc software, using the muon package manager.

Need to add the normal user to the sudoers file, before it can do sudo commands.
To do this
Open up a Konsole and switch to root by doing the following.
Type in SU and press enter
It will ask for a password, this is normally the same one that you log in with.
Then enter the follwoing command
usermod -aG sudo username (username is the name of the normal user for the machine)
Once this has been done, reboot the machine.

Now you should be able to complete the following successfully.

Then you will need to do the following - in a normal user console.

1. start boinc service

sudo systemctl start boinc-client.service

2. to add user to boinc group

sudo /usr/sbin/usermod -G boinc -a $(whoami)

3. add read/write permission to

sudo chmod g+rw /var/lib/boinc

4.  symlink as per Berkeley

ln -s /var/lib/boinc/gui_rpc_auth.cfg /home/username/gui_rpc_auth.cfg

"Where username is the actual username for the user of that machine"

Logout (or reboot) and log back in.

5.  Start Client Service

sudo systemctl start boinc-client.service

6. Auto start the service on boot

sudo systemctl enable boinc-client.service.

FInd your BOINC shortcut in the menu and double click on it.

Hope this got you going, as it worked for me.

Oops forgot to add, if this has worked for you, next is to get the actual boinc-client to autostart on boot

goto application launcher
goto settings
goto system settings
select startup and shutdown
select autostart
select add (to add an application)
select system
select boinc
select ok

Now we should be all good and up and running.

Let me know how it goes. also allow for a bit of time difference and work schedule.

Regards

PS.  Edited due spelling errors and also we were dealing with Kubuntu 22.10 which is different to Kubuntu 22.04.

After the new change(s) everything is working as it should.

I had to redo all the commands then reboot.

Thanks for your time and effort tazzduke much appreciated.
Title: Re: Problems running Boinc
Post by: tazzduke on April 05, 2023, 06:54:36 AM
You are welcome NudgeyNR

I have to redo my Kubuntu install again, I didn't give it enough hard drive space lol.

Cheers
Title: Re: Problems running Boinc
Post by: tazzduke on June 06, 2023, 09:23:43 PM
Gday Lennox84

I found the information on the following link, which also helped getting a Fedora Workstation running boinc here last year.

https://www.overclock.net/threads/guide-installing-boinc-on-fedora-25-and-fedora-26-fedora-27.1633927/ (https://www.overclock.net/threads/guide-installing-boinc-on-fedora-25-and-fedora-26-fedora-27.1633927/)

Don't worry about the title, it should be fine with the latest version of Fedora.

Cheers
Title: Re: Problems running Boinc
Post by: tazzduke on June 07, 2023, 09:02:03 PM
Glad to hear Lennox84

I prefer Linux Mint myself, have tried a plethora of distributions except anything ARCH related.

Back in the days of running Seti, I just found Linux Mint came easy to me thats all.

Nowadays I run Linux Mint 20.2, cause it lets me run certain apps from LHC@Home.

Cheers
Title: Re: Problems running Boinc
Post by: Dingo on June 09, 2023, 04:40:16 PM
I just use the version of BOINC on Ubuntu.  sudo apt update sudo apt install boinc

A long time ago in 2003 I used to create my own BOINC to fit the Linux machine I had at the time.  I think this script may still work Or you can use it as a reference.

If you are using Ubuntu then BOINC is installed to /usr/bin and not in /opt/boinc.  Save as a file like loadboinc.sh and chmod +x loadboinc.sh

I have attached the file as a txt file as it would not let me paste the code into the message.



[attachment deleted by admin]
Title: Re: Problems running Boinc
Post by: Dark Angel on June 09, 2023, 07:56:50 PM
By default Boinc will only allow manager access from the local host.  To access it from another machine you either need to allow it universally in the cc_config.xml file (not reccommended for security reasons) or put the remote host's IP address or device name (if you have local name resolution)in the remote_hosts.cfg file.

The default content of the file looks like this:
# This file contains a list of hostnames or IP addresses (one per line)
# of remote hosts, that are allowed to connect and to control the local
# BOINC core client via GUI RPCs.
# Lines beginning with a # or a ; are treated like comments and will be
# ignored.
#
#host.example.com
#192.168.0.180

Personally I use IP addresses but I use static IPs for my crunchers and only one can access the others.
Title: Re: Problems running Boinc
Post by: Dingo on June 09, 2023, 08:50:44 PM
I and a few others use BOINC Tasks (https://efmer.com/boinctasks/download-boinctasks/) as you can set it up to see all your computers in one place and have all the functionality of BOINC Manager and much more.

You need the IP address and the password.  The password ins in the BOINC folder file called gui_rpc_auth.xml



[attachment deleted by admin]
Title: Re: Problems running Boinc
Post by: Dingo on June 09, 2023, 09:12:55 PM
Quote from: Lennox84 on June 09, 2023, 09:09:37 PM
Quote from: Dingo on June 09, 2023, 08:50:44 PMI and a few others use BOINC Tasks (https://efmer.com/boinctasks/download-boinctasks/) as you can set it up to see all your computers in one place and have all the functionality of BOINC Manager and much more.

You need the IP address and the password.  The password ins in the BOINC folder file called gui_rpc_auth.xml



But for this to work I'll need the solution from Dark Angel setup 1st right? or does BoincTasks circumvent that??

Don't get me wrong I like the look of it and will definitely look at it, but with my current problem, it would seem my Boinc installs aren't set up for remote access because the --allow_remote_gui_rpc option is not set so BoincTasks wouldn't have access if I'm understanding right.



You don't need to setup remote gui rpc as BoincTasks will connect if it has the IP and Password.  Boinc does need to be started on the remote machine for it to work.
Title: Re: Problems running Boinc
Post by: Dark Angel on June 09, 2023, 09:52:52 PM
On the Ubuntu server, assuming you installed from teh repositories, the file where that option is permanently set is:

/var/lib/boinc-client/cc_config.xml

You need to either be su or run your editor with sudo to edit it.

Scroll through it and you'll see a heap of options.
Title: Re: Problems running Boinc
Post by: Dark Angel on June 10, 2023, 07:02:51 AM
AHhh yes.  The ones in /var/lib/boinc-client are also links to the others.  I just checked my server install to see what was going on as I always access them from the directory I gave you and never noticed they are links.
Title: Re: Problems running Boinc
Post by: Dark Angel on June 10, 2023, 07:03:52 AM
These 403 error pages when I try to post legitimate content are getting very frustrating
Title: Re: Problems running Boinc
Post by: Dark Angel on July 12, 2023, 12:56:39 PM
Quote from: Lennox84 on July 12, 2023, 11:54:52 AMHas anyone successfully run Boinc flatpak with GPU crunching...?

Can't seem to run repo Boinc on Fedora 38 (Maybe building myself would be better as it seems likely a permissions issue but a bit above my Linux knowledge)

The flatpack works for CPU crunching no problem but it won't crunch on my AMD 5700xt (I had the flatpak on an old M4600 with an Nvidia m200 and it ran CPU and GPU no problem, but it was an ubuntu derivative hence my thoughts on Fedora being overly protective). It can see the GPU in the event log but it has computation errors and fails.

I don't know if I want to move to Ubuntu as my main distro but I'm pretty invested in building out a solid crunching farm and this issue is stopping my big rig to come only :-(

As always, all help is appreciated.
You need to be running the proprietary GPU drivers to be able to use them for crunching.  The open source ones just don't include the OpenCL/CUDA capability.