【问题标题】:Deploying to tc Server in Idea在 Idea 中部署到 tc Server
【发布时间】:2013-04-08 12:43:22
【问题描述】:

我正在尝试使用 tc Server Idea 插件在 Idea 中运行我的应用程序并收到以下日志

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.

谁能描述问题出在哪里?我无法完全理解如何在 tc Server 中配置用户和角色。

更新

上述问题通过启用jmx解决。但是现在还有一个问题

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)

【问题讨论】:

  • devnet.jetbrains.com/thread/291564 可能会有所帮助。
  • 感谢您的回答。我更改了论坛上提到的 jmx 密码,但现在我收到一个异常调用方法 deployApplication java.lang.RuntimeException: Unable to find host

标签: spring intellij-idea spring-insight tcserver


【解决方案1】:

我有一个建议 host 是关于什么的。
tc Server 部署 API 的一部分是服务和主机的概念。有一些服务,每个服务都包含一些主机。 IDEA 插件默认提供 Catalina 服务和 localhost 主机。它们在运行/调试配置| 中配置。部署选项卡 |服务器服务名称服务器主机名(您需要部署一些东西才能看到这些设置)。
现在如何获得正确的值。它们可通过 JMX 获得。使用 jconsole.exe 从您的 JDK 连接到 service:jmx:rmi:///jndi/rmi://<your host>:<your port>/jmxrmi。它可能需要您用于服务器 JMX 的登录名和密码。然后打开tc server |部署者 |左侧面板树中的操作getServices 操作将列出您可用的服务,getHosts 将列出您所选服务的所有主机。

【讨论】:

    【解决方案2】:

    重写 CrazyCoders 评论作为答案:

    我需要检查运行/调试配置|服务器选项卡|已启用 JMX 身份验证

    密码和角色位于:CATALINA_BASE/conf/jmxremote.password

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-06
      • 2013-01-29
      • 2017-07-12
      • 1970-01-01
      • 2015-11-24
      相关资源
      最近更新 更多