cannot connect to Assignment servers through proxy

Moderators: Site Moderators, PandeGroup

cannot connect to Assignment servers through proxy

Postby Zeta » Tue Jan 10, 2012 3:11 pm

I'm trying to set up the client on a linux machine behind a firewall. I have a http proxy properly set up and am able to get confirmation from the assignment servers through browsers. However, the client itself is unable to fetch the ID from the assignment server:

Code: Select all
> ls
client.cfg  fah6  FAHlog.txt  MyFolding.html
> echo $http_proxy
http://localhost:33389/
> wget -q -O - http://assign.stanford.edu:8080/
<html><b>OK</b></html>
> ./fah6 -smp -verbosity 9 - configonly
Note: Please read the license agreement (fah6 -license). Further
use of this software requires that you have read and accepted this agreement.

Folding@Home User Configuration

4 cores detected


--- Opening Log file [January 10 15:02:38 UTC]


# Linux SMP Console Edition ###################################################
###############################################################################

                       Folding@Home Client Version 6.34

                          http://folding.stanford.edu

###############################################################################
###############################################################################

Launch directory: /home/xxxxxx/FAH/
Executable: ./fah6
Arguments: -smp -verbosity 9 -configonly

[15:02:38] - Ask before connecting: No
[15:02:38] - Proxy: localhost:33389
[15:02:38] - User name: xxxxxx (Team xxxxxx)
[15:02:38] - User ID not found locally
[15:02:38] + Requesting User ID from server
[15:02:38] - Getting ID from AS:
[15:02:38] Connecting to http://assign.stanford.edu:8080/
[15:02:38] - Couldn't send HTTP request to server
[15:02:38] + Could not connect to Primary Assignment Server for ID
[15:02:38] Connecting to http://assign2.stanford.edu:80/
[15:02:38] - Couldn't send HTTP request to server
[15:02:38] + Could not connect to Secondary Assignment Server for ID
[15:02:38]
+ Could not get ID from server. Retrying...


And so on...


I've found some years-old solutions searching through the boards, but none seemed to have any effect, and most seemed to be geared towards other problems. What should be my next step in troubleshooting?
Zeta
 
Posts: 7
Joined: Tue Jan 10, 2012 2:54 pm

Re: cannot connect to Assignment servers through proxy

Postby 7im » Tue Jan 10, 2012 5:35 pm

Hello Zeta, welcome to the forum.

v6 doesn't support adavanced authentication through Proxies, only simply Proxies, so you may have better luck running the V7 client.
How to provide enough information to get helpful support
Tell me and I forget. Teach me and I remember. Involve me and I learn.
User avatar
7im
 
Posts: 15237
Joined: Thu Nov 29, 2007 4:30 pm
Location: Arizona

Re: cannot connect to Assignment servers through proxy

Postby Zeta » Tue Jan 10, 2012 5:46 pm

Thanks for the warm welcome!

There's no authentication required at all for this proxy, hence the simple $http_proxy and wget works fine.
But maybe I'll try v7 just to see if that handles it a little better.

I can't seem to find a tarball for v7, though it is referenced in the information. Is a no-installation version not being offered anymore?
Last edited by Zeta on Tue Jan 10, 2012 5:52 pm, edited 1 time in total.
Zeta
 
Posts: 7
Joined: Tue Jan 10, 2012 2:54 pm

Re: cannot connect to Assignment servers through proxy

Postby gwildperson » Tue Jan 10, 2012 5:50 pm

The problem is somehow related to how your proxy software is set up. Do you have other machines on your LAN which successfully connect to the internet using the proxy on that machine?

The fah client supposedly behaves essentially like an add-on browser. If you install a new browser and configure it to use the proxy, can it reach the web pages on ports 8080 and on port 80?

If you configure the fah client to go directly to the internet rather than using the proxy, does it work?
gwildperson
 
Posts: 785
Joined: Tue Dec 04, 2007 8:36 pm

Re: cannot connect to Assignment servers through proxy

Postby Zeta » Tue Jan 10, 2012 6:20 pm

