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 6AE6818D81 for ; Mon, 6 Jul 2015 09:49:02 +0000 (UTC) Received: (qmail 55122 invoked by uid 500); 6 Jul 2015 09:48:58 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 55058 invoked by uid 500); 6 Jul 2015 09:48:58 -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 55047 invoked by uid 99); 6 Jul 2015 09:48:58 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jul 2015 09:48:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 58A221827F2 for ; Mon, 6 Jul 2015 09:48:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id PrDn1UdcYJww for ; Mon, 6 Jul 2015 09:48:53 +0000 (UTC) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id EE91120DC7 for ; Mon, 6 Jul 2015 09:48:52 +0000 (UTC) Received: by wifm2 with SMTP id m2so24219029wif.1 for ; Mon, 06 Jul 2015 02:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=V5xyC+QdZwTSS7hhJyto7oeAZeexs2bkT0BETQV1/4M=; b=VeLgK4EXl3I7W2t5r4IN0g/kc67XtR3pzrCJdOLrVowbHvlXIfAA4ejKWcKDOyzXap 2E+piGnWd+krW+xEVgyGdbvsCLN8s9tsB/JsmV1kvfwHRP/M4dRI+B6sFZXf4AHzmNZi W1G166kEIT0+kPMksvrh3lFFXoXuAZd3Ici+JUsgyW9Pn3izYqVZ9tDEYwa2+8fTzkgH dOO0OSfJjwZ3iYzedeWCkjORuglTRbkD6cWGUOM5ZXKbi4kn+AdFlJ7OI+OaD+29maIj TnRwjh/tozs/n1hq7rOm74JqOGbi11Hymp72LURQAu8GCJUq4fokl4MrT3/cMMnlVxKb RvvQ== X-Received: by 10.180.24.40 with SMTP id r8mr53694886wif.24.1436176126547; Mon, 06 Jul 2015 02:48:46 -0700 (PDT) MIME-Version: 1.0 From: Alex Soto Date: Mon, 06 Jul 2015 09:48:37 +0000 Message-ID: Subject: Apache HTTPD (with SSL) + mod_jk + TomEE (Tomcat) nullify the ssl session id To: users@tomcat.apache.org Content-Type: multipart/alternative; boundary=f46d043c805adb9958051a31cfb1 --f46d043c805adb9958051a31cfb1 Content-Type: text/plain; charset=UTF-8 Hello I have seen a strange behaviour in Apache HTTPD (2.4) and TomEE (in fact it is a Tomcat (7.0.61) so it is exactly the same for Tomcat) when I configure Apache server with SSL and mod_jk. In fact I am not sure where it is the problem if in mod_jk, in Apache Server or in Tomcat, but I suspect that maybe the problem is on mod_jk configuration. I am configuring the typical Apache as frontend and TomEE(Tomcat) as backend solution. Currently Apache is configured with SSL and with mod_jk it connects to TomEE using AJP. This works perfectly. The problem is that inside my code I need to get the ssl session id: String ssl = (String)servletRequest.getAttribute("javax.servlet.request.ssl_session_id"); I don't know why but sometimes this attribute is null and sometimes not. It may return a null at first then stay like 10 requests working and then stop working again during some requests and the get attribute returns null. It seems that everything is configured correctly since sometimes works. Have you ever found something similar or knows what it can be happening? Do you think that maybe the problem is on client (browser) side? Everything is dockerized here: https://github.com/lordofthejars/apache-tomee-ssl so you can review configuration files of tomcat and apache or even run it. Thank you so much for your support. --f46d043c805adb9958051a31cfb1--