tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zdeněk Henek <vrab...@gmail.com>
Subject Re: tomcat jmx disabled by default ?
Date Mon, 08 Apr 2013 05:49:38 GMT
Hi Jakub,

do you have running Tomcat and JConsole as same user?

JMX should really work out of box when both Tomcat and JConsole/JVisualVM
are in same machine and same user.

Regards,
Zdenek


On Sun, Apr 7, 2013 at 9:15 PM, Neven Cvetkovic
<neven.cvetkovic@gmail.com>wrote:

> Mark,
>
> When connecting to local jmx, connection is not over the network interface
> but through local Java process that you need to have access to. So I doubt
> that is Jakub's problem here.
>
> I've had issues when jdks didn't match and when different users were used
> to start JVM process.
>  On Apr 7, 2013 3:09 PM, "Mark Eggers" <its_toasted@yahoo.com> wrote:
>
> > On 4/7/2013 7:54 AM, Jakub 1983 wrote:
> >
> >> Neven,
> >>
> >> thx for your reply,
> >>
> >> so my question is why when I start my own main without passing
> >> -Dcom.sun.management.* properties I can connect to it with jconsole,
> >> but I cannot connect with jconsole to tomcat (although it is visible in
> >> jconsole) ?
> >>
> >> both my main, and tomcat, and jconsole are running on the same laptop.
> >>
> >> regards,
> >> Jakub
> >>
> >>
> >>
> >>
> >> On Sun, Apr 7, 2013 at 3:49 PM, Neven Cvetkovic
> >> <neven.cvetkovic@gmail.com>**wrote:
> >>
> >>  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" <jjakub83@gmail.com> 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<
> 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
> >>>>
> >>>>
> >>>
> >>
> > Works for me . . . I just started my Tomcat 7.0.39 with Java 6 and a Java
> > 6 version of jconsole connects right up:
> >
> > Environment:
> >
> > OS: Windows 7 Home Premium 64 bit
> > JRE / JDK: 1.6.0_43
> > Tomcat: 7.0.39
> >
> > I have a setenv.bat with:
> >
> > set "JRE_HOME=C:\Program Files\Java\jre6"
> >
> > since my normal environment is JRE / JDK 7.
> >
> > Maybe your Windows firewall isn't configured to allow Java network
> > connections? However that wouldn't explain why it works when JMX is
> > configured.
> >
> > . . . . just my two cents.
> > /mde/
> >
> >
> > ------------------------------**------------------------------**---------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org<
> users-unsubscribe@tomcat.apache.org>
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message