Getting connection refused errors when doing mvn clean install

348 Views Asked by At

I downloaded the Tardis branch of RedQueryBuilder and did an mvn clean install.

It runs through things for a bit then it gets to this part

[INFO] Running com.redspr.redquerybuilder.core.client.GwtTestDom [INFO] logging for HtmlUnit thread [INFO] [ERROR] I/O error on HTTP request [INFO] org.apache.http.conn.HttpHostConnectException: Connection to http://50.19.99.237:53655 refused

Just wondering if there's a quick answer, like, oh your gwt is out of date, or some such other easy to solve issue.

1

There are 1 best solutions below

0
Severun On

So here was the problem, had nothing to do with GAE.

The problem was that the name of my host, in /etc/hostname, had no corresponding host entry in /etc/hosts. It was complicated by the fact that I had "search mydomain.com" in my resolv.conf, which was further complicated by the fact that mydomain.com is wildcarded, so any unknown hostnames resolve to a particular IP address.

So what happend was, the test suite would look for myhost, since it didn't find myhost in DNS or in /etc/hosts, it looked up myhost.mydomain.com, as a result of my resolv.conf, which returned a valid IP address, because of the wildcard. Then the test suite got a connection refused, because it was connecting to a totally different host. So the solution was to add 127.0.0.1 myhost myhost.mydomain.com to my /etc/hosts and it built and ran fine.

Long story short, if the host defined in /etc/hostname does not have a valid DNS or /etc/hosts entry, the build will fail, as it will either get a host unknown, or in my case a connection refused because of my DNS jiggery pokery.