问题描述
我想知道catalina.sh里的参数是怎么设置的?网上都说在catalina.sh顶部加入JAVA_OPTS="-verbosegc-Dcom.sun.management.jmxremote.port=7091-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=false-Djava.rmi.server.hostname=本机IP"和JRE_HOME="Jrockit虚拟机路径"这样虽然通过JRockitMissionControl建立起到远程tomcat服务上的连接可是在执行shutdown.sh时会报如下的错误,服务器根本关不了。[ERROR][mgmnt]JMXconnectorservercommunicationerror:nulljava.lang.RuntimeException:Error:JMXconnectorservercommunicationerror:nullatoracle.jrockit.management.server.Messages.error(Messages.java:109)atoracle.jrockit.management.server.Messages.error(Messages.java:123)atoracle.jrockit.management.server.Agent.main(Agent.java:158)atoracle.jrockit.management.server.Agent.agentmain(Agent.java:94)atoracle.jrockit.management.server.Agent.start(Agent.java:207)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atjrockit.management.AgentStarter.startAgent(AgentStarter.java:135)Causedby:oracle.jrockit.management.server.AgentErroratoracle.jrockit.management.server.JMXConnector.startNewServerImpl(JMXConnector.java:82)atoracle.jrockit.management.server.RemoteJMXConnector.newServer(RemoteJMXConnector.java:233)atoracle.jrockit.management.server.sun.RemoteJMXConnectorImpl.newServer(RemoteJMXConnectorImpl.java:112)atoracle.jrockit.management.server.RemoteJMXConnector.startNewServer(RemoteJMXConnector.java:181)atoracle.jrockit.management.server.JMXConnector.start(JMXConnector.java:64)atoracle.jrockit.management.server.Agent.start(Agent.java:62)atoracle.jrockit.management.server.Agent.main(Agent.java:156)...7moreCausedby:java.rmi.server.ExportException:Portalreadyinuse:7091;nestedexceptionis:java.net.BindException:Addressalreadyinuseatsun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)atsun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)atsun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:394)atsun.rmi.transport.LiveRef.exportObject(LiveRef.java:130)atsun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)atoracle.jrockit.management.server.sun.SunRMIExporter.exportObject(SunRMIExporter.java:36)atjavax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:84)atjavax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:76)atjavax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:388)atoracle.jrockit.management.server.JMXConnector.startNewServerImpl(JMXConnector.java:80)...13moreCausedby:java.net.BindException:Addressalreadyinuseatjava.net.PlainSocketImpl.socketBind(NativeMethod)atjava.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)atjava.net.ServerSocket.bind(ServerSocket.java:319)atjava.net.ServerSocket.<init>(ServerSocket.java:185)atjava.net.ServerSocket.<init>(ServerSocket.java:97)atsun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:27)atsun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:333)atsun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)atsun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)atsun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)atsun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)atsun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)atsun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)atoracle.jrockit.management.server.sun.SunRMIExporter.exportObject(SunRMIExporter.java:36)atjavax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:84)atjavax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:75)atjavax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:388)atoracle.jrockit.management.server.JMXConnector.startNewServerImpl(JMXConnector.java:80)atoracle.jrockit.management.server.RemoteJMXConnector.newServer(RemoteJMXConnector.java:233)atoracle.jrockit.management.server.sun.RemoteJMXConnectorImpl.newServer(RemoteJMXConnectorImpl.java:112)atoracle.jrockit.management.server.RemoteJMXConnector.startNewServer(RemoteJMXConnector.java:181)atoracle.jrockit.management.server.JMXConnector.start(JMXConnector.java:64)atoracle.jrockit.management.server.Agent.start(Agent.java:62)atoracle.jrockit.management.server.Agent.main(Agent.java:156)atoracle.jrockit.management.server.Agent.agentmain(Agent.java:93)atoracle.jrockit.management.server.Agent.start(Agent.java:206)...5moreCouldnotcreatetheJavavirtualmachine.