1

我在我的 Windows 机器上安装了 Apache Geronimo Server 并从 启动它Windows->Preferences->Server->Run-time,但之后我尝试添加新服务器并收到以下错误:

Booting Geronimo Kernel (in Java 1.7.0_03)...
Module  1/62 org.apache.geronimo.framework/j2ee-security/2.1/car                13:22:28,738 WARN  [1/car,j2eeType=GBean,name=JMXService] Failure in JMXConnector service:jmx:rmi://0.0.0.0:9999/jndi/rmi://0.0.0.0:1099/JMXConnector
13:22:28,739 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="org.apache.geronimo.framework/j2ee-security/2.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-security/2.1/car,j2eeType=GBean,name=JMXService"
java.rmi.server.ExportException: Port already in use: 9999; nested exception is: 
    java.net.BindException: Address already in use: JVM_Bind
    at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
    at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
    at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
    at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
    at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
    at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
    at javax.management.remote.rmi.RMIJRMPServerImpl.export(Unknown Source)
    at javax.management.remote.rmi.RMIJRMPServerImpl.export(Unknown Source)
    at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source)
    at org.apache.geronimo.jmxremoting.JMXConnector.doStart(JMXConnector.java:191)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:998)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
    at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
    at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:534)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$458b9f94.startConfiguration(<generated>)
    at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:156)
    at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
    at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
    at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
    at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
Caused by: java.net.BindException: Address already in use: JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
    at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown Source)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown Source)
    at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
    ... 36 more
Server Startup failed

org.apache.geronimo.kernel.config.LifecycleException: start of org.apache.geronimo.framework/j2ee-security/2.1/car failed
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$458b9f94.startConfiguration(<generated>)
    at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:156)
    at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
    at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
    at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
    at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start exception
    at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:534)
    ... 16 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: Configuration org.apache.geronimo.framework/j2ee-security/2.1/car failed to start due to the following reasons:
  The service ServiceModule=org.apache.geronimo.framework/j2ee-security/2.1/car,j2eeType=GBean,name=JMXService did not start because Port already in use: 9999; nested exception is: 
    java.net.BindException: Address already in use: JVM_Bind

    at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
    ... 18 more
4

2 回答 2

2

您发布的那个长堆栈跟踪中多次列出了根错误。服务器正在尝试绑定到已在使用的端口(端口 9999)。您需要在运行 Geronimo 服务器之前找出哪个进程正在使用相关端口并停止它。

您可以使用该netstat命令来查找持有特定端口的进程:

netstat -ano
于 2012-04-28T06:17:04.563 回答
0

感知的答案+1。

我想为此添加一些东西...

当我遇到“端口已在使用:xxxx”时,重新启动当前正在使用的 Eclipse 会话并尝试再次运行通常可以帮助我摆脱它。

于 2013-08-13T02:37:35.967 回答