You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by André Warnier <aw...@ice-sa.com> on 2009/02/05 09:21:04 UTC

Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Peter Crowther wrote:
>> From: André Warnier [mailto:aw@ice-sa.com]
>> Christopher Schultz wrote:
>>> What about forwarding X through the tunnel instead?
>>>
>> You can't, because it is variable. It is the result of some internal
>> "negotiation" between Jconsole and the remote JVM.
>> Apparently, anyway. I haven't managed to make it work so far.
> 
> To expand Chris' suggestion: What about forwarding the X11 protocol through the tunnel instead, such that you can run Jconsole on the same machine as the JVM?  X11 has a fixed port number, and ssh has support for this.  I've used this trick when needing to do something graphical on a box with ssh-only access; works a treat.
> 
Sorry to be so obtuse. "X" is not something I use regularly, so when 
Chris mentioned X, I thought he was talking about the secondary 
connection/port that the JVM/Jconsole agree on, not about X-terminal and so.

So thanks for the tip, but could you expand even more ?
I realise this isn't really a Tomcat matter, but maybe this can help 
someone else in a similar situation.

At which level would X11 kick in ?

Layout is as follows :

Office A :
workstation (me) --> firewall/router -> internet modem --> internet
Office B :
internet -> internet modem -> firewall/router -> Tomcat host

There is no VPN setup between A and B.

My workstation is a Windows laptop. I don't presently have an X emulator 
on it. It has Java JDK 6, an SSH terminal-like program (putty), WinSCP, 
etc..  I'd rather avoid installing Cygwin on the laptop, because it 
interferes with other Unix-like things I have on it.

The Tomcat host has a fixed internal IP address.
I could also fix the internal IP address of my workstation.
I have full control of the routers/firewalls/hosts.
The firewall/router at B automatically tunnels ports 22,80,8080 and some 
others to the Tomcat host. I can add more tunnels.
I can also build on-demand tunnels from outside to any inside host/port 
via the firewall and SSH.  Doing something in the other direction is 
more tricky , because both Office A and B have variable internet IP 
addresses which change once per 24h (both with dynamic DNS though).

I'm usually at A. B is my "home office", and when my laptop is there, I 
have no problem running JConsole on it and connecting to the Tomcat 
host, because both are then on the same LAN. But I haven't managed that 
yet from A.

?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by Gregor Schneider <rc...@googlemail.com>.
http://solaris.reys.net/english/2006/04/x11_forwarding

Works pretty much the same on any other Linux

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by Pieter Temmerman <pt...@sadiel.es>.
The disadvantage of running these tools on the server that also runs
Tomcat is that these tools generate certain load, which under some
circumstances is not wanted as it might influence the stats.

On Thu, 2009-02-05 at 14:15 +0100, André Warnier wrote:
> Mark Thomas wrote:
> > Peter Crowther wrote:
> >>> From: André Warnier [mailto:aw@ice-sa.com]
> >>> using XMing as the X11 server (client?, I can never remember..).
> >> Yeah, X's terminology is very counter-intuitive - I get comments of "you're kidding" every time I teach it.  An X server serves out the keyboard, mouse and display.  X11 clients connect to the X11 display server in order to display their output and get their input.
> >>
> >> All of which means that you often use an X server running on your workstation or "thin client" to connect to X client programs running on your application/web/... server.
> > 
> > You might also want to look at
> > org.apache.catalina.mbeans.JMXAdaptorLifecycleListener in
> > http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
> > 
> > Something similar also exists for 6.0.x
> > 
> Thanks Mark.
> That page is a bit obscure for someone like me not making Tomcat and 
> Java their main focus, but do I understand it correctly in that it would 
> mean that the variable second port connection would no longer be 
> variable, thus allowing JConsole to connect to it through 2 pre-created 
> SSH tunnels (as long as one inserts the indicated Listener element in 
> the server.xml of a Tomcat 5.5.25+ ) ?
> 
> (admittedly, some people might consider this question a bit obscure too)
> 
> As a secondary question, does the fact of adding such a Listener have 
> any discernable impact on Tomcat's performance (when JConsole is not in 
> use) ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
-- 
Pieter Temmerman
email: ptemmerman.ext@sadiel.es
skype: ptemmerman.sadiel

SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by André Warnier <aw...@ice-sa.com>.
Mark Thomas wrote:
> Peter Crowther wrote:
>>> From: André Warnier [mailto:aw@ice-sa.com]
>>> using XMing as the X11 server (client?, I can never remember..).
>> Yeah, X's terminology is very counter-intuitive - I get comments of "you're kidding" every time I teach it.  An X server serves out the keyboard, mouse and display.  X11 clients connect to the X11 display server in order to display their output and get their input.
>>
>> All of which means that you often use an X server running on your workstation or "thin client" to connect to X client programs running on your application/web/... server.
> 
> You might also want to look at
> org.apache.catalina.mbeans.JMXAdaptorLifecycleListener in
> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
> 
> Something similar also exists for 6.0.x
> 
Thanks Mark.
That page is a bit obscure for someone like me not making Tomcat and 
Java their main focus, but do I understand it correctly in that it would 
mean that the variable second port connection would no longer be 
variable, thus allowing JConsole to connect to it through 2 pre-created 
SSH tunnels (as long as one inserts the indicated Listener element in 
the server.xml of a Tomcat 5.5.25+ ) ?

(admittedly, some people might consider this question a bit obscure too)

