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(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
at javax.management.remote.rmi.RMIConnector.getConnection(Unknown Source)
at javax.management.remote.rmi.RMIConnector.connect(Unknown Source)
at javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
at javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
at DataJMXConnector$1.run(AAA.java:52)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 16 more
다른 것은 괜찮은데, 한 대의 서버에서만 이렇게 에러가 났다..
/etc/hosts 파일이 문제인 것임. 파일이 잘못되어 있거나 localhost 외에 127.0.0.1 로 되어 있지 않도록 한다. aaabbb001 서버라면, 127.0.0.1 aaabbb001 이 아닌 public ip로 지정해야 한다.
127.0.0.1 aaabbb001 이렇게 하면서 실제 jmx 연결하면서 jmx 클라이언트의 localhost 를 보는 황당한 일이 있었다..
'general java' 카테고리의 다른 글
java application 서버 사용 통계 (0) | 2010.03.30 |
---|---|
lucene (0) | 2010.03.08 |
Lucene에서 한글 내용 (0) | 2009.12.24 |
Invalid argument: sun.nio.ch.Net.setIntOption (Mina)- Solution (0) | 2009.12.23 |
A file uploading encoder/decoder example by using apache mina 2.0 (0) | 2009.11.13 |