trying to setup folding at home on ubuntu with fahcontrol

Moderators: Site Moderators, FAHC Science Team

trying to setup folding at home on ubuntu with fahcontrol

Postby helloeverything » Fri Jul 23, 2021 5:27 pm

So I am trying to setup a folding at home client on a Ubuntu server PC and then connect to it from a windows 10 PC with fahcontrol. However when I installed folding at home on the Ubuntu PC it gave this error message when installing
Code: Select all
Failed to enable unit: Unit /run/systemd/generator.late/FAHClient.service is transient or generated.

so I have no clue what that means and the only other person having the same issue on the forums no one responded to their post.
So now I can start folding at home with the command FAHClient however when starting it says
Code: Select all
15:32:53:ERROR:Exception: Could not bind socket to 0.0.0.0:7396: Address already in use
15:32:53:ERROR:Exception: Could not bind socket to 0.0.0.0:36330: Address already in use
So I assume that means that folding at home is already running however I cannot connect to it with fahcontrol on my main PC it just says connecting.
I have been trying to edit the config.xml and I found a guide on how to do that but i cant post urls so I have followed that but when i try to change the config to what is in the tutorial and try to restart it with /etc/init.d/FAHClient restart
it just says fail and when i try to run it with the command FAHClient it says
Code: Select all
15:29:42:WARNING:While updating GPUs.txt from assign4.foldingathome.org:80: Failed to open 'GPUs.txt.bak': Failed to open 'GPUs.txt.bak': Permission denied: iostream error: Permission denied
this AND THEN it says that my config.xml is not right so please i need some help i just wanna run folding at home on my server pc and control it with fah control on my main pc
helloeverything
 
Posts: 5
Joined: Fri Jul 23, 2021 1:41 am

Re: trying to setup folding at home on ubuntu with fahcontro

Postby aetch » Sat Jul 24, 2021 6:17 am

Let's see if we can get you up and running.

The "Failed to enable unit" is a red herring, ignore it.

I think you're right about FAHClient already running and throwing a "bind socket" error when you try to manually start it.

Don't restart FAHClient from the command line, it doesn't like it, instead reboot the whole computer. This ensures the FAHClient runs under the correct user account with the appropriate permissions (it's not root).

Get the ipaddress of your ubuntu machine
enter "ip a" into a terminal
this is the readout from my machine, you're looking for adapter "eth0", entry "inet". For me the value returned is 192.168.0.210
Code: Select all
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:00:f9:00 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.210/24 brd 192.168.0.255 scope global dynamic eth0
       valid_lft 6444sec preferred_lft 6444sec
    inet6 fe80::215:5dff:fe00:f900/64 scope link
       valid_lft forever preferred_lft forever


Edit your config.xml file

this is a dump of my config.xml file, obviously the passkey and user values are fake but show the correct format for the values.
Code: Select all
<config>
  <!-- Configuration -->
  <config-rotate-max v='0'/>

  <!-- HTTP Server -->
  <allow v='127.0.0.1 192.168.0.0/24'/>

  <!-- Logging -->
  <log-rotate-max v='0'/>
  <verbosity v='3'/>

  <!-- Network -->
  <proxy v=':8080'/>

  <!-- Remote Command Server -->
  <command-allow-no-pass v='127.0.0.1 192.168.0.0/24'/>

  <!-- Slot Control -->
  <pause-on-battery v='false'/>
  <pause-on-start v='true'/>
  <power v='full'/>

  <!-- User Information -->
  <passkey v='1234567890abcdef'/>
  <user v='donorname'/>

  <!-- Web Server -->
  <web-enable v='false'/>

  <!-- Folding Slots -->
  <slot id='0' type='GPU'/>
  <slot id='1' type='GPU'/>
</config>


I think with your manual edit you've probably introduced syntax errors into your config file.
I would suggest deleting your config.xml file and rebooting your computer to create a virgin config.xml file

take your ipaddress 192.168.0.210
cut the last part so it reads 192.168.0
append the following ".0/24" to it so it reads 192.168.0.0/24, this is your subnet

open your config.xml file in an editor
you're looking to add remote control to the client, you want the following entries:-
<!-- HTTP Server -->
<allow v='127.0.0.1'/>

<!-- Remote Command Server -->
<command-allow-no-pass v='127.0.0.1'/>

edit the values so they look something like this
<!-- HTTP Server -->
<allow v='127.0.0.1 192.168.0.0/24'/>

<!-- Remote Command Server -->
<command-allow-no-pass v='127.0.0.1 192.168.0.0/24'/>

reboot

on your windows 10 machine running FAHControl use the ipaddress, not the hostname, in the connection address parameters

hopefully that should get you to a place where you can connect to your ubuntu folding machine and then we can investigate any other issues your might have.
Ryzen 9 3900X, 16GB, RTX 2070 Super, Win 10 Pro, F@H 7.6.21

Image

How to post logs and other useful info
aetch
 
Posts: 250
Joined: Thu Jun 25, 2020 4:04 pm
Location: Between chair and keyboard

Re: trying to setup folding at home on ubuntu with fahcontro

Postby helloeverything » Sat Jul 24, 2021 6:22 pm

the config.xml is not regenerating when I reboot the pc however when I start it with the command fahclient which I know isnt good but it somehow finds a config somewhere else that has my username and passkey and stuff
helloeverything
 
Posts: 5
Joined: Fri Jul 23, 2021 1:41 am

Re: trying to setup folding at home on ubuntu with fahcontro

Postby aetch » Sat Jul 24, 2021 7:37 pm

A bit more digging, it appears the linux FAHClient installation is a bit disjointed. Create a config in one location but use it in another.
in a terminal you can input "find / -iname config.xml" to find all instances of the config.xml file.
The file I think you want is the one located at /var/lib/fahclient/config.xml
It would also appear that the file it recreates is so barebones it only has 4 lines to it.
I would suggest opening it an editor, clearing the contents and copying in my config and rebooting.
We can pick up the pieces later.
aetch
 
Posts: 250
Joined: Thu Jun 25, 2020 4:04 pm
Location: Between chair and keyboard

Re: trying to setup folding at home on ubuntu with fahcontro

Postby helloeverything » Sat Jul 24, 2021 11:31 pm

ok so I copied your config and now it can connect to my main pc but there is no cpu showing up and gpu is disabled. It says in the log that the gpu is disabled because it detected no cuda or open cl. Is that something that i can install easily? I googled how to install cuda on ubuntu and it says to just run sudo apt install nvidia-cuda-toolkit, will that work?
helloeverything
 
Posts: 5
Joined: Fri Jul 23, 2021 1:41 am

Re: trying to setup folding at home on ubuntu with fahcontro

Postby bikeaddict » Sun Jul 25, 2021 1:10 am

Someone has written a guide to installing on Ubuntu.

viewtopic.php?f=108&t=36830
bikeaddict
 
Posts: 46
Joined: Sun May 03, 2020 2:20 am

Re: trying to setup folding at home on ubuntu with fahcontro

Postby aetch » Sun Jul 25, 2021 6:20 am

FAH has a FAQ about setting your Name/Team/Passkey as well as adding/editing your folding slots.
https://foldingathome.org/support/faq/i ... ?lng=it-IT

GPU/cuda - now we're really getting into my lack of knowledge.
1). Cuda is specific to NVidia GPUs and won't work with AMD or Intel GPUs.
2). There are instances where GPUs don't work, I think because it needs a desktop session to access the driver.

