Menu

#131 Cannot connect to Tomcat 5.5

MC4J 1.2b9
open
nobody
5
2006-04-07
2006-04-07
RT
No

Linux RH 7.3 with JDK 5.0, Tomcat 5.5. Followed
instructions and put the following line in
bin/catalina.sh:

JAVA_OPTS="-
Dcom.sun.management.config.file=$CATALINA_HOME/conf/man
agement.properties"

In management.properties:

com.sun.management.jmxremote.port=8999
com.sun.management.jmxremote.ssl=false

com.sun.management.jmxremote.password.file=/usr/local/t
omcat/conf/jmxremote.password

com.sun.management.jmxremote.access.file=/usr/local/tom
cat/conf/jmxremote.access

In jmxremote.password:

monitorRole tomcat
controlRole tomcat

In jmxremote.access:

monitorRole readonly
controlRole readwrite

Tomcat started okay, but when trying to connect to it
remotely in MC4J (installed in a W2k machine with JDK
5.0), the following error shown:

java.rmi.ConnectException: Connection refused to host:
127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused:
connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket
(TCPEndpoint.java:574)
at
sun.rmi.transport.tcp.TCPChannel.createConnection
(TCPChannel.java:185)
at
sun.rmi.transport.tcp.TCPChannel.newConnection
(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke
(UnicastRef.java:94)
at
javax.management.remote.rmi.RMIServerImpl_Stub.newClien
t(Unknown Source)
at
javax.management.remote.rmi.RMIConnector.getConnection
(RMIConnector.java:2229)
at
javax.management.remote.rmi.RMIConnector.connect
(RMIConnector.java:271)
at
javax.management.remote.JMXConnectorFactory.connect
(JMXConnectorFactory.java:248)
at
org.mc4j.console.connection.JSR160ConnectionNode.connec
t(JSR160ConnectionNode.java:132)
at
org.mc4j.console.connection.ReconnectAction.performActi
on(ReconnectAction.java:47)
at
org.openide.util.actions.NodeAction.performAction
(NodeAction.java:193)
at
org.openide.util.actions.CallableSystemAction$1.run
(CallableSystemAction.java:78)
at
org.openide.util.actions.CallableSystemAction$ActionRun
nable.actionPerformed(CallableSystemAction.java:247)
at org.netbeans.core.ModuleActions.invokeAction
(ModuleActions.java:74)
at sun.reflect.GeneratedMethodAccessor71.invoke
(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke
(Method.java:585)
at
org.openide.util.actions.CallableSystemAction.invokeAct
ion(CallableSystemAction.java:179)
at
org.openide.util.actions.CallableSystemAction.access$00
0(CallableSystemAction.java:31)
at
org.openide.util.actions.CallableSystemAction$ActionRun
nable.doRun(CallableSystemAction.java:241)
at
org.openide.util.actions.CallableSystemAction$2.run
(CallableSystemAction.java:111)
at org.openide.util.Task.run(Task.java:136)
at org.openide.util.RequestProcessor$Task.run
(RequestProcessor.java:330)
at
org.openide.util.RequestProcessor$Processor.run
(RequestProcessor.java:686)
Caused by: java.net.ConnectException: Connection
refused: connect
at java.net.PlainSocketImpl.socketConnect
(Native Method)
at java.net.PlainSocketImpl.doConnect
(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress
(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect
(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect
(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSo
cket(RMIDirectSocketFactory.java:22)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSo
cket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket
(TCPEndpoint.java:569)
[catch] ... 23 more

Discussion


Log in to post a comment.