5

I'm trying to run my application in Idea using tc Server Idea plugin and receive the following log

Connected to server
wrapper  | Starting the VMware vFabric tc Runtime instance - tcruntime-C-STS-vfabric-tc-server-developer-2.8.2.RELEASE-insight service...
wrapper  | VMware vFabric tc Runtime instance - tcruntime-C-STS-vfabric-tc-server-developer-2.8.2.RELEASE-insight started.
[11:53:08.709] Not allowed to connect. Check role and password.
[11:53:08.709] There is an application at /bps. Starting redeploy... 
[11:53:08.714] Not allowed to connect. Check role and password.
[11:53:08.715] Starting undeployment of /bps ... 
[11:53:08.720] Not allowed to connect. Check role and password.
[11:53:08.721] Starting deployment of 'bps:war exploded' to /bps ... 
[11:53:08.725] Not allowed to connect. Check role and password.

Can anybody describe what's the problem? I cann't fully understand how to config users and roles in tc Server.

UPDATE

The above problem is solved by enabling jmx. But now there is another problem

16-Apr-2013 14:36:36.023 SEVERE [RMI TCP Connection(4)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method deployApplication
 java.lang.RuntimeException: Unable to find host
    at com.springsource.tcserver.serviceability.deploy.TcContainerDeployer.deployApplication(TcContainerDeployer.java:409)
    at com.springsource.tcserver.serviceability.deploy.TcContainerDeployer.deployApplication(TcContainerDeployer.java:399)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
    at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1486)
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:96)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1327)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1426)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:847)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    at sun.rmi.transport.Transport$1.run(Transport.java:177)
    at sun.rmi.transport.Transport$1.run(Transport.java:174)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Brian Clozel
  • 46,620
  • 12
  • 129
  • 152
Anatoly
  • 1,352
  • 3
  • 19
  • 38
  • 4
    http://devnet.jetbrains.com/thread/291564 may help. – CrazyCoder Apr 16 '13 at 08:57
  • Thanks for the answer. I changed jmx password as mentioned on forum, but now I recieve an exception invoking method deployApplication java.lang.RuntimeException: Unable to find host – Anatoly Apr 16 '13 at 10:37

2 Answers2

5

Rewriten CrazyCoders comment as answer:

I needed to check Run/Debug Configuration|Server tab|JMX authentification enabled.

Password and role could be found in: CATALINA_BASE/conf/jmxremote.password

user482745
  • 1,046
  • 1
  • 11
  • 29
0

I have a suggestion what host it's all about.
Part of tc Server deployment API is notion of service and host. There are some services, and each service contain some number of hosts. IDEA plugin provides by default Catalina service and localhost host. They are configured in Run/Debug Configuration | Deployment tab | Server service name and Server host name(you need to have something to deploy to see these settings).
Now how to get proper values. They are available via JMX. Connect with jconsole.exe from your JDK to service:jmx:rmi:///jndi/rmi://<your host>:<your port>/jmxrmi. It may need login and password you use for server's JMX. Then open tc server | Deployer | Operations in the tree in left panel. Operation getServices will list you available services, and getHosts will list you all hosts for selected service.

leneshka
  • 31
  • 3