Can you post the first few hundred lines of your log.

As an aside, I used ubuntu desktop in my own linux folding machine. I've never tested installing a graphics card on ubuntu server so my help will be limited (something about the blind leading the blind).
aetch
 
Posts: 250
Joined: Thu Jun 25, 2020 4:04 pm
Location: Between chair and keyboard

Re: trying to setup folding at home on ubuntu with fahcontro

Postby helloeverything » Sun Jul 25, 2021 3:53 pm

Ok so i got the cpu folding however the gpu is still disabled. Heres the log
Code: Select all
*********************** Log Started 2021-07-25T14:32:42Z ***********************
14:32:42:******************************* libFAH ********************************
14:32:42:       Date: Oct 20 2020
14:32:42:       Time: 20:36:39
14:32:42:   Revision: 5ca109d295a6245e2a2f590b3d0085ad5e567aeb
14:32:42:     Branch: master
14:32:42:   Compiler: GNU 8.3.0
14:32:42:    Options: -faligned-new -std=c++11 -fsigned-char -ffunction-sections
14:32:42:             -fdata-sections -O3 -funroll-loops -fno-pie
14:32:42:   Platform: linux2 5.8.0-1-amd64
14:32:42:       Bits: 64
14:32:42:       Mode: Release
14:32:42:****************************** FAHClient ******************************
14:32:42:    Version: 7.6.21
14:32:42:     Author: Joseph Coffland <joseph@cauldrondevelopment.com>
14:32:42:  Copyright: 2020 foldingathome.org
14:32:42:   Homepage: https://foldingathome.org/
14:32:42:       Date: Oct 20 2020
14:32:42:       Time: 20:39:00
14:32:42:   Revision: 6efbf0e138e22d3963e6a291f78dcb9c6422a278
14:32:42:     Branch: master
14:32:42:   Compiler: GNU 8.3.0
14:32:42:    Options: -faligned-new -std=c++11 -fsigned-char -ffunction-sections
14:32:42:             -fdata-sections -O3 -funroll-loops -fno-pie
14:32:42:   Platform: linux2 5.8.0-1-amd64
14:32:42:       Bits: 64
14:32:42:       Mode: Release
14:32:42:       Args: --child --run-as fahclient --pid-file=/var/run/fahclient.pid
14:32:42:             --daemon
14:32:42:     Config: /var/lib/fahclient/config.xml
14:32:42:******************************** CBang ********************************
14:32:42:       Date: Oct 20 2020
14:32:42:       Time: 18:37:59
14:32:42:   Revision: 7e4ce85225d7eaeb775e87c31740181ca603de60
14:32:42:     Branch: master
14:32:42:   Compiler: GNU 8.3.0
14:32:42:    Options: -faligned-new -std=c++11 -fsigned-char -ffunction-sections
14:32:42:             -fdata-sections -O3 -funroll-loops -fno-pie -fPIC
14:32:42:   Platform: linux2 5.8.0-1-amd64
14:32:42:       Bits: 64
14:32:42:       Mode: Release
14:32:42:******************************* System ********************************
14:32:42:        CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
14:32:42:     CPU ID: GenuineIntel Family 6 Model 58 Stepping 9
14:32:42:       CPUs: 8
14:32:42:     Memory: 7.73GiB
14:32:42:Free Memory: 7.22GiB
14:32:42:    Threads: POSIX_THREADS
14:32:42: OS Version: 5.4
14:32:42:Has Battery: false
14:32:42: On Battery: false
14:32:42: UTC Offset: -5
14:32:42:        PID: 1638
14:32:42:        CWD: /var/lib/fahclient
14:32:42:         OS: Linux 5.4.0-80-generic x86_64
14:32:42:    OS Arch: AMD64
14:32:42:       GPUs: 1
14:32:42:      GPU 0: Bus:1 Slot:0 Func:0 NVIDIA:7 GP107 [GeForce GTX 1050 Ti] 2138
14:32:42:       CUDA: Not detected: cuInit() returned 100
14:32:42:     OpenCL: Not detected: clGetPlatformIDs() returned -1001
14:32:42:***********************************************************************
14:32:42:<config>
14:32:42:  <!-- Configuration -->
14:32:42:  <config-rotate-max v='0'/>
14:32:42:
14:32:42:  <!-- HTTP Server -->
14:32:42:  <allow v='127.0.0.1 192.168.0.0/24'/>
14:32:42:
14:32:42:  <!-- Logging -->
14:32:42:  <log-rotate-max v='0'/>
14:32:42:
14:32:42:  <!-- Network -->
14:32:42:  <proxy v=':8080'/>
14:32:42:
14:32:42:  <!-- Remote Command Server -->
14:32:42:  <command-allow-no-pass v='127.0.0.1 192.168.0.0/24'/>
14:32:42:
14:32:42:  <!-- Slot Control -->
14:32:42:  <pause-on-battery v='false'/>
14:32:42:  <pause-on-start v='true'/>
14:32:42:  <power v='full'/>
14:32:42:
14:32:42:  <!-- User Information -->
14:32:42:  <passkey v='passkey'/>
14:32:42:  <user v='user'/>
14:32:42:
14:32:42:  <!-- Web Server -->
14:32:42:  <web-enable v='false'/>
14:32:42:
14:32:42:  <!-- Folding Slots -->
14:32:42:</config>
14:32:42:Trying to access database...
14:32:42:Successfully acquired database lock
14:32:42:FS00:Initialized folding slot 00: cpu:7
14:32:42:WARNING:FS01:No CUDA or OpenCL 1.2+ support detected for GPU slot 01: gpu:1:0 GP107 [GeForce GTX 1050 Ti]  2138.  Disabling.
helloeverything
 
