Proxy server and work servers 155.247.166.219 & .220
Posted: Mon Jul 24, 2017 10:24 pm
Most of my f@h nodes use a squid web proxy to communicate with f@h. It has been working, except I would get "Exception: 10001: Server responded: HTTP_GATEWAY_TIME_OUT" errors when these nodes would get assigned to work server 155.247.166.219 or 155.247.166.220 . The nodes will then try again or get assigned to a different server. Sometimes this means they will retry connecting to one of these servers over and over. The unconfigurable connection backoff mechanism will attempt a new connection after a few seconds, then minutes, then hours, sometimes leaving the nodes idle for long periods of time. This occurred on the majority of my nodes early Sunday morning. Tracing the problem, I found that the connection port specifier is not being passed to the proxy server. That means that when sending the request to the proxy it will come in as "POST http ://155.247.166.219/" instead of "POST http ://155.247.166.219:8080/" like it should since these two servers only listen on port 8080. I managed a work around with iptables on the proxy server:
Obviously this shouldn't be required in the first place.
Code: Select all
iptables -t nat -A OUTPUT -d 155.247.166.219/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 155.247.166.219:8080
iptables -t nat -A OUTPUT -d 155.247.166.220/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 155.247.166.220:8080