Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 21794 invoked from network); 31 Jan 2010 18:40:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Jan 2010 18:40:13 -0000 Received: (qmail 91219 invoked by uid 500); 31 Jan 2010 18:40:12 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 91136 invoked by uid 500); 31 Jan 2010 18:40:11 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 91119 invoked by uid 99); 31 Jan 2010 18:40:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jan 2010 18:40:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sberlin@gmail.com designates 209.85.220.223 as permitted sender) Received: from [209.85.220.223] (HELO mail-fx0-f223.google.com) (209.85.220.223) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jan 2010 18:40:01 +0000 Received: by fxm23 with SMTP id 23so3461155fxm.38 for ; Sun, 31 Jan 2010 10:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ui4anPGz/f9yCHEGpLSZVCJA0OX7MzQ9O7cEcBTNU4U=; b=mQj0PqvzKbTwh8vIwZsNAPKDwHuQfkgh4F/Dfexwe2DEkXVubEouQoB9EKeMcTYjHm v5P/KltsKct7Cwdp1u8hO2T1qqSehzYm10b7EfhTgzUSU50X4xCroK28NJjju9iUQrTH ggxXvz/1aBFwba7rdkVtCjQsxDvaIKc3wfJF8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Rsyjv3V9oJ4S6ElXFKnqMJyFacRxIuQFV+TXuW7HPSyV7C0lBOqjfLbE1sTmo8jvG8 4eVL0N2N63qY1b8qWq4w4w0LNcQyr0y5TjZMH4fJuGWIueh+jLRP05AllpUS2cHkLEii Uap5QXLXxeQjFicHJCfLYvwAz3E6Yoea1HiMg= MIME-Version: 1.0 Received: by 10.223.2.194 with SMTP id 2mr3443805fak.30.1264963180209; Sun, 31 Jan 2010 10:39:40 -0800 (PST) In-Reply-To: <1818865360344376983@unknownmsgid> References: <4153169270989238205@unknownmsgid> <19196d861001291433q27b582b9g6b66eb49be55927a@mail.gmail.com> <-5332843506534948818@unknownmsgid> <19196d861001291453q745ab2e2ka6c041f9edea681a@mail.gmail.com> <1818865360344376983@unknownmsgid> Date: Sun, 31 Jan 2010 13:39:40 -0500 Message-ID: <19196d861001311039q15606ecfwbde8a4dc834c9a22@mail.gmail.com> Subject: Re: org.apache.http.conn.HttpHostConnectException: Connection to http://server.name.com refused From: Sam Berlin To: HttpClient User Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You should attempt to write a small Java program that just has [new Socket(server.name.com, 80);] and run it on the same machine/environment as you are running HttpClient. That socket connect should fail based on the exception you reported here. When you can debug that problem and solve it, HttpClient should start working as you expect. Sam On Fri, Jan 29, 2010 at 7:25 PM, Razvan Mihailescu-Baltag wrote: > We don't use any special proxy for the java applications and for other > applications. > > Bellow is a request being made to the public url: > > wget http://server.name.com/directory > --00:09:23-- =A0http://server.name.com/directory > =A0 =A0 =A0 =A0 =A0 =3D> `directory' > Resolving server.name.com... server.ip.address > Connecting to server.name.com:80... connected. > HTTP request sent, awaiting response... 301 Moved Permanently > Location: http://server.ip.address/directory/ [following] > --00:09:23-- =A0http://server.ip.address/directory/ > =A0 =A0 =A0 =A0 =A0 =3D> `index.html' > Reusing existing connection to server.ip.address:80. > HTTP request sent, awaiting response... 200 OK > Length: 44 [text/html] > index.html: Permission denied > > Next, the request being made to the private url: > > wget http://server.name.com > --00:14:08-- =A0http://server.name.com/ > =A0 =A0 =A0 =A0 =A0 =3D> `index.html' > Resolving server.name.com... server.ip.address > Connecting to server.name.com |server.ip.address|:80... connected. > HTTP request sent, awaiting response... 403 Forbidden > 00:14:08 ERROR 403: Forbidden. > > My understanding here is that we have basic connectivity to the server. W= get > is able to establish a connection to the server, but it seems that http c= lient > throws an exception at > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(= DefaultClientConnectionOperator.java:127). > > Unfortunatelly, on the machine where my java application runs I cannot in= stall > any other applications and only have wget and curl tools. > > > > This email is subject to Computaris email terms of use: http://www.comput= aris.com/email_terms.php > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org