FAHControl is not connecting to my client [macOS 11+]

Moderators: Site Moderators, FAHC Science Team

Piipperi
Posts: 7
Joined: Wed Apr 08, 2020 7:48 am

FAHControl is not connecting to my client [macOS 11+]

Post by Piipperi »

FAHControl is not connecting to my local client (macOS 11.6), except in rare cases when it does but it cuts out the connection very shortly after... I have tried to reinstall FAH already...
calxalot
Site Moderator
Posts: 878
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: FAHControl is not connecting to my client

Post by calxalot »

This is because of a bug in the installer. Two entries need to be added to the launchd plist. I will post a solution later tonight.
calxalot
Site Moderator
Posts: 878
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: FAHControl is not connecting to my client

Post by calxalot »

The following Terminal commands work for me on an M1 Mac mini, macOS 11.6.
The launchd unload command gives me an error message on my macOS 10.15 machine.

You need to have an admin account for sudo.

As usual, don't run terminal commands you don't understand.

Code: Select all

PLIST=/Library/LaunchDaemons/org.foldingathome.fahclient.plist
PLISTBUDDY=/usr/libexec/PlistBuddy

sudo $PLISTBUDDY -c "Add :ProcessType string 'Interactive'" $PLIST || \
sudo $PLISTBUDDY -c "Set :ProcessType 'Interactive'" $PLIST

sudo $PLISTBUDDY -c "Add :SessionCreate bool true" $PLIST || \
sudo $PLISTBUDDY -c "Set :SessionCreate true" $PLIST

sudo /bin/launchctl unload $PLIST
sudo /bin/launchctl load $PLIST
calxalot
Site Moderator
Posts: 878
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: FAHControl is not connecting to my client

Post by calxalot »

Is this working for anyone, or is another solution needed?
PaulTV
Posts: 179
Joined: Mon Jan 25, 2021 4:53 pm
Location: Netherlands

Re: FAHControl is not connecting to my client [macOS 11]

Post by PaulTV »

Your solution helped someone on discord at least :D
Image

Ryzen 5800X / RTX 4090 / Windows 11
Ryzen 5600X / RTX 3070 Ti / Ubuntu 20.04
Ryzen 5600 / RTX 3060 Ti / Windows 11
eljonco
Posts: 5
Joined: Thu Dec 23, 2021 12:48 pm

Re: FAHControl is not connecting to my client [macOS 11]

Post by eljonco »

I ran these terminal commands in an attempt to gain more control over FAH on new Apple Silicon M1Max.
Then I ran them again (line by line) and twice got the message that the settings were already there (first time more'ing the plist didn't show them).
Then quit FAHControl and launched again. No joy.
Then stopped FAH, stopped the control and launched both. No joy.
The FAHControl doesn't progress beyond 'Connecting'.

MacOS Monterey 12.0.1, Apple M1 Max 10-core.
calxalot
Site Moderator
Posts: 878
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: FAHControl is not connecting to my client [macOS 11]

Post by calxalot »

Please post your current plist.
eljonco
Posts: 5
Joined: Thu Dec 23, 2021 12:48 pm

Re: FAHControl is not connecting to my client [macOS 11]

Post by eljonco »

BTW. I noticed my PowerBook i7 FAHControl also doesn't connect to client, M1 mac does.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>GroupName</key>
	<string>nobody</string>
	<key>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>org.foldingathome.fahclient</string>
	<key>LowPriorityIO</key>
	<true/>
	<key>ProcessType</key>
	<string>Interactive</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/bin/FAHClient</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>SessionCreate</key>
	<true/>
	<key>StandardOutPath</key>
	<string>/dev/null</string>
	<key>Umask</key>
	<integer>18</integer>
	<key>UserName</key>
	<string>nobody</string>
	<key>WorkingDirectory</key>
	<string>/Library/Application Support/FAHClient</string>
</dict>
</plist>
calxalot
Site Moderator
Posts: 878
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: FAHControl is not connecting to my client [macOS 11]

Post by calxalot »

I just uninstalled and reinstalled fah 7.6.21 on an M1 Mac mini running macOS 12.1.
I then ran the commands without error.
Things are working for me.

On an intel Mac running 10.15.7 I have seen errors with Launchctl load/unload, which are legacy commands.
If your plist is correct, you can restart your Mac to guarantee the revised plist is loaded.