If I configured firefox to use localhost on 33389 for the http proxy. It uses the internet perfectly, no trouble, no authentication. Both the primary and secondary server report OK on 80 and 8080.

I cannot use the proxy from other computers on the network, but I don't see why that would make a difference. Shouldn't the FAH client behave, as you say, like another browser? 33389 is a port ssh forwarded to a authentication-less squid on another network. The proxy is set up to allow access from localnet, I believe.

I have only a choice of proxies on this network. I set up the authentication-less proxy to avoid the authentication-laden proxy, as that one reported an authentication error. Most advice on the forums suggested reconfiguring, or setting up a separate proxy to get around those problems. I don't suppose FAH could learn how to use SOCKS in the next version, could it? ;)
Zeta
 
Posts: 7
Joined: Tue Jan 10, 2012 2:54 pm

Re: cannot connect to Assignment servers through proxy

Postby gwildperson » Tue Jan 10, 2012 6:28 pm

There's an old bug report that mentions that V7 doesn't do SOCKS (whatever that is). You may understand what they said there well enough to move one step closer to resolving your issue but I don't really understand any of it very well.
Ticket #591
gwildperson
 
Posts: 785
Joined: Tue Dec 04, 2007 8:36 pm

Re: cannot connect to Assignment servers through proxy

Postby Zeta » Tue Jan 10, 2012 6:30 pm

Took me awhile to figure out the proper configuration for the v7 client, but that did the trick.

Apparently it's simply better about handling strange proxy situations, such as mine.
I'm curious what may have caused the version6 client to fail, but happy that the v7 seems to be working without trouble.
Zeta
 
Posts: 7
Joined: Tue Jan 10, 2012 2:54 pm

Re: cannot connect to Assignment servers through proxy

Postby bruce » Wed Jan 11, 2012 5:25 am

Do you have any general comments that would help somebody else with a similar problem? (other than upgrade to V7)
bruce
 
Posts: 21420
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: cannot connect to Assignment servers through proxy

Postby Zeta » Wed Jan 11, 2012 2:23 pm

Bruce,
Unfortunately no I don't have a way to fix the v6 client for my particular situation, I could only conclude that v6 doesn't work with the proxy I was using. (or vice versa)
Through some of my troubleshooting I had a theory that it may have been the configuration of my proxy, and the way v6 connects to it, that might be at odds.

Depending on which whatismyip I go to, different answers arise. If I use whatismyip org (in a browser), it reports the localnet address of 192.168.x.x that is connecting to the proxy (on the proxy's localnet). When I use whatismyip com, whatismyip net and my-addr com/ip all report the external ip address. I'm not super knowledgeable about proxies, but I can imagine this type of thing is why my proxy was refusing connections from other computers in the FAH client's localnet.

My guess is that the v6 client reports the hostname or ip address of the client computer to the proxy it connects to in a different way than a browser would, and as such, causes my proxy to refuse the connection. If I had reconfigured my proxy to accept the specific IP/hostname of the client computer that may work. My suggestion would be to ensure, if at all possible, that someone with a similar situation, attempt to create an ssh tunnel directly from the client computer to the remote proxy, and forwarding the appropriate ports using the alias 'localhost' if possible. That could help possibly.

Let me explain the situation briefly:
You have two networks with independent connections to the internet. ClientNet and ProxyNet. You have a proxy set up on ProxyNet (port 3128) and the client set up on ClientNet. ClientComp can't connect directly to ProxyComp without intermediaries. Connect via ssh in the following method to create a port connected on ClientComp to ProxyComp
Code: Select all
ClientComp> ssh -R 52200:localhost:22 ic-user@intermediateComp
intermediateComp> ssh -R 52200:localhost:52200 pc-user@proxyComp
proxyComp> ssh -p 52200 -R 3128:localhost:3128 cc-user@localhost

Where ic-user is the username on the intermediate computer, pc-user is the username on the proxy computer, and cc-user is the user on the client computer.
Now, while on ClientComp, you can connect to localhost:3128 for your proxy

Again, I'd like to reiterate that I haven't tried this, but it might work if your proxy settings are set up in a particular way, and you can't (or don't want to) fiddle with them.


