Mac OS getting HTTP_BAD_REQUST

Moderators: Site Moderators, FAHC Science Team

speed2048
Posts: 22
Joined: Sun Oct 01, 2023 8:01 pm

Mac OS getting HTTP_BAD_REQUST

Post by speed2048 »

05:20:11:I3:Connecting to api.foldingathome.org:443
05:20:11:I1:OUT7:> PUT https://api.foldingathome.org/machine/(largeestring HTTP/1.1
05:20:11:I1:OUT7:< HTTP/1.1 400 HTTP_BAD_REQUEST
05:20:11:E :OUT7:HTTP_BAD_REQUEST:
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Mac OS getting HTTP_BAD_REQUST

Post by calxalot »

Don’t know what causes this.
I would try
- restart client
- logout of account, then login again
- unlink machine from account, then re-add to account
speed2048
Posts: 22
Joined: Sun Oct 01, 2023 8:01 pm

Re: Mac OS getting HTTP_BAD_REQUST

Post by speed2048 »

I tried restarting and logging out and logging back in again with no luck.

I cannot unlink machine from account as the link is greyed out. Its a local machine and not remote. Also the machine text label has a red border around it.
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Mac OS getting HTTP_BAD_REQUST

Post by calxalot »

What version of macOS?
What web browser?
Are you comfortable with the command line and have python3 installed?
speed2048
Posts: 22
Joined: Sun Oct 01, 2023 8:01 pm

Re: Mac OS getting HTTP_BAD_REQUST

Post by speed2048 »

Mac OS - Sonoma 14.3.1

I have tried chrome and MS Edge - same results.
Using safari does not connect to local fah client.

Yes I have python3 installed and comfortable using command line interface.
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Mac OS getting HTTP_BAD_REQUST

Post by calxalot »

Please try the following to relink to your account.
Adjust commands as needed if you don't use pip install --user or have PATH set appropriately.

Code: Select all

pip3 install lufah --user
Assuming local client, use

Code: Select all

"$(python3 -m site --user-base)/bin"/lufah . unlink-account
Open Web Control Account page.
Click link icon next to local machine.

It should link in a few seconds.
If not, try reloading web page.
If it still doesn't link, try restarting client.

Code: Select all

"$(python3 -m site --user-base)/bin"/lufah . stop
"$(python3 -m site --user-base)/bin"/lufah . start
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Mac OS getting HTTP_BAD_REQUST

Post by calxalot »

The machine name is outlined in red when it is not considered a valid name.
I think it can only be letters, numbers, dash, underscore.
speed2048
Posts: 22
Joined: Sun Oct 01, 2023 8:01 pm

Re: Mac OS getting HTTP_BAD_REQUST

Post by speed2048 »

The mac os hostname is wks-mac-mini-007.local and that was assigned by the os and appears I cannot remove the .local suffix.
speed2048
Posts: 22
Joined: Sun Oct 01, 2023 8:01 pm

Re: Mac OS getting HTTP_BAD_REQUST

Post by speed2048 »

Clarification I can change it in FAH client, cant easily change it from OS.

Once it was a valid name, I was able to link the machine name to the account and everything worked.

So it was the .local suffix causing this issue.

Thanks your for your help.
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Mac OS getting HTTP_BAD_REQUST

Post by calxalot »

If you use “hostname” on the command line, do you get the .local suffix?
speed2048
Posts: 22
Joined: Sun Oct 01, 2023 8:01 pm

Re: Mac OS getting HTTP_BAD_REQUST

Post by speed2048 »

Yes.
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Mac OS getting HTTP_BAD_REQUST

Post by calxalot »

enroscado
Posts: 38
Joined: Mon Aug 11, 2008 2:33 pm

Re: Mac OS getting HTTP_BAD_REQUST

Post by enroscado »

speed2048 wrote: Sat Mar 02, 2024 6:33 pm Clarification I can change it in FAH client, cant easily change it from OS.

Once it was a valid name, I was able to link the machine name to the account and everything worked.

So it was the .local suffix causing this issue.

Thanks your for your help.
Having the same problem when trying to change the name. Can you share how did you manage to do it?
Image
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Mac OS getting HTTP_BAD_REQUST

Post by calxalot »

Go to the bottom of
https://beta.foldingathome.org/account

The machine you need to rename will be outlined red.
Fix the name, click the save icon next to it, then click the link icon.
enroscado
Posts: 38
Joined: Mon Aug 11, 2008 2:33 pm

Re: Mac OS getting HTTP_BAD_REQUST

Post by enroscado »

Thank you calxalot.

Indeed, I can do that, but the "Save" button remains greyed out even after changing the name, therefore I can't save.

Let me know if I should post a video or series of screenshots to demonstrate.
Image
Post Reply