You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jürgen Weber <we...@hotmail.com> on 2002/04/12 14:33:12 UTC

RMI Server in Tomcat problems

Hi

I tried to set up an RMI server in tomcat 4.03

First problem is, there seems to be no possibility to have something in 
tomcat like weblogics startup classes, i.e. classes that are called at 
server startup.

So I had to trigger a servlet by hand that does the initialisation and 
registry of the RMI server.

Tomcat and RMI client both on my NT machine worked.

On different machines the client gets the exception below.
Running the RMI Server in a stand-alone VM outside of tomcat
works.

First I had the following,

if (null == System.getSecurityManager())
            System.setSecurityManager(new RMISecurityManager());

but it would not be called as tomcat already has a SecurityManager. So I 
left the if - part but still no
change.

So I wonder, if it is possible to have an RMI Server in Tomcat at all?


I started with catalina start -security.

catalina.policy is only

grant {
        permission java.security.AllPermission;
};



   [java] java.rmi.ConnectException: Connection refused to host: localhost; 
nested exception is:
   [java]     java.net.ConnectException: Connection refused: connect
   [java]     at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
   [java]     at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
   [java]     at 
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
   [java]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
   [java]     at webservice.rmiserver.RMIServerImpl_Stub.register(Unknown 
Source)
   [java]     at 
.webservice.rmiclient.RMIClientImpl.main(RMIClientImpl.java:110)
   [java] Caused by: java.net.ConnectException: Connection refused: connect
   [java]     at java.net.PlainSocketImpl.socketConnect(Native Method)
   [java]     at 
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
   [java]     at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
   [java]     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
   [java]     at java.net.Socket.connect(Socket.java:425)
   [java]     at java.net.Socket.connect(Socket.java:375)
   [java]     at java.net.Socket.<init>(Socket.java:290)
   [java]     at java.net.Socket.<init>(Socket.java:118)
   [java]     at 
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
   [java]     at 
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:122)
   [java]     at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
   [java]     ... 5 more
   [java] Java Result: 1

_________________________________________________________________
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp.


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: RMI Server in Tomcat problems

Posted by Lance Smith <ls...@emergent-netsolutions.com>.
High Weber,
try
System.setSecurityManager(new RMISecurityManager("fully qualified name of
you're security file"));
Lance

-----Original Message-----
From: Jürgen Weber [mailto:weberjn@hotmail.com]
Sent: Friday, April 12, 2002 7:33 AM
To: tomcat-user@jakarta.apache.org
Subject: RMI Server in Tomcat problems


Hi

I tried to set up an RMI server in tomcat 4.03

First problem is, there seems to be no possibility to have something in
tomcat like weblogics startup classes, i.e. classes that are called at
server startup.

So I had to trigger a servlet by hand that does the initialisation and
registry of the RMI server.

Tomcat and RMI client both on my NT machine worked.

On different machines the client gets the exception below.
Running the RMI Server in a stand-alone VM outside of tomcat
works.

First I had the following,

if (null == System.getSecurityManager())
            System.setSecurityManager(new RMISecurityManager());

but it would not be called as tomcat already has a SecurityManager. So I
left the if - part but still no
change.

So I wonder, if it is possible to have an RMI Server in Tomcat at all?


I started with catalina start -security.

catalina.policy is only

grant {
        permission java.security.AllPermission;
};



   [java] java.rmi.ConnectException: Connection refused to host: localhost;
nested exception is:
   [java]     java.net.ConnectException: Connection refused: connect
   [java]     at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
   [java]     at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
   [java]     at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
   [java]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
   [java]     at webservice.rmiserver.RMIServerImpl_Stub.register(Unknown
Source)
   [java]     at
.webservice.rmiclient.RMIClientImpl.main(RMIClientImpl.java:110)
   [java] Caused by: java.net.ConnectException: Connection refused: connect
   [java]     at java.net.PlainSocketImpl.socketConnect(Native Method)
   [java]     at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
   [java]     at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
   [java]     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
   [java]     at java.net.Socket.connect(Socket.java:425)
   [java]     at java.net.Socket.connect(Socket.java:375)
   [java]     at java.net.Socket.<init>(Socket.java:290)
   [java]     at java.net.Socket.<init>(Socket.java:118)
   [java]     at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketF
actory.java:22)
   [java]     at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketF
actory.java:122)
   [java]     at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
   [java]     ... 5 more
   [java] Java Result: 1

_________________________________________________________________
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp.


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>