I'd recommend upgrading to the v7 client because it seems to handle proxies smoother.

gwildperson,
SOCKS is another type of proxy that is very easy to set up on the fly. You can create a proxy from one computer to another just by using ssh. Where a typical http proxy requires someone to set up a server.
Code: Select all
ClientComp> ssh -D 3128 user@remoteComp

Would set up a proxy on localhost:3128 to remoteComp from ClientComp. It's a quick way to have a secure connection to tunnel through if you're having trouble connecting via an authenticated proxy.

EDITS: red stuff didn't work. I tried it with both client v6 and v7.
Version 7 is able to download work, but now it can't upload the results.

Code: Select all
15:41:39:     Config: <none>
15:41:39:******************************** Build ********************************
15:41:39:    Version: 7.1.43
15:41:39:       Date: Jan 2 2012
15:41:39:       Time: 04:27:48
15:41:39:    SVN Rev: 3223
15:41:39:     Branch: fah/trunk/client
15:41:39:   Compiler: GNU 4.1.2 20080704 (Red Hat 4.1.2-46)
15:41:39:    Options: -std=gnu++98 -O3 -funroll-loops -mfpmath=sse -ffast-math
15:41:39:             -fno-unsafe-math-optimizations -msse2
15:41:39:   Platform: linux2 2.6.18-164.11.1.el5
15:41:39:       Bits: 64
15:41:39:       Mode: Release
15:41:39:******************************* System ********************************
15:41:39:        CPU: Quad-Core AMD Opteron(tm) Processor 2378
15:41:39:     CPU ID: AuthenticAMD Family 16 Model 4 Stepping 2
15:41:39:       CPUs: 4
15:41:39:     Memory: 7.88GiB
15:41:39:Free Memory: 3.03GiB
15:41:39:    Threads: POSIX_THREADS
15:41:39: On Battery: false
15:41:39: UTC offset: -5
15:41:39:        PID: 14187
15:41:39:        CWD: /home/xxxx/FAH/
15:41:39:         OS: Linux 2.6.37.1-1.2-desktop x86_64
15:41:39:    OS Arch: AMD64
15:41:39:       GPUs: 1
15:41:39:      GPU 0: NVIDIA:1 G92 [GeForce 9800 GTX]
15:41:39:       CUDA: 1.1
15:41:39:CUDA Driver: 4000
15:41:39:***********************************************************************
15:41:39:<config>
15:41:39:  <!-- Folding Slots -->
15:41:39:</config>
15:41:39:Trying to access database...
15:41:40:Successfully acquired database lock
15:41:40:Enabled folding slot 00: READY smp:4
15:41:40:WU01:FS00:Starting
15:41:40:WU01:FS00:Running FahCore: /home/xxxx/FAH/FAHCoreWrapper /home/xxxx/FAH/cores/www.stanford.edu/~pande/Linux/AMD64/Core_a3.fah/FahCore_a3 -dir 01 -suffix 01 -version 701 -checkpoint 15 -np 4
15:41:40:WU01:FS00:Started FahCore on PID 14195
15:41:40:WU01:FS00:Core PID:14199
15:41:40:WU01:FS00:FahCore 0xa3 started
15:41:40:WU00:FS00:Sending unit results: id:00 state:SEND error:OK project:7903 run:51 clone:9 gen:18 core:0xa4 unit:0x0000001800ac9c214eca67e72622fb29
15:41:40:WU00:FS00:Uploading 28.82MiB to 128.113.12.161
15:41:40:WU00:FS00:Connecting to localhost:3333
15:41:40:WU01:FS00:0xa3:
15:41:40:WU01:FS00:0xa3:*------------------------------*
15:41:40:WU01:FS00:0xa3:Folding@Home Gromacs SMP Core
15:41:40:WU01:FS00:0xa3:Version 2.27 (Dec. 15, 2010)
15:41:40:WU01:FS00:0xa3:
15:41:40:WU01:FS00:0xa3:Preparing to commence simulation
15:41:40:WU01:FS00:0xa3:- Looking at optimizations...
15:41:40:WU01:FS00:0xa3:- Files status OK
15:41:40:WU01:FS00:0xa3:- Expanded 753721 -> 1428856 (decompressed 189.5 percent)
15:41:40:WU01:FS00:0xa3:Called DecompressByteArray: compressed_data_size=753721 data_size=1428856, decompressed_data_size=1428856 diff=0
15:41:40:WU01:FS00:0xa3:- Digital signature verified
15:41:40:WU01:FS00:0xa3:
15:41:40:WU01:FS00:0xa3:Project: 10132 (Run 92, Clone 2, Gen 46)
15:41:40:WU01:FS00:0xa3:
15:41:40:WU01:FS00:0xa3:Assembly optimizations on if available.
15:41:40:WU01:FS00:0xa3:Entering M.D.
15:41:46:WU00:FS00:Upload 33.18%
15:41:46:WU01:FS00:0xa3:Mapping NT from 4 to 4
15:41:46:WU01:FS00:0xa3:Completed 0 out of 2000000 steps  (0%)
15:41:52:WU00:FS00:Upload 52.27%
15:41:58:WU00:FS00:Upload 69.84%
15:42:04:WU00:FS00:Upload 83.50%
15:42:10:WU00:FS00:Upload 93.26%
15:42:13:WARNING:WU00:FS00:Exception: Failed to send results to work server: 10001: Server responded: HTTP_GATEWAY_TIME_OUT
15:42:13:WU00:FS00:Trying to send results to collection server
15:42:13:WU00:FS00:Uploading 28.82MiB to 129.74.85.16
15:42:13:WU00:FS00:Connecting to localhost:3333
15:42:19:WU00:FS00:Upload 8.68%
15:42:40:WU00:FS00:Upload 9.33%
15:42:46:WU00:FS00:Upload 32.97%
15:42:52:WU00:FS00:Upload 52.49%
15:42:58:WU00:FS00:Upload 70.71%
15:43:04:WU00:FS00:Upload 89.58%
15:43:06:ERROR:WU00:FS00:Exception: 10001: Server responded: HTTP_BAD_GATEWAY
15:43:06:WU00:FS00:Sending unit results: id:00 state:SEND error:OK project:7903 run:51 clone:9 gen:18 core:0xa4 unit:0x0000001800ac9c214eca67e72622fb29
15:43:06:WU00:FS00:Uploading 28.82MiB to 128.113.12.161
15:43:06:WU00:FS00:Connecting to localhost:3333
15:43:12:WU00:FS00:Upload 14.75%
15:43:18:WU00:FS00:Upload 38.61%
15:43:24:WU00:FS00:Upload 47.07%
15:43:30:WU00:FS00:Upload 74.18%
15:43:36:WU00:FS00:Upload 96.73%
15:43:37:WARNING:WU00:FS00:Exception: Failed to send results to work server: 10001: Server responded: HTTP_GATEWAY_TIME_OUT
15:43:37:WU00:FS00:Trying to send results to collection server
15:43:37:WU00:FS00:Uploading 28.82MiB to 129.74.85.16
15:43:37:WU00:FS00:Connecting to localhost:3333
15:43:43:WU00:FS00:Upload 19.74%
15:43:49:WU00:FS00:Upload 43.38%
15:43:55:WU00:FS00:Upload 67.45%
15:44:01:WU00:FS00:Upload 80.90%
15:44:06:ERROR:WU00:FS00:Exception: 10001: Server responded: HTTP_GATEWAY_TIME_OUT
15:44:06:WU00:FS00:Sending unit results: id:00 state:SEND error:OK project:7903 run:51 clone:9 gen:18 core:0xa4 unit:0x0000001800ac9c214eca67e72622fb29
15:44:06:WU00:FS00:Uploading 28.82MiB to 128.113.12.161
15:44:06:WU00:FS00:Connecting to localhost:3333
15:44:12:WU00:FS00:Upload 16.48%
15:44:18:WU00:FS00:Upload 35.35%
15:44:24:WU00:FS00:Upload 55.52%
15:44:30:WU00:FS00:Upload 81.77%
15:44:34:WARNING:WU00:FS00:Exception: Failed to send results to work server: 10001: Server responded: HTTP_GATEWAY_TIME_OUT
15:44:34:WU00:FS00:Trying to send results to collection server
15:44:34:WU00:FS00:Uploading 28.82MiB to 129.74.85.16
15:44:34:WU00:FS00:Connecting to localhost:3333
15:44:40:WU00:FS00:Upload 26.89%
15:44:46:WU00:FS00:Upload 54.66%
15:44:52:WU00:FS00:Upload 81.33%
15:44:56:ERROR:WU00:FS00:Exception: 10001: Server responded: HTTP_GATEWAY_TIME_OUT


