Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Managed agent explorer - Probable error in the tutorial (found a workaround)
Managed agent explorer - Probable error in the tutorial (found a workaround) [message #108566] Sat, 11 August 2007 16:44 Go to next message
Alessandro Tucci is currently offline Alessandro Tucci
Messages: 33
Registered: July 2009
Member
Hi everybody,
I am exploring the functionality of the Managed Agent Explorer following
this tutorial:

> http://www.eclipse.org/tptp/monitoring/documents/tutorials/t ptp_max_tomcat_demo/viewlet.htm

I've found in this tutorial that these parameters:

>-Dcom.sun.management.jmxremote
>-Dcom.sun.management.jmxremote.ssl=false
>-Dcom.sun.management.jmxremote.authenticate=false
>-Dcom.sun.management.jmxremote.port=9004

have to be added to the environment variable JAVA_OPTS in <<apache home
dir>>/bin/catalina.sh (linux) or <<apache home dir>>/bin/catalina.bat
(windows).
Such way to proceed causes an error in the profiler: as I try to launch it
with "Managed Resource" section properly configured, it raises the
following exception:

> ************************************************************ ******************
>javax.naming.ServiceUnavailableException
>null

>java.io.IOException: Failed to retrieve RMIServer stub:
>javax.naming.ServiceUnavailableException [Root exception is
>java.rmi.ConnectException: Connection refused to host: localhost; nested
>exception is:
>java.net.ConnectException: Connessione rifiutata]
> at javax.management.remote.rmi.RMIConnector.connect(RMIConnecto r.java:323)
> at
> javax.management.remote.JMXConnectorFactory.connect(JMXConne ctorFactory.java:248)
> at
> javax.management.remote.JMXConnectorFactory.connect(JMXConne ctorFactory.java:207)
> at
> org.eclipse.tptp.monitoring.managedagent.jmx.internal.MBeanH elper.init(MBeanHelper.java:84)
> at
> org.eclipse.tptp.monitoring.managedagent.jmx.internal.MBeanH elper. <init>(MBeanHelper.java:64)
> at
> org.eclipse.tptp.monitoring.managedagent.jmx.internal.agent. JMXAgent.init(JMXAgent.java:160)
> at
> org.eclipse.tptp.monitoring.managedagent.provisional.Managed ResourceAgent.invokeCustomCommand(ManagedResourceAgent.java: 382)
> at
> org.eclipse.tptp.monitoring.managedagent.provisional.helper. ManagedAgentCommandHelper.execute(ManagedAgentCommandHelper. java:649)
> at
> org.eclipse.tptp.monitoring.managedagent.provisional.helper. ManagedAgentCommandHelper.connect(ManagedAgentCommandHelper. java:110)
> at
> org.eclipse.tptp.monitoring.managedagent.ui.launch.provision al.common.ManagedAgentDelegate.createAgent(ManagedAgentDeleg ate.java:109)
> at
> org.eclipse.tptp.trace.ui.provisional.launcher.PrimaryLaunch Delegate.run(PrimaryLaunchDelegate.java:267)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.naming.ServiceUnavailableException [Root exception is
>java.rmi.ConnectException: Connection refused to host: localhost; nested
>exception is:
> java.net.ConnectException: Connessione rifiutata]
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryCon text.java:101)
> at
> com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURL Context.java:185)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at
> javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(R MIConnector.java:1871)
> at
> javax.management.remote.rmi.RMIConnector.findRMIServer(RMICo nnector.java:1841)
> at javax.management.remote.rmi.RMIConnector.connect(RMIConnecto r.java:257)
> ... 11 more
> Caused by: java.rmi.ConnectException: Connection refused to host:
>localhost; nested exception is:
> java.net.ConnectException: Connessione rifiutata
> at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java :601)
> at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel .java:198)
> at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.ja va:184)
> at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryCon text.java:97)
> ... 16 more
> Caused by: java.net.ConnectException: Connessione rifiutata
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.ja va:195)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> at java.net.Socket.connect(Socket.java:518)
> at java.net.Socket.connect(Socket.java:468)
> at java.net.Socket.<init>(Socket.java:365)
> at java.net.Socket.<init>(Socket.java:179)
> at
> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket( RMIDirectSocketFactory.java:22)
> at
> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket( RMIMasterSocketFactory.java:128)
> at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java :595)
> ... 21 more
> ************************************************************ ******************

I have found this workaround: the parameters specified in the tutorial do
not have to be added to JAVA_OPTS in catalina.sh or catalina.bat, but in
the "VM arguments" text field in the "Apache Tomcat" configuration tab of
the "Profile" menu. Everything works this way.

Thank you for your attention,
Alessandro Tucci
Re: Managed agent explorer - Probable error in the tutorial (found a workaround) [message #109902 is a reply to message #108566] Thu, 23 August 2007 14:20 Go to previous messageGo to next message
Hariharan L Narayanan is currently offline Hariharan L Narayanan
Messages: 2
Registered: July 2009
Junior Member
Hi Alessandro,
How are you running your tomcat? If you are running tomcat from Eclipse
you need to give it in the Apache Tomcat Configuration in the Profile
menu. Else if you are starting Tomcat externally using startup.bat then
these parameters can be provided in catalina.bat as JAVA_OPTS variable. I
have tried it with catalina.bat for Tomcat 6.0 and started tomcat
externally using the startup.bat and it worked fine.
Re: Managed agent explorer - Probable error in the tutorial (found a workaround) [message #109994 is a reply to message #109902] Sat, 25 August 2007 12:49 Go to previous message
Alessandro Tucci is currently offline Alessandro Tucci
Messages: 33
Registered: July 2009
Member
Hi Hariharan,
I start Tomcat from Eclipse, in fact. :-)
I had thought that Eclipse called catalina.sh (I'm on Linux) too,
therefore in my opinion adding options in the Apache Tomcat
Configuration rather than in catalina.sh was the same.
Thanks for having pointed this out, then.
Alessandro Tucci

Hariharan L Narayanan wrote:
> Hi Alessandro,
> How are you running your tomcat? If you are running tomcat from Eclipse
> you need to give it in the Apache Tomcat Configuration in the Profile
> menu. Else if you are starting Tomcat externally using startup.bat then
> these parameters can be provided in catalina.bat as JAVA_OPTS variable.
> I have tried it with catalina.bat for Tomcat 6.0 and started tomcat
> externally using the startup.bat and it worked fine.
>
Previous Topic:IAC on Linux -- binaries not executable
Next Topic:Test
Goto Forum:
  


Current Time: Thu Oct 02 08:24:57 GMT 2014

Powered by FUDForum. Page generated in 0.01795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software