Unable to connect client to server, OS X 10.11.6 (2011 iMac)

If you're new to FAH and need help getting started or you have very basic questions, start here.

Moderators: Site Moderators, FAHC Science Team

Post Reply
dolljoints
Posts: 5
Joined: Sat Apr 04, 2020 4:57 am

Unable to connect client to server, OS X 10.11.6 (2011 iMac)

Post by dolljoints »

Hi, I ran the installer and everything ran correctly. I even looked in the log because I always do, and nothing got thrown up. Immediately after it ran, launchd began using ~90% CPU inside htop. This seemed promising.

I looked in the F@H folder in/Applications and opened up the client. It just said connecting. It wouldn't let me adjust how much CPU I was using or show me how much work I'd done. I looked up some help online, checked the various folders in /Library and ~/Library and every file that was suggested to look for was present. I manually added them all to my firewall, just in case. I restarted the machine.

Still nothing. It's evidently constantly running, and runs on startup. Unfortunately, my machine being a little over 8 years old and running almost constantly, I really need to replace the thermal paste. In Intel Power Gadget it's throttling down from 3GHz to 2.6GHz after a few minutes, so that it can stay around 85ºC. I want to contribute to F@H if I can, since my heating in my home is electric anyway, it's the same power either way and I might as well contribute to the Effort. But I need to be able to turn it down, as until I can replace the thermal paste, I just can't run things as intensely as I am right now, it just kernel panics after a few days when some CPU instruction corrupts non-recoverably. The tight quarters in the iMac are certainly somewhat to blame, but I certainly have noticed the fans running more frequently and the CPU hotter in the last few years than when it was new.

But anyway. I'm just wondering if any of you have any suggestions as to how I can get the client software to communicate with the server? I want to be able to log in, track my contribution, potentially load it on my laptop (it's only 11W but it could maybe still help a little), and so forth. But as it stands, I can't have it running at the default level, I need to be able to turn it down. If I can't, I'll have to run the uninstall script on my iMac and just wait until I can get my regular desktop PC with better cooling, which runs Linux and Windows up and running again (it has some kind of GPU issue right now unfortunately).

Thanks very much in advance. I ran a Google search of just this domain in case there's other advice I could try first, but from what I can find with various permutations on Mac, Mac OS, OSX, etc, I've seen every thread and tried everything suggested in the past. But if I missed anything, feel free of course to link it to me. And if you want any other system specs or logs from the command line or anything, just let me know.
Joe_H
Site Admin
Posts: 8002
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Studio M1 Max 32 GB smp6
Mac Hack i7-7700K 48 GB smp4
Location: W. MA