Saw the same problem in the "Help: I don't know where to start" forum, and posted the log there as well. Not sure if it's the same problem or not. Any clues?
Zeta
 
Posts: 7
Joined: Tue Jan 10, 2012 2:54 pm

Re: cannot connect to Assignment servers through proxy

Postby bruce » Thu Jan 12, 2012 2:05 am

Zeta wrote:Version 7 is able to download work, but now it can't upload the results.
. . .
Saw the same problem in the "Help: I don't know where to start" forum, and posted the log there as well. Not sure if it's the same problem or not. Any clues?


I've seen V6 proxy connections that could download but not upload. As far as I know, nobody has ever figured out why or what to do about it ... so about the only recourse I have is to ask you the same question. Do you have any clues?
bruce
 
Posts: 21420
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: cannot connect to Assignment servers through proxy

Postby Zeta » Thu Jan 12, 2012 6:47 pm

Haven't been able to resolve the download-not-upload issue. I simply get the gateway timeouts. Can't really explain it.
I noticed that it seems to rotate through several servers attempting to upload, but none seem to work.

Does the uploading occur in a different way from downloading? Is one via HTTP and the other FTP or some such? I have no idea otherwise.
Zeta
 
Posts: 7
Joined: Tue Jan 10, 2012 2:54 pm

