You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Adib <am...@gmail.com> on 2010/12/23 09:21:11 UTC
Problem connecting to tomcat6 service via JConsole on Windows Server 2008
Hi,
I am having a problem connecting to Tomcat 6 running as a service on Windows
Server 2008 R2. Here are the details of my setup.
32 Bit JDK 1.6._23
64 Bit Windows Server 2008 R2
My jakarta service log shows that I am setting the jvm properties to turn on
jmx remote access to the JVM
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6]
-Dcom.sun.management.jmxremote
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7]
-Dcom.sun.management.jmxremote.port=8999
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8]
-Dcom.sun.management.jmxremote.ssl=false
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9]
-Dcom.sun.management.jmxremote.authenticate=false
I am running jconsole on the same machine that is running tomcat so I am not
trying to connect remotely and should
not have any problems with ports I even turned off the windows firewall on
the machine to make sure it was not getting
in the way
systernals tcpview shows that tomact6.exe is listening on port 8999
I am running tomact6 service as the user pmtomact
I am running jconsole as the user Administrator
on the jconsole I tried localhost:8999 and it tries to connect for a while
then reports that it can can not connect.
I tried running tomcat as user administrator just starting from the
startup.bat with the proper jmx paramters and it does not work either.
I tried running jconsole as pmtomcat user still no luck connecting
I tried creating a directory under
C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that
the directory was writable by the pmtomcat user still it does not work.
Any ideas of how I can troubleshoot this problem, it is driving me crazy?
Re: httponly cookies
Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/12/23 Venky Vasant <ve...@yahoo.com>:
> Imagin my client application as browser , i am trying to read through a cookies
> for another web app which is hosted on .NET, which was all working fine and now
> cookies have httponly attribute which is actually new to me at this time
1. You cannot read "httponly" cookies from JavaScript. Never. That is
their purpose. The "httponly" flag is there to prevent JavaScript from
accessing the cookies.
2. You question is off-topic here.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: httponly cookies
Posted by Venky Vasant <ve...@yahoo.com>.
Imagin my client application as browser , i am trying to read through a cookies
for another web app which is hosted on .NET, which was all working fine and now
cookies have httponly attribute which is actually new to me at this time
but from what i went through over the net, these are more secured on a highlevel
and used specially for session ids
but i see IE 7 that i have works just fine so my client application should also
be able to work fine with header extraction
regards
Venky
________________________________
From: Konstantin Kolinko <kn...@gmail.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Thu, December 23, 2010 8:11:09 PM
Subject: Re: httponly cookies
2010/12/23 Venky Vasant <ve...@yahoo.com>:
>
> My client application failing to read cookies set as httponly by .net server.
>
> what lines do i need add to read them and send it to the server.
>
1. Do you know what "Httponly" means? (The basics)
2. What your application is? (What technology)
3. You are talking about ".net". Where is Tomcat here?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: httponly cookies
Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/12/23 Venky Vasant <ve...@yahoo.com>:
>
> My client application failing to read cookies set as httponly by .net server.
>
> what lines do i need add to read them and send it to the server.
>
1. Do you know what "Httponly" means? (The basics)
2. What your application is? (What technology)
3. You are talking about ".net". Where is Tomcat here?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: httponly cookies
Posted by Pid <pi...@pidster.com>.
On 23/12/2010 14:06, Venky Vasant wrote:
>
> My client application failing to read cookies set as httponly by .net server.
>
> what lines do i need add to read them and send it to the server.`
Please start a new email, rather than adding to or editing a reply to an
existing email thread - which is called thread-hijacking.
p
httponly cookies
Posted by Venky Vasant <ve...@yahoo.com>.
My client application failing to read cookies set as httponly by .net server.
what lines do i need add to read them and send it to the server.
Regards
Venky
Re: Problem connecting to tomcat6 service via JConsole on Windows
Server 2008
Posted by Pid <pi...@pidster.com>.
On 23/12/2010 09:20, André Warnier wrote:
> Shortly :
> If you are local, then you can use the "Local process" option in jconsole.
But usually not if you're using the service wrapper, which masks* the
JVM process from the Attach API used in Java 6 to provide the local
processes.
* for want of a better description
> Otherwise : as far as I remember, the jmx connection really uses 2
> ports, not only the one you obviously connect to. And that second port
> is random, which is what makes it difficult to connect through a
> firewall or so.
You can download the catalina-jmx-remote.jar from the Tomcat website to
pin JMX to two known port numbers, using a LifecycleListener.
p
> Maybe it is that second port that is blocked in your case ?
> Have another look with tcpview while you are trying to connect, if you
> do not see some new LISTEN port appear during the connection attempt.
>
>
> Adib wrote:
>> Hi,
>>
>> I am having a problem connecting to Tomcat 6 running as a service on
>> Windows
>> Server 2008 R2. Here are the details of my setup.
>>
>> 32 Bit JDK 1.6._23
>> 64 Bit Windows Server 2008 R2
>>
>> My jakarta service log shows that I am setting the jvm properties to
>> turn on
>> jmx remote access to the JVM
>>
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6]
>> -Dcom.sun.management.jmxremote
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7]
>> -Dcom.sun.management.jmxremote.port=8999
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8]
>> -Dcom.sun.management.jmxremote.ssl=false
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9]
>> -Dcom.sun.management.jmxremote.authenticate=false
>>
>> I am running jconsole on the same machine that is running tomcat so I
>> am not
>> trying to connect remotely and should
>> not have any problems with ports I even turned off the windows
>> firewall on
>> the machine to make sure it was not getting
>> in the way
>>
>> systernals tcpview shows that tomact6.exe is listening on port 8999
>>
>> I am running tomact6 service as the user pmtomact
>>
>> I am running jconsole as the user Administrator
>>
>> on the jconsole I tried localhost:8999 and it tries to connect for a
>> while
>> then reports that it can can not connect.
>>
>> I tried running tomcat as user administrator just starting from the
>> startup.bat with the proper jmx paramters and it does not work either.
>>
>> I tried running jconsole as pmtomcat user still no luck connecting
>>
>> I tried creating a directory under
>> C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that
>> the directory was writable by the pmtomcat user still it does not work.
>>
>> Any ideas of how I can troubleshoot this problem, it is driving me crazy?
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
RE: RETomcat Load Balancing
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Singh, Harsimranjit (NSN - IN/Bangalore) [mailto:harsimranjit.singh@nsn.com]
> Subject: RETomcat Load Balancing
> How I can resolve it!
Start by not hijacking other people's threads. If you have a new topic, start a new thread - do not just reply to a random one from the list.
You might also want to supply some real information.
http://www.catb.org/~esr/faqs/smart-questions.html
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RETomcat Load Balancing
Posted by "Singh, Harsimranjit (NSN - IN/Bangalore)" <ha...@nsn.com>.
Hi
I am able to test load balancing and clustering with multiple tomcat instances using rule.xml.but when tomcat balancer redirect requests to tomcat cluster instance ist displays port of tomcat cluster.So am not able redirection display clearly details of new tomcate
How I can resolve it!
Thanks
-----Original Message-----
From: ext Adib [mailto:amslist@gmail.com]
Sent: Thursday, December 23, 2010 3:32 PM
To: Tomcat Users List
Subject: Re: Problem connecting to tomcat6 service via JConsole on Windows Server 2008
The local process option seems to be a hit and miss on various versions of
windows, it was not working. Also the local process option only works if
jconsole is running the same userid as process you want to connect to, which
is not the case in my tomcat setup which is running as a service.
I tested my setup on my Vista 64 bit laptop an it worked which narrowed the
problem down to something about Windows Server 2008 R2.
A bit more googling led me this problem repot
http://tai-dev.blog.co.uk/2010/03/26/glassfish-jmx-and-windows-web-server-2008-can-play-together-with-a-few-tweaks-here-s-how-plus-bonus-jconsole-config-info-8251001/
and the fix was to add -Djava.rmi.server.hostname=127.0.0.1 to my command
line options for the service. I have no idea why this setting fixes the
problem but it does.
Has anyone found any good documentation on how JVM instrumentation works and
why it is so troublesome to connect to an instrumented hotspot vm.
On Thu, Dec 23, 2010 at 1:20 AM, André Warnier <aw...@ice-sa.com> wrote:
> Shortly :
> If you are local, then you can use the "Local process" option in jconsole.
>
> Otherwise : as far as I remember, the jmx connection really uses 2 ports,
> not only the one you obviously connect to. And that second port is random,
> which is what makes it difficult to connect through a firewall or so.
> Maybe it is that second port that is blocked in your case ?
> Have another look with tcpview while you are trying to connect, if you do
> not see some new LISTEN port appear during the connection attempt.
>
>
>
> Adib wrote:
>
>> Hi,
>>
>> I am having a problem connecting to Tomcat 6 running as a service on
>> Windows
>> Server 2008 R2. Here are the details of my setup.
>>
>> 32 Bit JDK 1.6._23
>> 64 Bit Windows Server 2008 R2
>>
>> My jakarta service log shows that I am setting the jvm properties to turn
>> on
>> jmx remote access to the JVM
>>
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6]
>> -Dcom.sun.management.jmxremote
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7]
>> -Dcom.sun.management.jmxremote.port=8999
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8]
>> -Dcom.sun.management.jmxremote.ssl=false
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9]
>> -Dcom.sun.management.jmxremote.authenticate=false
>>
>> I am running jconsole on the same machine that is running tomcat so I am
>> not
>> trying to connect remotely and should
>> not have any problems with ports I even turned off the windows firewall on
>> the machine to make sure it was not getting
>> in the way
>>
>> systernals tcpview shows that tomact6.exe is listening on port 8999
>>
>> I am running tomact6 service as the user pmtomact
>>
>> I am running jconsole as the user Administrator
>>
>> on the jconsole I tried localhost:8999 and it tries to connect for a while
>> then reports that it can can not connect.
>>
>> I tried running tomcat as user administrator just starting from the
>> startup.bat with the proper jmx paramters and it does not work either.
>>
>> I tried running jconsole as pmtomcat user still no luck connecting
>>
>> I tried creating a directory under
>> C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that
>> the directory was writable by the pmtomcat user still it does not work.
>>
>> Any ideas of how I can troubleshoot this problem, it is driving me crazy?
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Problem connecting to tomcat6 service via JConsole on Windows
Server 2008
Posted by Pid <pi...@pidster.com>.
On 23/12/2010 19:32, Adib wrote:
> Pid thanks or your comments below.
>
> Any idea why it was working just fine on a windows Vista machine but not on
> Windows 2008 R2. One of the main differences between the two machines is
> that the windows server has multiple IP addresses on the same network card,
> could that be causing the agent to get confused as to what ip address to use
> for the second port.
You can use netstat to see what addresses & ports the JMX services are
listening on.
If the JMX ports are listening on different addresses, that would be a(n
unlikely) problem. It's reasonable to consider it.
p
Re: CLOSE_WAIT
Posted by André Warnier <aw...@ice-sa.com>.
Peter Crowther wrote:
> On 2 February 2011 10:24, Bw57899 <bw...@gmail.com> wrote:
>
>> Install an application in apache tomcat (6.0.29) in dev env on Solaris 10
>> with no issue.
>>
>> But after move to production, there are always about 50 ~ 100 CLOSE_WAIT on
>> port 1521. The application need connect an Oracle database which is on
>> another server.
>>
>> So what can I do to check the problem?
>>
>> CLOSE_WAIT is normal behaviour - after a TCP socket is closed, it's
> tombstoned for a period so that the TCP stack knows what to do with incoming
> datagrams that might be late.
>
Peter,
I do not think that this is true, and I believe that you are confusing this with the
TIME_WAIT state.
See for example this :
http://support.microsoft.com/kb/137984
CLOSE_WAIT:
A socket application has been terminated, but Netstat reports the socket in a CLOSE_WAIT
state. This could indicate that the client properly closed the connection (FIN has been
sent), but the server still has its socket open. This could be the result of one instance
(among all threads or processes) of the socket not being closed.
I had/have a case like that with a third-party Tomcat application.
It goes typically like this :
The webapp creates an object C which among other things makes a TCP connection to another
server.
The webapp then uses this object's methods to send/receive data from the other server.
At the end of this exchange, the webapp sends a command to the external server, to tell it
"I'm done". The external server then closes its end of the connection.
Now the webapp, by means of closing the connection, sets the object C = null.
For the webapp, this means that the connection object C is now effectively "closed".
But in fact, the object C still exists somewhere on the heap, and it still holds on to its
underlying (OS-level) socket, which has never been closed from the Tomcat server side.
The underlying TCP connection is in the CLOSE_WAIT state, because the socket has never
been closed on the Tomcat server side, and it remains "dangling".
It only disappears when the Tomcat JVM does a GC, and the Object C is really discarded.
That really closes the underlying TCP socket, and then the state progresses LAST_ACK and
finally CLOSED and gone.
An easy way to verify if this is the case of the OP, is to force Tomcat to do a GC, and
see if these CLOSE_WAIT connections then disappear.
If it is the case, then I would advise the OP to check his webapp, to see if it does not
do the same kind of thing as described above.
One problem that I have seen happen with this, is that as the number of CLOSE_WAIT sockets
increases (to a few hundred), the whole server becomes unable to handle further TCP
connections of any kind, being in the practice paralysed.
I suppose that there must exist some inherent limit as to the maximum number of sockets
which a system (or a process) can have active at any one time.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CLOSE_WAIT
Posted by Peter Crowther <pe...@melandra.com>.
On 2 February 2011 10:24, Bw57899 <bw...@gmail.com> wrote:
> Install an application in apache tomcat (6.0.29) in dev env on Solaris 10
> with no issue.
>
> But after move to production, there are always about 50 ~ 100 CLOSE_WAIT on
> port 1521. The application need connect an Oracle database which is on
> another server.
>
> So what can I do to check the problem?
>
> CLOSE_WAIT is normal behaviour - after a TCP socket is closed, it's
tombstoned for a period so that the TCP stack knows what to do with incoming
datagrams that might be late.
Why do you think this is a problem? Except that you might be opening and
closing a lot of connections to Oracle?
- Peter
Re: CLOSE_WAIT
Posted by Michael Ludwig <mi...@gmx.de>.
Peter Crowther schrieb am 03.02.2011 um 11:47 (+0000):
> On 3 February 2011 11:35, Pid <pi...@pidster.com> wrote:
>
> > What factor caused so many people to hijack this thread?
> >
> Using a mail client such as Gmail, which performs its own threading
> and doesn't respect or even show the thread ID.
Or something "Produced By Microsoft Exchange V6.5" (thread hijacker #1),
or Yahoo Mail (TH2), or iPhone (TH3). It's not simply to blame on
technology, I guess. :-)
--
Michael Ludwig
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CLOSE_WAIT
Posted by Peter Crowther <pe...@melandra.com>.
On 3 February 2011 11:35, Pid <pi...@pidster.com> wrote:
> What factor caused so many people to hijack this thread?
>
> Using a mail client such as Gmail, which performs its own threading and
doesn't respect or even show the thread ID.
(And, Andre, you're right, I was confusing the two states - my bad)
- Peter
Re: CLOSE_WAIT
Posted by Pid <pi...@pidster.com>.
What factor caused so many people to hijack this thread?
Dear Bw57899,
Please, in future, do not edit the subject line & body of a reply to an
existing thread, create a new email and address it to
users@tomcat.apache.org - otherwise you leave all of the mail headers
intact.
This frowned-upon practice is called thread-hijacking because it places
new messages in the middle of an existing thread.
p
CLOSE_WAIT
Posted by Bw57899 <bw...@gmail.com>.
Install an application in apache tomcat (6.0.29) in dev env on Solaris 10 with no issue.
But after move to production, there are always about 50 ~ 100 CLOSE_WAIT on port 1521. The application need connect an Oracle database which is on another server.
So what can I do to check the problem?
Regards
Bill
>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Problem connecting to tomcat6 service via JConsole on Windows
Server 2008
Posted by Adib <am...@gmail.com>.
Pid thanks or your comments below.
Any idea why it was working just fine on a windows Vista machine but not on
Windows 2008 R2. One of the main differences between the two machines is
that the windows server has multiple IP addresses on the same network card,
could that be causing the agent to get confused as to what ip address to use
for the second port.
On Thu, Dec 23, 2010 at 3:37 AM, Pid <pi...@pidster.com> wrote:
> On 23/12/2010 10:01, Adib wrote:
> > The local process option seems to be a hit and miss on various versions
> of
> > windows, it was not working. Also the local process option only works if
> > jconsole is running the same userid as process you want to connect to,
> which
> > is not the case in my tomcat setup which is running as a service.
>
> re: 'masks', the above is a better description.
>
> > I tested my setup on my Vista 64 bit laptop an it worked which narrowed
> the
> > problem down to something about Windows Server 2008 R2.
> >
> > A bit more googling led me this problem repot
> >
> http://tai-dev.blog.co.uk/2010/03/26/glassfish-jmx-and-windows-web-server-2008-can-play-together-with-a-few-tweaks-here-s-how-plus-bonus-jconsole-config-info-8251001/
> >
> > and the fix was to add -Djava.rmi.server.hostname=127.0.0.1 to my command
> > line options for the service. I have no idea why this setting fixes the
> > problem but it does.
>
> Because when JMX looks for the connection to the second port, it uses
> the hostname as part of the argument. Setting 127.0.0.1 ensures it can
> find it's own ar**, if you're connecting locally.
>
> > Has anyone found any good documentation on how JVM instrumentation works
> and
> > why it is so troublesome to connect to an instrumented hotspot vm.
>
> Not really. I have gleaned it from various sources.
>
> Java 6 uses the Attach API - which enumerates JVM processes on the local
> machine, and permits another Java process to attach and set system
> properties, and load Java Agents.
>
> Tools like JConsole and VisualVM use it to display a list of processes.
>
> When you connect to the process, it checks to see if the JMX agent is
> enabled; if not it loads the management-agent.jar from %JAVA_HOME%/lib,
> which enables JMX on a 'local connector stub' - which can be read and
> converted to a JMX connection.
>
> As you point out, the attaching process must have the same privileges as
> the target process[1], but it must also be able to create a temporary
> file on a filesystem which can permits user permissions (ie suitably
> configured NTFS).
>
>
> An additional complication, as described by André, is that JMX actually
> needs two ports, (the other for the RMI registry), and the second port
> is (usually) assigned random-ish-ly. (catalina-jmx-remote.jar fixes this.)
>
>
> p
>
>
>
Re: Problem connecting to tomcat6 service via JConsole on Windows
Server 2008
Posted by Pid <pi...@pidster.com>.
On 23/12/2010 10:01, Adib wrote:
> The local process option seems to be a hit and miss on various versions of
> windows, it was not working. Also the local process option only works if
> jconsole is running the same userid as process you want to connect to, which
> is not the case in my tomcat setup which is running as a service.
re: 'masks', the above is a better description.
> I tested my setup on my Vista 64 bit laptop an it worked which narrowed the
> problem down to something about Windows Server 2008 R2.
>
> A bit more googling led me this problem repot
> http://tai-dev.blog.co.uk/2010/03/26/glassfish-jmx-and-windows-web-server-2008-can-play-together-with-a-few-tweaks-here-s-how-plus-bonus-jconsole-config-info-8251001/
>
> and the fix was to add -Djava.rmi.server.hostname=127.0.0.1 to my command
> line options for the service. I have no idea why this setting fixes the
> problem but it does.
Because when JMX looks for the connection to the second port, it uses
the hostname as part of the argument. Setting 127.0.0.1 ensures it can
find it's own ar**, if you're connecting locally.
> Has anyone found any good documentation on how JVM instrumentation works and
> why it is so troublesome to connect to an instrumented hotspot vm.
Not really. I have gleaned it from various sources.
Java 6 uses the Attach API - which enumerates JVM processes on the local
machine, and permits another Java process to attach and set system
properties, and load Java Agents.
Tools like JConsole and VisualVM use it to display a list of processes.
When you connect to the process, it checks to see if the JMX agent is
enabled; if not it loads the management-agent.jar from %JAVA_HOME%/lib,
which enables JMX on a 'local connector stub' - which can be read and
converted to a JMX connection.
As you point out, the attaching process must have the same privileges as
the target process[1], but it must also be able to create a temporary
file on a filesystem which can permits user permissions (ie suitably
configured NTFS).
An additional complication, as described by André, is that JMX actually
needs two ports, (the other for the RMI registry), and the second port
is (usually) assigned random-ish-ly. (catalina-jmx-remote.jar fixes this.)
p
> On Thu, Dec 23, 2010 at 1:20 AM, André Warnier <aw...@ice-sa.com> wrote:
>
>> Shortly :
>> If you are local, then you can use the "Local process" option in jconsole.
>>
>> Otherwise : as far as I remember, the jmx connection really uses 2 ports,
>> not only the one you obviously connect to. And that second port is random,
>> which is what makes it difficult to connect through a firewall or so.
>> Maybe it is that second port that is blocked in your case ?
>> Have another look with tcpview while you are trying to connect, if you do
>> not see some new LISTEN port appear during the connection attempt.
>>
>>
>>
>> Adib wrote:
>>
>>> Hi,
>>>
>>> I am having a problem connecting to Tomcat 6 running as a service on
>>> Windows
>>> Server 2008 R2. Here are the details of my setup.
>>>
>>> 32 Bit JDK 1.6._23
>>> 64 Bit Windows Server 2008 R2
>>>
>>> My jakarta service log shows that I am setting the jvm properties to turn
>>> on
>>> jmx remote access to the JVM
>>>
>>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6]
>>> -Dcom.sun.management.jmxremote
>>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7]
>>> -Dcom.sun.management.jmxremote.port=8999
>>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8]
>>> -Dcom.sun.management.jmxremote.ssl=false
>>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9]
>>> -Dcom.sun.management.jmxremote.authenticate=false
>>>
>>> I am running jconsole on the same machine that is running tomcat so I am
>>> not
>>> trying to connect remotely and should
>>> not have any problems with ports I even turned off the windows firewall on
>>> the machine to make sure it was not getting
>>> in the way
>>>
>>> systernals tcpview shows that tomact6.exe is listening on port 8999
>>>
>>> I am running tomact6 service as the user pmtomact
>>>
>>> I am running jconsole as the user Administrator
>>>
>>> on the jconsole I tried localhost:8999 and it tries to connect for a while
>>> then reports that it can can not connect.
>>>
>>> I tried running tomcat as user administrator just starting from the
>>> startup.bat with the proper jmx paramters and it does not work either.
>>>
>>> I tried running jconsole as pmtomcat user still no luck connecting
>>>
>>> I tried creating a directory under
>>> C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that
>>> the directory was writable by the pmtomcat user still it does not work.
>>>
>>> Any ideas of how I can troubleshoot this problem, it is driving me crazy?
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
Re: Problem connecting to tomcat6 service via JConsole on Windows
Server 2008
Posted by Adib <am...@gmail.com>.
The local process option seems to be a hit and miss on various versions of
windows, it was not working. Also the local process option only works if
jconsole is running the same userid as process you want to connect to, which
is not the case in my tomcat setup which is running as a service.
I tested my setup on my Vista 64 bit laptop an it worked which narrowed the
problem down to something about Windows Server 2008 R2.
A bit more googling led me this problem repot
http://tai-dev.blog.co.uk/2010/03/26/glassfish-jmx-and-windows-web-server-2008-can-play-together-with-a-few-tweaks-here-s-how-plus-bonus-jconsole-config-info-8251001/
and the fix was to add -Djava.rmi.server.hostname=127.0.0.1 to my command
line options for the service. I have no idea why this setting fixes the
problem but it does.
Has anyone found any good documentation on how JVM instrumentation works and
why it is so troublesome to connect to an instrumented hotspot vm.
On Thu, Dec 23, 2010 at 1:20 AM, André Warnier <aw...@ice-sa.com> wrote:
> Shortly :
> If you are local, then you can use the "Local process" option in jconsole.
>
> Otherwise : as far as I remember, the jmx connection really uses 2 ports,
> not only the one you obviously connect to. And that second port is random,
> which is what makes it difficult to connect through a firewall or so.
> Maybe it is that second port that is blocked in your case ?
> Have another look with tcpview while you are trying to connect, if you do
> not see some new LISTEN port appear during the connection attempt.
>
>
>
> Adib wrote:
>
>> Hi,
>>
>> I am having a problem connecting to Tomcat 6 running as a service on
>> Windows
>> Server 2008 R2. Here are the details of my setup.
>>
>> 32 Bit JDK 1.6._23
>> 64 Bit Windows Server 2008 R2
>>
>> My jakarta service log shows that I am setting the jvm properties to turn
>> on
>> jmx remote access to the JVM
>>
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6]
>> -Dcom.sun.management.jmxremote
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7]
>> -Dcom.sun.management.jmxremote.port=8999
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8]
>> -Dcom.sun.management.jmxremote.ssl=false
>> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9]
>> -Dcom.sun.management.jmxremote.authenticate=false
>>
>> I am running jconsole on the same machine that is running tomcat so I am
>> not
>> trying to connect remotely and should
>> not have any problems with ports I even turned off the windows firewall on
>> the machine to make sure it was not getting
>> in the way
>>
>> systernals tcpview shows that tomact6.exe is listening on port 8999
>>
>> I am running tomact6 service as the user pmtomact
>>
>> I am running jconsole as the user Administrator
>>
>> on the jconsole I tried localhost:8999 and it tries to connect for a while
>> then reports that it can can not connect.
>>
>> I tried running tomcat as user administrator just starting from the
>> startup.bat with the proper jmx paramters and it does not work either.
>>
>> I tried running jconsole as pmtomcat user still no luck connecting
>>
>> I tried creating a directory under
>> C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that
>> the directory was writable by the pmtomcat user still it does not work.
>>
>> Any ideas of how I can troubleshoot this problem, it is driving me crazy?
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Problem connecting to tomcat6 service via JConsole on Windows
Server 2008
Posted by André Warnier <aw...@ice-sa.com>.
Shortly :
If you are local, then you can use the "Local process" option in jconsole.
Otherwise : as far as I remember, the jmx connection really uses 2 ports, not only the one
you obviously connect to. And that second port is random, which is what makes it difficult
to connect through a firewall or so.
Maybe it is that second port that is blocked in your case ?
Have another look with tcpview while you are trying to connect, if you do not see some new
LISTEN port appear during the connection attempt.
Adib wrote:
> Hi,
>
> I am having a problem connecting to Tomcat 6 running as a service on Windows
> Server 2008 R2. Here are the details of my setup.
>
> 32 Bit JDK 1.6._23
> 64 Bit Windows Server 2008 R2
>
> My jakarta service log shows that I am setting the jvm properties to turn on
> jmx remote access to the JVM
>
> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6]
> -Dcom.sun.management.jmxremote
> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7]
> -Dcom.sun.management.jmxremote.port=8999
> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8]
> -Dcom.sun.management.jmxremote.ssl=false
> [2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9]
> -Dcom.sun.management.jmxremote.authenticate=false
>
> I am running jconsole on the same machine that is running tomcat so I am not
> trying to connect remotely and should
> not have any problems with ports I even turned off the windows firewall on
> the machine to make sure it was not getting
> in the way
>
> systernals tcpview shows that tomact6.exe is listening on port 8999
>
> I am running tomact6 service as the user pmtomact
>
> I am running jconsole as the user Administrator
>
> on the jconsole I tried localhost:8999 and it tries to connect for a while
> then reports that it can can not connect.
>
> I tried running tomcat as user administrator just starting from the
> startup.bat with the proper jmx paramters and it does not work either.
>
> I tried running jconsole as pmtomcat user still no luck connecting
>
> I tried creating a directory under
> C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that
> the directory was writable by the pmtomcat user still it does not work.
>
> Any ideas of how I can troubleshoot this problem, it is driving me crazy?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org