Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D928117253 for ; Thu, 5 Feb 2015 15:43:27 +0000 (UTC) Received: (qmail 96553 invoked by uid 500); 5 Feb 2015 15:43:24 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 96484 invoked by uid 500); 5 Feb 2015 15:43:24 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 96473 invoked by uid 99); 5 Feb 2015 15:43:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 15:43:24 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brian123@emailbb.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qc0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 15:42:58 +0000 Received: by mail-qc0-f180.google.com with SMTP id r5so6897631qcx.11 for ; Thu, 05 Feb 2015 07:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emailbb.com; s=google-apps-dkim; h=from:to:subject:date:message-id:mime-version:content-type :thread-index:content-language; bh=aaZPZTQCK6ogawGeJ19kRgpdLPg1dyG9kEht9BE4XIE=; b=o2nXfQMFg3kr/uzaviNugs5S8bqk7JihIRXCbeHUI4QRgg+pTdrSkyPgDO628qKBeY +nBYio0fT65obwKtpGIoKFHe/IefNHjTnn5l1OAHiXqTOwqTpuzpP63bROyqH5dOfNde /4wVQ9JfG/WI5/UJuJSN6iex5ZWjZg9w7T9UE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-type:thread-index:content-language; bh=aaZPZTQCK6ogawGeJ19kRgpdLPg1dyG9kEht9BE4XIE=; b=D1clK66NcqSGMk+j13EKFoY2lkvYqNTpbyPQRRf4bib5eEuAkZdDgJPqSfRJ4Ai3x9 d3BeLt1uptmWlkkrZMP3mT1kDBucHMZ951SV97+R4WZgvN/rcqRuGzH9M1RnaDUslxf6 4aH8RhzTHoznN9+OBJV5T2frOPhcTjiVtp+58Wpfe1VkVtHD0IuQ/iqHOJblcOMbQxP3 o17OqSvhUIMHbwh6OLCTpgNiD3aYAYdu34bfWQmt7Zo2CdOJrLdEPHpyieoOXEliOO1c XjC7Ila/S6PGsPK+VqTL8vFbNMKSGf79gBn90INvYSKSH/4Ecscca/GwI8uSSqxdrUNd S60w== X-Gm-Message-State: ALoCoQmKYLZnp9LeJKRkYFQk5rPgtgSuIebiHGEWeCj8dCZTdH3gBD+r253DnK25sv01E5Bspz55 X-Received: by 10.229.204.74 with SMTP id fl10mr9629754qcb.24.1423150976473; Thu, 05 Feb 2015 07:42:56 -0800 (PST) Received: from B2W8 ([190.237.3.236]) by mx.google.com with ESMTPSA id o5sm5271200qat.4.2015.02.05.07.42.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Feb 2015 07:42:56 -0800 (PST) From: "Brian" To: Subject: Sporadic HTTP 403 returned by Tomcat when this should not happen ever. How to find out why this happens? Date: Thu, 5 Feb 2015 10:42:54 -0500 Message-ID: <004d01d0415a$68e0cf10$3aa26d30$@emailbb.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004E_01D04130.800BFF90" X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdBBWmfPwdL/UBVAQnuB/0ZyG8/pJA== Content-Language: es-pe X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_004E_01D04130.800BFF90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I have a Restful service that receives a huge amount of HTTP requests per day. In some of these requests, Tomcat returns an HTTP 403 error status. This should never happen as far as I can tell because the resource is open, and is very sporadic but yet very critical because it makes my service unreliable. When this happens, it does for the same resource that would otherwise return a succesful response. I'm sure this is happening, because my users have reported me the issue, and because I can clearly see that in our Tomcat log, as follows: localhost - - [04/Feb/2015:01:11:06 -0500] "GET /location/v1.7/locateip?key=abc123&ip=182.68.243.178&format=JSON HTTP/1.0" 403 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36" localhost - - [04/Feb/2015:01:12:24 -0500] "GET /location/v1.8/locateip?key=abc123&ip=local-ip&format=json&capacity=6X HTTP/1.0" 403 - "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36" localhost - - [04/Feb/2015:01:18:06 -0500] "GET /location/v1.8/locateip?key=abc123&ip=local-ip&format=json&capacity=6X HTTP/1.0" 403 - "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36" Is there a way to show in the log why the 403s took place? How do I debug these events? I'm using Tomcat 7.0.50. By the way: I don't know if this is relevant, but this is the complete stack of software between the user and my Java App: - The request first goes through a Amazon AWS load balancer - Then it enters my Linux instance (Ubuntu 12.04.3) - Then it arrives to Nginx (v1.4.7), that runs a module that deals with abuses (when there are too many requests) - Then it hits Tomcat (7.0.50) - Then it finally hits my java servlet. Thanks in advance, Brian ------=_NextPart_000_004E_01D04130.800BFF90--