Fresh install of Ubuntu 18.04, FAHClient service not working

Moderators: Site Moderators, FAHC Science Team

Post Reply
toTOW
Site Moderator
Posts: 6296
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Fresh install of Ubuntu 18.04, FAHClient service not working

Post by toTOW »

Fresh install of Ubuntu 18.04, fresh download (with wget) and install (dpkg -i) of 7.5.1 client.

Installation went fine and client started. I edited the config file to allow remote control (headless dedicated server) and rebooted the system to take change into account.

Now I'm unable to start the FAHClient service. Here's what I get :
systemctl status FAHClient.service
● FAHClient.service - LSB: Folding@home Client
Loaded: loaded (/etc/init.d/FAHClient; generated)
Active: failed (Result: exit-code) since Thu 2019-05-30 17:37:50 UTC; 4min 33s ago
Docs: man:systemd-sysv-generator(8)
Process: 2828 ExecStart=/etc/init.d/FAHClient start (code=exited, status=1/FAILURE)

mai 30 17:37:50 ns338286 systemd[1]: Starting LSB: Folding@home Client...
mai 30 17:37:50 ns338286 FAHClient[2828]: Starting fahclient ... FAIL
mai 30 17:37:50 ns338286 systemd[1]: FAHClient.service: Control process exited, code=exited status=1
mai 30 17:37:50 ns338286 systemd[1]: FAHClient.service: Failed with result 'exit-code'.
mai 30 17:37:50 ns338286 systemd[1]: Failed to start LSB: Folding@home Client.
Nothing is written to the FAHClient log.

This machine was working fine before, but FAHClient had been installed on Ubuntu 16.04 and then migrated to 18.04.

Any ideas ?
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by bruce »

Is the userid 'fahclient" defined on that new install?
You are starting it with 'su' Right?

The only way I solved a different... but perhaps similar problem was to un-hide the output of init.d/FAHClient and see where it was failing.
toTOW
Site Moderator
Posts: 6296
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by toTOW »

bruce wrote:Is the userid 'fahclient" defined on that new install?
I don't know ... if it's not, there's a bug in the installer ...
bruce wrote:You are starting it with 'su' Right?
Sure, I only have root account on this system ... :roll:
bruce wrote:The only way I solved a different... but perhaps similar problem was to un-hide the output of init.d/FAHClient and see where it was failing.
If I try to start with the old /etc/init.d/FAHClient start method, I only get "Starting fahclient ... FAIL" :(

Is there a way to start the client manually, without the service commands ?
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by bruce »

Edit a copy of /etc/init.d/FAHClient and proceed step by step assuming the parameter value "start" until something fails.

If you cannot 'su fahclient' then installation DID fail. Install it correctly.
toTOW
Site Moderator
Posts: 6296
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by toTOW »

su fahclient
This account is currently not available.
This is expected because the shell for this account is set to "/usr/sbin/nologin" ...

I tried to rerun the install process, but it doesn't change anything :

Code: Select all

 dpkg -i --force-depends fahclient_7.5.1_amd64.deb
(Lecture de la base de données... 66795 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de fahclient_7.5.1_amd64.deb ...
usermod: no changes
Dépaquetage de fahclient (7.5.1) sur (7.5.1) ...
Paramétrage de fahclient (7.5.1) ...
Job for FAHClient.service failed because the control process exited with error code.
See "systemctl status FAHClient.service" and "journalctl -xe" for details.
invoke-rc.d: initscript FAHClient, action "start" failed.
● FAHClient.service - LSB: Folding@home Client
   Loaded: loaded (/etc/init.d/FAHClient; generated)
   Active: failed (Result: exit-code) since Thu 2019-05-30 23:11:29 UTC; 7ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6056 ExecStart=/etc/init.d/FAHClient start (code=exited, status=1/FAILURE)

mai 30 23:11:29 ns338286 systemd[1]: Starting LSB: Folding@home Client...
mai 30 23:11:29 ns338286 FAHClient[6056]: Starting fahclient ... FAIL
mai 30 23:11:29 ns338286 systemd[1]: FAHClient.service: Control process exited, code=exited status=1
mai 30 23:11:29 ns338286 systemd[1]: FAHClient.service: Failed with result 'exit-code'.
mai 30 23:11:29 ns338286 systemd[1]: Failed to start LSB: Folding@home Client.

The Folding@home client is now installed

You can access the Web interface by going to:

  https://client.foldingathome.org/

in a browser on this computer.

For information about configuring the Folding@home client for
remote access please see the comments in:

  /etc/fahclient/config.xml


Traitement des actions différées (« triggers ») pour ureadahead (0.100.0-21) ...
Traitement des actions différées (« triggers ») pour systemd (237-3ubuntu10.21) ...
Traitement des actions différées (« triggers ») pour mime-support (3.60ubuntu1) ...
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
toTOW
Site Moderator
Posts: 6296
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by toTOW »

There's definitely something in /etc/init.d/FAHClient script that it doesn't like, but I don't know what yet ... :(
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by bruce »

Try editing the script ... after every executable command, echo the returncode.

If that doesn't help, change /usr/bin/nologin and then type (Copy/Paste) each executable line into a terminal. There's got to be a way to debug it manually.
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by MeeLee »

1- Dependencies installed?
2- Do you have access to a GUI for the installation procedure?
3- Are you folding on CPU?

I've never installed FAH via WGET.
I always download the .deb file from the main site, and install that one in GUI with a program.
I always fear of getting the commands wrong (force dependencies).

Also, are you running a minimal installation of Ubuntu? If so, some necessary dependencies might be missing.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by bruce »

MeeLee wrote:Also, are you running a minimal installation of Ubuntu? If so, some necessary dependencies might be missing.
I think you mean is the version designated as a "server" edition or a "desktop" edition. The server edition typically lacks many dependencies which are essential to starting the GUI desktop -- some of which are used by FAH. You don't really need to unitize that code since you don't need the GUI code to be running, but your second question is important: Do you have access to a GUI for the installation procedure?
toTOW
Site Moderator
Posts: 6296
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by toTOW »

Never mind, I found out what was wrong ! 8-)

A fucking missing / in config.xml file ... :evil:

Error messages could have been more explicit ... :(

edit : There is only one manual step in my process : editing the config.xml file to allow remote control. This is were I failed miserably ... :roll:
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
Katie Boundary
Posts: 2
Joined: Tue Nov 05, 2019 11:14 pm

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by Katie Boundary »

where does the missing / go? I'm getting the same problem.
fragmuffin
Posts: 1
Joined: Sun Apr 05, 2020 6:52 am

Re: Fresh install of Ubuntu 18.04, FAHClient service not wor

Post by fragmuffin »

The solution for me was in `/etc/init.d/FAHClient`. I needed to change the `wait_for_log_change` function to:

Code: Select all

wait_for_log_change() {
    if [ "$2" != "" ]; then
        pid=$2
    else
        pid=$(get_pid)
    fi

    while ! is_running ; do
        sleep 0.1
    done

    while [ "$(log_status)" == "$1" ]; do
        if is_running ; then
            sleep 1
        else
            return 1
        fi
    done

    return 0
}
Before the change, the line

Code: Select all

ps -hp $pid 2>/dev/null >/dev/null
was returning non-zero when called so soon after starting the FAHClient binary. A simple `sleep 1` before the original while loop also worked.
Post Reply