Posts: 5
Joined: Fri Jul 23, 2021 1:41 am

Re: trying to setup folding at home on ubuntu with fahcontro

Postby bollix47 » Sun Jul 25, 2021 6:28 pm

14:32:42: CUDA: Not detected: cuInit() returned 100
14:32:42: OpenCL: Not detected: clGetPlatformIDs() returned -1001

Try installing the driver from http://www.nvidia.com/driver or use Additional Drivers in Software & Updates. That 2nd option is easier than the first one. ;)

I always reboot after installing the driver no matter the method.

Also you may have to install ocl:

Code: Select all
sudo apt install ocl-icd-opencl-dev
bollix47
 
Posts: 2885
Joined: Sun Dec 02, 2007 6:04 am
Location: Canada

Re: trying to setup folding at home on ubuntu with fahcontro

Postby helloeverything » Sun Jul 25, 2021 7:40 pm

I installed the nvidia drivers and now it works! Thanks for the help.
helloeverything
 
Posts: 5
Joined: Fri Jul 23, 2021 1:41 am

Re: trying to setup folding at home on ubuntu with fahcontro

Postby aetch » Mon Jul 26, 2021 10:54 am

If you haven't done it already I would recommend creating a unique username (if you can) and requesting a passkey and entering those into the client.
The username will ease your tracking of the points you generate.
The passkey will enable the QRB (Quick Return Bonus).
Without the passkey, you only receive the basepoints for returning a completed work unit.
The client calculates "estimated credit" and "estimated PPD" (points per day) based upon the inclusion of the the QRB but it doesn't actually know if the QRB is active, or not, on your folding rig.
aetch
 
Posts: 250
Joined: Thu Jun 25, 2020 4:04 pm
Location: Between chair and keyboard


Return to Discussions of General-FAH topics

Who is online

Users browsing this forum: No registered users and 3 guests

cron