As a secondary question, does the fact of adding such a Listener have 
any discernable impact on Tomcat's performance (when JConsole is not in 
use) ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by Mark Thomas <ma...@apache.org>.
Peter Crowther wrote:
>> From: André Warnier [mailto:aw@ice-sa.com]
>> using XMing as the X11 server (client?, I can never remember..).
> 
> Yeah, X's terminology is very counter-intuitive - I get comments of "you're kidding" every time I teach it.  An X server serves out the keyboard, mouse and display.  X11 clients connect to the X11 display server in order to display their output and get their input.
> 
> All of which means that you often use an X server running on your workstation or "thin client" to connect to X client programs running on your application/web/... server.

You might also want to look at
org.apache.catalina.mbeans.JMXAdaptorLifecycleListener in
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html

Something similar also exists for 6.0.x

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by Peter Crowther <Pe...@melandra.com>.
> From: André Warnier [mailto:aw@ice-sa.com]
> using XMing as the X11 server (client?, I can never remember..).

Yeah, X's terminology is very counter-intuitive - I get comments of "you're kidding" every time I teach it.  An X server serves out the keyboard, mouse and display.  X11 clients connect to the X11 display server in order to display their output and get their input.

All of which means that you often use an X server running on your workstation or "thin client" to connect to X client programs running on your application/web/... server.

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by André Warnier <aw...@ice-sa.com>.
Hi.
Thanks Chris and Peter and Gregor.
Gregor sent me a link to an article that looks promising, and says 
basically the same as Peter below, using XMing as the X11 server 
(client?, I can never remember..).
I will try that tonight.

Peter Crowther wrote:

>> From: André Warnier [mailto:aw@ice-sa.com]
>> "X" is not something I use regularly, so when
>> Chris mentioned X, I thought he was talking about the secondary
>> connection/port that the JVM/Jconsole agree on, not about
>> X-terminal and so.
>>
>> So thanks for the tip, but could you expand even more ?
>> I realise this isn't really a Tomcat matter, but maybe this can help
>> someone else in a similar situation.
>>
>> At which level would X11 kick in ?
> 
> It ships the stream of commands to display JConsole on your local desktop.  Rough sequence of events:
> 
> - Start an X11 server on your workstation.  Find out its DISPLAY variable.
> - If using PuTTY, tell it about your X11 DISPLAY variable.  It can't guess!
> - Use ssh/PuTTY with X11 tunnelling enabled to remote to your Tomcat host.
> - echo $DISPLAY to make sure it's come across OK.
> - Start Jconsole on the Tomcat host.  It will display on your local desktop, via the ssh tunnel.
> 
> The network part of this is no more complex than you already have.
> 
>> Layout is as follows :
>>
>> Office A :
>> workstation (me) --> firewall/router -> internet modem --> internet
>> Office B :
>> internet -> internet modem -> firewall/router -> Tomcat host
>>
>> There is no VPN setup between A and B.
>>
>> My workstation is a Windows laptop. I don't presently have an
>> X emulator
>> on it. It has Java JDK 6, an SSH terminal-like program
>> (putty), WinSCP,
>> etc..  I'd rather avoid installing Cygwin on the laptop, because it
>> interferes with other Unix-like things I have on it.
> 
> OK.  If you don't want to put Cygwin on - which is certainly the easiest+cheapest way of getting an X11 display on your laptop - then you still have options.  You could, for example, install something like VMware (Server is free, which would be plenty for this job).  You could then run, say, Ubuntu on the VM and ssh across from Ubuntu.
> 
>                 - Peter
> 
> ---------------------------------------------------------------------
> 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: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Gregor Schneider [mailto:rc46fi@googlemail.com]
> http://sourceforge.net/projects/xming
>
> Just a simple install, very small, convinient and works like charm.

Thanks Gregor, I wasn't aware of that one.  Think I may just have a new preferred X server :-).

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by Gregor Schneider <rc...@googlemail.com>.
On Thu, Feb 5, 2009 at 11:11 AM, Peter Crowther
<Pe...@melandra.com> wrote:
>
> OK.  If you don't want to put Cygwin on
>

http://sourceforge.net/projects/xming

Just a simple install, very small, convinient and works like charm.

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread

Posted by Peter Crowther <Pe...@melandra.com>.
> From: André Warnier [mailto:aw@ice-sa.com]
> "X" is not something I use regularly, so when
> Chris mentioned X, I thought he was talking about the secondary
> connection/port that the JVM/Jconsole agree on, not about
> X-terminal and so.
>
> So thanks for the tip, but could you expand even more ?
> I realise this isn't really a Tomcat matter, but maybe this can help
> someone else in a similar situation.
>
> At which level would X11 kick in ?

It ships the stream of commands to display JConsole on your local desktop.  Rough sequence of events:

- Start an X11 server on your workstation.  Find out its DISPLAY variable.
- If using PuTTY, tell it about your X11 DISPLAY variable.  It can't guess!
- Use ssh/PuTTY with X11 tunnelling enabled to remote to your Tomcat host.
- echo $DISPLAY to make sure it's come across OK.
- Start Jconsole on the Tomcat host.  It will display on your local desktop, via the ssh tunnel.

The network part of this is no more complex than you already have.

> Layout is as follows :
>
> Office A :
> workstation (me) --> firewall/router -> internet modem --> internet
> Office B :
> internet -> internet modem -> firewall/router -> Tomcat host
>
> There is no VPN setup between A and B.
>
> My workstation is a Windows laptop. I don't presently have an
> X emulator
> on it. It has Java JDK 6, an SSH terminal-like program
> (putty), WinSCP,
> etc..  I'd rather avoid installing Cygwin on the laptop, because it
> interferes with other Unix-like things I have on it.

OK.  If you don't want to put Cygwin on - which is certainly the easiest+cheapest way of getting an X11 display on your laptop - then you still have options.  You could, for example, install something like VMware (Server is free, which would be plenty for this job).  You could then run, say, Ubuntu on the VM and ssh across from Ubuntu.

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org