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 14B70F77D for ; Sun, 7 Apr 2013 13:49:56 +0000 (UTC) Received: (qmail 77334 invoked by uid 500); 7 Apr 2013 13:49:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 77246 invoked by uid 500); 7 Apr 2013 13:49:53 -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 77235 invoked by uid 99); 7 Apr 2013 13:49:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Apr 2013 13:49:52 +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 neven.cvetkovic@gmail.com designates 209.85.215.178 as permitted sender) Received: from [209.85.215.178] (HELO mail-ea0-f178.google.com) (209.85.215.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Apr 2013 13:49:46 +0000 Received: by mail-ea0-f178.google.com with SMTP id o10so1942702eaj.23 for ; Sun, 07 Apr 2013 06:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=ovP58VDSdfy7axLl+/W61Le6Rlba4eonoTpHKsMVj+4=; b=cOtulqPEYWHfZbvyTT70AW4grOL9lcucvsDh969Rdmguyv2X/3dv7Tyz2ID3RaEgDB oRIRP4tRoGaA3nkSpZvFQDKRvboOnnD46FO0fNH9WB8xt8log93/YkAxK/ntgjM88ra6 bKWVDqoHG6192+J0iY3YoD3uGDg6aszIRFM3VYQp5vwY0FVik+qAawKbZMcoQ8nb5V/d xkG87NYkiZ+4qt1xPCvG5BbOOPWK9CjotCC4MVWN5QHBbA3ibN+m3kN0CzZ0jAq/PZJ3 3OFB2dom9V80lZ9DW141roqKQQRP4+Pc8wHIPKeMXXRToWXC42Z+gWFusEMKqwvfb5AX I2Yw== MIME-Version: 1.0 X-Received: by 10.15.43.132 with SMTP id x4mr38972943eev.31.1365342566519; Sun, 07 Apr 2013 06:49:26 -0700 (PDT) Received: by 10.14.138.129 with HTTP; Sun, 7 Apr 2013 06:49:26 -0700 (PDT) Received: by 10.14.138.129 with HTTP; Sun, 7 Apr 2013 06:49:26 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Apr 2013 09:49:26 -0400 Message-ID: Subject: Re: tomcat jmx disabled by default ? From: Neven Cvetkovic To: Tomcat Users List Content-Type: multipart/alternative; boundary=089e0160c21cacc3a304d9c5962d X-Virus-Checked: Checked by ClamAV on apache.org --089e0160c21cacc3a304d9c5962d Content-Type: text/plain; charset=ISO-8859-1 Jakub, "You don't have to" configure Tomcat with above settings to get JMX. You are correct that JMX works out of the box. However, that works only locally, above commands are for REMOTE JMX access. You are opening up a jmx port so external (not same machine) jconsole or jvirtualvm can access JMX MBean server your Tomcat is running. Thus, if you want to connect to remote Tomcat instance, "you have to provide" JMX connection details, and that's what we often do. The above settings are best configured in CATALINA_HOME/bin/setenv.bat or setenv.sh script that you need to create. Even though this script doesn't exist by default, startup script calls it if it is created by user. All your customizations should be contained there. Hope that helps. Cheers! On Apr 7, 2013 5:59 AM, "Jakub 1983" wrote: > why do I have to enable jmx with command > > *set CATALINA_OPTS=-Dcom.sun.management.jmxremote \ > -Dcom.sun.management.jmxremote.port=%my.jmx.port% \ > -Dcom.sun.management.jmxremote.ssl=false \ > -Dcom.sun.management.jmxremote.authenticate=false* > > > http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html > > even when I run it *under java 6* ? > in java 6 jmx is active by default (it is active when I run my own main), > I cannot see how it is disabled by default by tomcat start scripts, > but when I run default startup, I cannot connect with jconsole, > when I set CATALINA_OPTS as above, it works fine, > but why doesn't it work without it ? > > regards > Jakub > --089e0160c21cacc3a304d9c5962d--