Stuck on Connecting / FAHClient fails to start

Moderators: Site Moderators, FAHC Science Team

dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

Folding Control won't start after reboot. Existing machine, running for almost a year. Have read a lot on forum, am experienced C++ windows programmer.
Folding Control stuck at "connecting". machinery is core i7 3.1 ghz, gtx 670m, win 10.

[Each of the reinstalls has been done retaining the data, as I am a day into a 1.5 days work unit and don't want to lose it. I'm now in hour 5 of diagnosing this and could really use some help. Thanks in advance!]

Turned off antivirus, same situ. additionally uninstalled/reinstalled, same situ. repeated, several times. finally tried starting fahclient first. It ran, downloaded the a8 core, then gave "access denied 127.0.0.1:xxxx" error.

"Failed to open 'cores/cores.foldingathome.org/win/64bit-avx-256/a8-0.0.12/Core_a8.fah/FahCore_a8.exe': Access is denied".

Fahclient ran that one time, won't start again. even after more uninstall/reboot/reinstall cycles, always with antivirus off. even when fahclient is the very first thing run after reinstall, before fahcontrol.

I have also tried installing with admin privileges with no change.

event viewer is logging these errors:

"C:\Program Files (x86)\FAHClient\FAHClient.exe Exception: Parse failed: 4: not well-formed (invalid token) At: config.xml:1:0". (event viewer)

also gave error message: "Failed to rename 'log.txt' to 'logs\log-20210202-223143.txt': The system cannot find the path specified." (event viewer)

This error I haven't a way to diagnose:
"The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{2593F8B9-4EAF-457C-B68A-50F6B8EA6B54}
and APPID
{15C20B67-12E7-4BB6-92BB-7AFF07997402}
to the user TYPHOON\Dan SID (S-1-5-21-1948426635-1232482408-560790916-1001) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool."

Both the clsid and appid come up as "PerAppRuntimeBroker".

Is this something generated by folding?

Thanks for your help in advance!
Neil-B
Posts: 2027
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Stuck on Connecting / FAHClient fails to start

Post by Neil-B »

is your av bitdefender by any chance? ... If so the following may possibly help https://foldingforum.org/viewtopic.php?f=108&t=36764
Last edited by Neil-B on Tue Feb 02, 2021 11:55 pm, edited 1 time in total.
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Re: Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

no it is Avast, but as I say, I disabled it and folding behavior doesn't change.
dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Re: Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

As both fahclient and fahcontrol exit immediately upon starting without making a log entry or event viewer entry, I thought to start them from a command window hoping to catch an output. Instead the suckers ran! the gpu core 22 would not start and could not be configured from fahcontrol, but required being set up from the web control. I think that is a design error personally, have run into that extraneous need for the web control to set folding to full.

So the applications run in their most elementary, but doesn't get at these issues of not starting, not running as standard windows programs, when they've been running as such for a year.

What tools, what tests are there for diagnosing these?
dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Re: Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

Also, that eliminates the antivirus and firewall from the equation, as these were on full normal when running these tests.
dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Re: Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

Also, not reading existing configuration, getting this error:
C:\Program Files (x86)\FAHClient>C:\"Program Files (x86)\FAHClient"\FAHClient --config C:\ProgramData\FAHClient\config.xml
17:27:36:ERROR:Exception: Parse failed: 4: not well-formed (invalid token)
17:27:36:ERROR: At: C:\ProgramData\FAHClient\config.xml:1:0
Joe_H
Site Admin
Posts: 7867
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: Stuck on Connecting / FAHClient fails to start

Post by Joe_H »

That looks like your config.xml got corrupted or truncated. Possibly happened during the shutdown before the reboot if Windows did not give the client enough time to exit and write out its changes to files.

The client keeps the last dozen or so versions of the config file in a folder in the same location as the current config.xml file. You could check to see which of the recent ones is okay and replace the current one. Do this while FAHClient is not running.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Re: Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

Found that the C:\ProgramData\FAHClient\config.xml file had only nulls in it. Replaced it with the last one from configs dir, then FAHClient starts from a cmd window.

So a trashed config.xml file is fault 1.

