Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 8465 invoked from network); 7 Oct 2004 19:55:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Oct 2004 19:55:59 -0000 Received: (qmail 22904 invoked by uid 500); 7 Oct 2004 19:55:45 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 22724 invoked by uid 500); 7 Oct 2004 19:55:43 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 22705 invoked by uid 99); 7 Oct 2004 19:55:42 -0000 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of jak-tomcat-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO main.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 07 Oct 2004 12:55:42 -0700 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CFeMV-0001aS-00 for ; Thu, 07 Oct 2004 21:55:39 +0200 Received: from adsl-63-201-230-69.dsl.snfc21.pacbell.net ([63.201.230.69]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Oct 2004 21:55:39 +0200 Received: from cmanolache by adsl-63-201-230-69.dsl.snfc21.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Oct 2004 21:55:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: tomcat-dev@jakarta.apache.org From: Costin Manolache Subject: Re: JMX Remote connection Date: Thu, 07 Oct 2004 12:55:00 -0700 Lines: 96 Message-ID: References: <008401c4ab65$8fcf4a70$a3b40704@oemcomputer> <4163B03E.2060403@apache.org> <416429CA.9060502@apache.org> <4164350B.40105@post.pl> <41656189.5090207@apache.org> <41656790.9030107@ptc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adsl-63-201-230-69.dsl.snfc21.pacbell.net User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en In-Reply-To: <41656790.9030107@ptc.com> Sender: news X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Jess Holle wrote: > In general the same-user, same-machine stuff works great (including with > Tomcat 5) if you specify > > -Dcom.sun.management.jmxremote > > as part of the command line. Again - remember not everyone is using Sun JDK1.5 implementation. My understanding is Macs don't have 1.5 yet, neither most other platforms. > > This is without any special web app or such. > > What I really want to see is a nice bit of code that allows you to fire > up a JMX RMI connector that: > > * Finds the first free port in a range (e.g. assuming you have a > number of slave processes, this does not apply to Tomcat as it > does not have such logic for it AJP port, etc). > * Support user/password and SSL > * Does not rely on implementation internals, i.e. requiring Java 5 > is fine, but having hooks into sun.* or MX4J or whatever classes > is no good That's not hard to add. You actually need the first free port in the range for rmiregistry - or you can use existing rmiregistry if one is found. You need different rmi names - that's easier. Adding user/pass/ssl is not hard - if someone has the itch it shouldn't be a problem. javax.man.remote has all that's needed AFAIK. IF you look at jmxremote webapp that I checked in - there is no mx4j or sun code, just plain javax. Costin > > -- > Jess Holle > > Remy Maucherat wrote: > >> Dominik Drzewiecki wrote: >> >>> >>>> I couldn't get the attach to process thing to work, though (= >>>> without a port). Is it supposed to be doable ? >>> >>> >>> >>> >>> Neither have I (I am talking of tomcat running as Windows service). >>> It seems that both processes : tomcat JVM and jconsole JVM have to be >>> owned by the same user. Maybe that is the case with you? Hovewer, >>> starting tomcat from my system account solves the problem. >>> For more info see: >>> http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html >>> >>> >>> Both jconsole and the application must by executed by the same user >>> name. The management and monitoring system uses the operating >>> system's file permissions. >>> >> >> >> >> I'm running both with the same usename on Windows, and it doesn't >> work. Since it's Windows and I like to be able to do stuff, I of >> course run with root privileges. Seems to me it would work on Unix, >> but is currently broken on Windows (I use XP pro SP 2), or something. >> Over a TCP port, it works good. >> >> I couldn't find a comprehensive guide on all these nice system >> properties, while there's tons of docs on the new command line commands. >> >> If I use the service, which runs with the SYSTEM account, it of course >> doesn't work any better ;) >> >> R�my >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org