Re: Unable to connect client to server, OS X 10.11.6 (2011 i

Post by Joe_H »

The Web Control URL works for me if I change the https to http and refresh when using Safari. You should also be able to use FAHControl from that Folding@home folder in Applications to change the number of CPU cores being used. If neither works, could you post the first few hundred lines of the current log file from /Library/Application Support/FAHClient/. I usually open it in TextEdit to copy from and paste to where I need the entries.
Image
dolljoints
Posts: 5
Joined: Sat Apr 04, 2020 4:57 am

Re: Unable to connect client to server, OS X 10.11.6 (2011 i

Post by dolljoints »

Hi, thanks very much for getting back to me. I tried connecting with Safari before, but I tried again making sure to use HTTP instead of HTTPS, and it still timed out.

FAHControl is what I meant when I talked about the client saying simply "connecting". It's connecting to local, at 127.0.0.1:36330, and never progresses beyond there. I did know you could turn the CPU usage down in that program, but alas, that's the main issue I'm having.

I couldn't actually find any files in /Library/Application Support/FAHClient. The folder exists, but it seems to be empty. However, the plist file inside /Library/LaunchDaemons is present, and running

Code: Select all

sudo launchctl unload /Library/LaunchDaemons/org.foldingathome.fahclient.plist
does successfully reduce launchd's CPU in htop usage back from 90% to 0%, and running the opposite command (load instead of unload) brings launchd back to 90% CPU usage.

Running ls in sudo mode just in case, even though nothing should really only be visible to root as I am an admin user anyway, here is the directory you just asked me to look, alongside the other two directories I had previously seen someone ask to check.

Code: Select all

dolljoints@osx ~> sudo ls -a /Library/Application\ Support/FAHClient/
.	..
dolljoints@osx ~> sudo ls -a /library/LaunchDaemons/
.						com.oracle.java.Helper-Tool.plist
..						org.foldingathome.fahclient.plist
com.adobe.ARMDC.Communicator.plist		org.macosforge.xquartz.privileged_startx.plist
com.adobe.ARMDC.SMJobBlessHelper.plist		org.macports.OpenSSH.plist
com.adobe.SwitchBoard.plist			org.macports.lighttpd.plist
com.crystalidea.macsfancontrol.smcwrite.plist	org.macports.privileged_startx.plist
com.freemacsoft.appcleanerd.plist		org.macports.rsyncd.plist
com.gog.galaxy.clientservice.plist		org.macports.smartd.plist
com.objectiveSee.blockblock.plist
dolljoints@osx ~> sudo ls -a /usr/local/bin
.		FAHCoreWrapper	config_data	dumpcap		hyper		prove		text2pcap
..		brew		cpanm		editcap		json_pp		randpkt		tshark
FAHClient	capinfos	dftest		glyrc		mergecap	rawshark	wireshark
dolljoints@osx ~>
As you can see, both FAHClient and FAHCoreWrapper are present in /usr/local/bin, and org.foldingathome.fahclient.plist also exists, as I previously suggested by being able to invoke it with the launchctl command. The CPU usage is high when I enable org.foldingathome.fahclient.plist, yet no logs are generated in /Library/Application\ Support/FAHClient/.

I'm guessing I should now try uninstalling and then reinstalling the program? Previous posts I found by searching just suggested locating FAHClient, FAHCoreWrapper, and org.foldingathome.fahclient.plist, then restarting after confirming they exist. Since no logs are being written, obviously something is going awry. However, launchd's increased CPU usage had led me to believe it was indeed correctly functioning in the background, and I thought I was merely unable to connect the client (FAHControl) to it.

Your further input is very highly appreciated! Thank you!
dolljoints
Posts: 5
Joined: Sat Apr 04, 2020 4:57 am

Re: Unable to connect client to server, OS X 10.11.6 (2011 i

Post by dolljoints »

So I did reinstall the software, FAHControl and FAHClient can both connect now. Naturally it is just requesting work units. I'm surprised that it's pushing the CPU so hard (currently sitting at 93% launchd) while it's just pinging a server. It sort of makes me wonder if I even contributed anything the last few days where something was running and I ended up kernel panicking. :/ Or if it was constantly pinging a server and I was putting strain on my CPU for nothing.
dolljoints
Posts: 5
Joined: Sat Apr 04, 2020 4:57 am

Re: Unable to connect client to server, OS X 10.11.6 (2011 i

Post by dolljoints »

Ah-ha, now FahCore is running at 346% CPU. This definitely never happened last time. Curious. I wonder what went wrong with the install before. As I said, no errors had appeared in the installer log. I had read online in my search that it uses launchd to queue up the work and so I had thought all the work would be obscured under launchd. But I now see there is another process I get to see. Well, that certainly appears to be working properly now!
dolljoints
Posts: 5
Joined: Sat Apr 04, 2020 4:57 am

Re: Unable to connect client to server, OS X 10.11.6 (2011 i

Post by dolljoints »

Okay, I actually discovered the truth underneath this all. It's only when I manually run FAHClient in the command line that I actually get folding. launchd kept working at 90-100% CPU despite being loaded, and I decided to run that unload command just to see. It didn't terminate FAHClient, because I'd run it manually. But if I close FAHClient, it stops running, and launchd wasn't properly able to launch it for whatever reason anyway. So with the unload command ran, that freed up another 90-100% CPU for folding instead.

So automatically running it on launch and stuff is still broken. But I essentially just found a workaround. It's not that hard to just type /usr/local/bin/FAHClient, could even alias that to fold or something.

So probably the reinstall wasn't actually the fix, it was that I tried running from command line after reinstalling. Since without running it manually, it didn't fix anything. I just never tried running FAHClient manually.

So, hopefully now we know what to tell other people who have this problem I suppose.

I am curious why launchd didn't work to launch FAHClient though. Maybe it's because my OSX version is too old? I dunno. Anyway hopefully if someone else has this problem they might find this on Google and try what I tried.
Joe_H
Site Admin
Posts: 8002
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Studio M1 Max 32 GB smp6
Mac Hack i7-7700K 48 GB smp4
Location: W. MA

Re: Unable to connect client to server, OS X 10.11.6 (2011 i

Post by Joe_H »

FAHClient should launch automatically after an install, perhaps there are errors relating to it in the Console log that might point to what was not working. I don't recall if I installed while running 10.11, but the installer has worked for me on older and newer versions of the OS. But something appears to have gone wrong on your initial install, not quite certain what?

Using launchctl to stop and start the client in the should also leave FAHControl running in the background using very little CPU. It serves to start up the processes that do the actual folding work, they will be named FAHCoreWrapper and FAHCore_A7. However, if FAHClient is already running by other means such as the CI, it will not start up a second instance of FAHClient.
Image
Post Reply