Now, FAHControl starts, as before, but does not trigger the start of FAHClient. If FAHClient is started from a cmd window, FAHControl will connect to it and proceed as normal.

What is causing FAHControl to not start FAHClient?

A separate question, the "FAHClient --help" has been helpful. Can anyone point me to docs describing how this system works, how to diagnose, etc., even informal? It would be very helpful to not have to reinvent the wheel.

Another question, "--gpu-usage": does it work? I tried using the client to --send-command gpu-usage=75. Got no error but no joy either.

On my machine folding takes up so much gpu time that my mouse cursor has such serious lag that the system is unusable. and videos are grossly choppy, resulting in me turning off gpu folding while I'm working for 12 hours a day, severely degrading how much folding I can contribute.

In work units that run with gpu utilization of 85% I find they can run and I can work adequately.

Hence, if there were a way to turn gpu-utilization down to 85 or 90%, I believe I could leave folding on continuously, resulting in 25% greater folding off my machine.

What is the community's experience on this?
Neil-B
Posts: 2027
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Stuck on Connecting / FAHClient fails to start

Post by Neil-B »

Some people find turning off hardware acceleration ease thd gpu lag effect ... iirc fahcontrol doesn't start fahclient it has to bd running for fah control to connect to it
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
Neil-B
Posts: 2027
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Stuck on Connecting / FAHClient fails to start

Post by Neil-B »

Gpu utilisation is on or off from the fah perspective ... this is an artifact of how os schedules gpu .. there are z number of threads about this
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Re: Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

Don't want to get off track here:

Why isn't FAHControl starting FAHClient? It is incorrect that fahclient has to be running for fahcontrol to connect to it. Until today I had never started fahclient separately, it has been running this way for years, standard out of the box folding.

So, what are the causes for control to not start client, when client can be started from a cmd window?

How to ask control what it is receiving back, or look at what it is sending to client, which is causing this?
Joe_H
Site Admin
Posts: 7867
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: Stuck on Connecting / FAHClient fails to start

Post by Joe_H »

FAHControl has not been what starts FAHClient since about version 7.1. On Windows a shortcut is created that starts FAHClient in the background using hideconsole.exe. That shortcut includes the proper paths to be used for data files and the config.xml.

The default install for Windows has FAHClient started every time the PC is restarted. The shortcut is supplied so FAHClient can be stopped and restarted if you wanted to. If the default is changed, then FAHClient needs to be started using that shortcut.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Stuck on Connecting / FAHClient fails to start

Post by bruce »

FAHControl never starts FAHClient. FAHClient is traditionally started by a script that runs when the system is rebooted although you can also start it with a script that is delivered with the installation. FAHClient continues to run in the background as a daemon.

When FAHControl (or WebControl) is started, it makes a connection to FAHClient through the TCP/IP connection at 127.0.0.1 which loops back to your own machine and they continue to interchange information through that connection.

To debug this sort of problem I start by first confirming that FAHClient is running in the background. Then I start a telnet connection to 127.0.0.1 on port 36330. Through that connection I then can issue the same commands that FAHControl is able to issue, although the GUI is a much easier way of doing that.
Neil-B
Posts: 2027
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Stuck on Connecting / FAHClient fails to start

Post by Neil-B »

dan39johnson wrote:It is incorrect that fahclient has to be running for fahcontrol to connect to it. Until today I had never started fahclient separately, it has been running this way for years, standard out of the box folding.
Sorry if you felt I was missinforming you ... but with current client (since version stated by Joe_H which iirc was circa 2013/2014) this is not "incorrect" it is actually a statement of fact !! ... fahcontrol is simply a front end interface as is web control ... in fact you dont need either to run fahclient - many people chose to (or for various legacy reasons) are forced to run fahclient headless ... whilst from user experince (if one has only used fahcontrol to interface with fahclient) it may appear that fahcontrol starts fahclient it really doesn't - or at least not in any of the recent versions.
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
dan39johnson
Posts: 21
Joined: Wed Dec 16, 2020 7:29 am

Re: Stuck on Connecting / FAHClient fails to start

Post by dan39johnson »

I do feel I'm being given the longest walkaround of the problem. I am a C++ Windows programmer with 30 years experience; I am fully aware I'm dealing with a system of components, some hidden, some background, some controlling, some worker bees. I build such systems too.