Re: cannot connect to Assignment servers through proxy

Postby bruce » Thu Jan 12, 2012 9:12 pm

I'm not aware of any differences between uploads and downloads but I've never done a packet trace and nobody who knows if there is a difference has told me anything.

The first attempt to upload is always to the same Work Server from which is was downloaded. If that fails, it tries a Collection Server. There have been problems with the CSs but they're gradually being corrected and more are working correctly (without a proxy).
bruce
 
Posts: 21420
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: cannot connect to Assignment servers through proxy

Postby jcoffland » Thu Jan 12, 2012 10:01 pm

The HTTP_GATEWAY_TIME_OUT and HTTP_BAD_GATEWAY errors indicate that the client was able to communicate the data to the proxy but the proxy lost its connection to the server. It's difficult to tell what's going on here. My best guess is that the proxy is trying to do something that the server doesn't understand. The F@H WS and CS (servers) only understand a very basic HTTP protocol. If the proxy were to use methods not supported by the WS/CS but that were part of the HTTP 1.1/1.0 standard it would fail.
Cauldron Development LLC
http://cauldrondevelopment.com/
User avatar
jcoffland
Pande Group Member
 
Posts: 974
Joined: Fri Oct 10, 2008 6:42 pm
Location: San Jose, CA

Re: cannot connect to Assignment servers through proxy

Postby tear » Mon Jan 16, 2012 3:42 pm

Hey Zeta,

If you're still interested, we may be able to figure out what your proxy is doing that servers barf on (or: what client is doing that proxy barfs on).
Then, it should be possible to adjust headers by means of yet another local proxy to ensure successful HTTP transactions.

Send me a PM!

Thanks,
tear
One man's ceiling is another man's floor.
Image
tear
 
Posts: 918
Joined: Sun Dec 02, 2007 4:08 am
Location: Rocky Mountains


Return to Linux CPU V6 Client

Who is online

Users browsing this forum: No registered users and 1 guest

cron