My plist:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>GroupName</key>
	<string>nobody</string>
	<key>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>org.foldingathome.fahclient</string>
	<key>LowPriorityIO</key>
	<true/>
	<key>ProcessType</key>
	<string>Interactive</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/bin/FAHClient</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>SessionCreate</key>
	<true/>
	<key>StandardOutPath</key>
	<string>/dev/null</string>
	<key>Umask</key>
	<integer>18</integer>
	<key>UserName</key>
	<string>nobody</string>
	<key>WorkingDirectory</key>
	<string>/Library/Application Support/FAHClient</string>
</dict>
</plist>
eljonco
Posts: 5
Joined: Thu Dec 23, 2021 12:48 pm

Re: FAHControl is not connecting to my client [macOS 11]

Post by eljonco »

Our plist files are identical. Our hardware and OS'es differ.
earthsaver
Posts: 24
Joined: Fri Feb 08, 2008 6:05 pm

Re: FAHControl is not connecting to my client [macOS 11]

Post by earthsaver »

I had no problem running FAHControl on my Intel Mac running Big Sur 11.6.2. However, I just migrated to a new M1 Mac running Monterey 12.1. Why my built-in firewall is enabled, I find that FAHControl only shows my folding progress and controls when FAH Web Control is loaded in a web browser. When the firewall is disabled, there are no problems with FAHControl connecting to the local client.

I've confirmed my config file has the local IP addresses and repeatedly uninstalled and reinstalled the client just to be sure. As a workaround, I created a Fluid app to keep the Web Control interface running, but I'd rather everything run naturally.
What's the easiest way to resolve this?

Here's my config file for reference:

Code: Select all

<config>
  <!-- HTTP Server -->
  <allow v='127.0.0.1,192.168.7.0/24'/>

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

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

  <!-- Slot Control -->
  <power v='FULL'/>

  <!-- User Information -->
  <passkey v='removed'/>
  <team v='1971'/>
  <user v='Earthsaver'/>

  <!-- Folding Slots -->
  <slot id='0' type='CPU'/>
</config>
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 878
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: FAHControl is not connecting to my client [macOS 11]

Post by calxalot »

Your launchd plist needs ProcessType Interactive.

Please try the commands I posted earlier.
earthsaver
Posts: 24
Joined: Fri Feb 08, 2008 6:05 pm

Re: FAHControl is not connecting to my client

Post by earthsaver »

Thanks for this tip! Worked perfectly and I no longer have to rely on reloading the web client to make the local client work. This is on an M1 iMac running 12.2.1.
calxalot wrote:The following Terminal commands work for me on an M1 Mac mini, macOS 11.6.
Appreciate, too, the tip to reduce to Light, focusing on the 4 high performance cores.
- Ben
M1 iMac
randoPrime
Posts: 2
Joined: Sat Dec 31, 2022 10:25 pm

Re: FAHControl is not connecting to my client

Post by randoPrime »

calxalot wrote: Mon Oct 25, 2021 8:03 am The following Terminal commands work for me on an M1 Mac mini, macOS 11.6.
The launchd unload command gives me an error message on my macOS 10.15 machine.

You need to have an admin account for sudo.

As usual, don't run terminal commands you don't understand.

Code: Select all

PLIST=/Library/LaunchDaemons/org.foldingathome.fahclient.plist
PLISTBUDDY=/usr/libexec/PlistBuddy

sudo $PLISTBUDDY -c "Add :ProcessType string 'Interactive'" $PLIST
sudo $PLISTBUDDY -c "Add :SessionCreate bool true" $PLIST

sudo /bin/launchctl unload $PLIST
sudo /bin/launchctl load $PLIST
This straight up fixed my issue. Thank you and I am glad it worked!
LlamaLarry
Posts: 1
Joined: Tue Feb 21, 2023 8:28 pm

Re: FAHControl is not connecting to my client [macOS 11]

Post by LlamaLarry »

NEVERMIND I just left FAHControl running while I ran some errands and by the time I came back it was Running and even reconnected me to my team.

Howdy, macOS Ventura here. Did a fresh install with a Migration Assistant from a Monterey TimeMachine backup. I just realized that FAH was not working, hung at Connecting Inactive. I did a uninstall and reinstall using the latest package, but no change. I added to two entries to my plist, but still no change.

FWIW, when I did a fresh install the setup website fails to connect and I never get prompted to re enter my team info to join. Any other tips?
Post Reply