I'm speaking to you as a technical user when I say "one click and it starts, no second process kicked off manually". Your pile on did provide the needed under the hood view though. @Neil-B: I was speaking from the perspective of operating fah user interface, not from the view of what's going on under the hood. I have no access to that view actually. I wasn't looking for information, but for a set of diagnostic steps to run to diagnose this system. You three's responses did flesh out the wiring diagram under the hood, explaining the purpose of hideconsole for example which I had many times wondered about.

That should have been your first clue in my case, that fahclient won't. Oh, try this: reboot, see if fahclient comes up. Next is "what stops fahclient from starting?" In this case, it is a corrupted config file.

A diagnostic document is extremely important! There are so many people no longer doing folding, because it has been left at "too hard for ordinary people to use", and because "it turned my computer into a hardware thermal torture chamber, and I was unwilling to let my only machine risk short-term death." What is it now, 5 out of 6 have stopped folding since the high last year? Why doesn't that tell you something seriously needs to be addressed? Either fine-tune your market (like do not run on laptops) or a disclaimer "expect to spend a lot of hours technically debugging your installation", or do the next level up in product design and marketing of folding, making it much more bullet proof, and maximize the support of diagnosing any failures.

fahcontrol could have a menu where user could see the condition of the client. Currently if the client isn't up, we can't even see the log, as far as I've seen control doesn't have a log, or output of what it has attempted. Who would have guessed, in a product that's supposed to be "install, configure, run, forget it", that the "advanced control" doesn't start the client if it isn't running, that client doesn't inform control that or why it couldn't start?

I reiterate: there is a vacuum of info on how to set fah up. Yes, one can wander around in the forums and stumble upon tools, tactics others have used, or those golden moments where you reveal how the system "thinks", how it is constructed, the flow of control between components, conditions, things almost always true, or almost never true.

@bruce this was the information I needed to see. from there I was able, now with the config file restored, and not to expect control will start client, to verify that at reboot the client is starting by itself, and hence starting control now works as normal.

Another clue to you was at the beginning I said I reinstalled but kept the data. which left me open to hitting the hidden rock of a corrupted config file.

So a single thread in a much bigger diagnostic flowchart:
if after rebooting, and/or after reinstalling, advanced control comes up but appears inactive (that's the way users see it):
1. check if fahclient is running in task manager.
if it is not, try running it from a cmd window (explain why cannot from windows explorer - it needs its directory set).
capture its output. mine gave the clear signal when it said it couldn't parse the file. I thought it strange that an xml file appeared to be in binary in my editor, but not knowing fah internals and without an example, I didn't dwell there. Neither did fah support. you guys missed that error message too. an example of one pictured would have diagnosed this immediately.
2. check the config file. mine was all nulls. I brought it up in a hex editor and knew what had happened to it. The hard crash that initiated all this caused that, though with an ssd, I haven't since see a fractured or fragmented file since. Odd that client or control tried to write during an error. especially a file that doesn't change much.
3. if time is short, reinstall and DELETE THE DATA. I've spent more than 8 hours trying to keep the 24 hours of processing that had gone into the gpu wu.

Tracking down where everything is, who needs what to be where, and in what sequence, should be in the diagnostic documentation. It should also be built into the apps, and popped up to the user, as well as written to log files. First point of contact documents should tell the users needing this all this info, with examples, tests to run with scripts, etc.
As a 30 year windows programmer and user, now having an iPhone, I am very much aware of the polish that apple puts into the finishing touches on the products, the high rate of user interface continuity, the low rate of crashes or buggy behavior, and I do see the appeal. All my career I've asked that rather than the set of new features that Microsoft was going to produce in a year, for Windows or Visual Studio, that instead they would focus on fixing all the bugs in their existing features. Make it work, make it reliable, make it smoothe and consistent, hard to break. And all other vendors in the windows arena, too, all were guilty of rushing to market, putting off maintenance, as we were also all guilty of demanding more features.

If in fah we were to do this, then fah wouldn't be so hard to use, and we'd have many more users. to provide support for.

I'm also offering to do some of the work. I have time to commit.
Post Reply