7 Replies Latest reply on Aug 27, 2003 12:27 PM by Adrian Brock

    non-JRMP server at remote endpoint

    kristoeffy Newbie

      Hi, didn't know where to post this question exactly so I chose this forum - the real context is "RMI Registry".

      Trying to run some 3rdParty-Tool (from a university) that tries to connect to the RMI Registry at standard port 1099 while jBoss is running leads to:
      java.rmi.ConnectIOException: non-JRMP server at remote endpoint
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
      ...

      I already searched with google but found nothing else than the bits of information under
      http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg23640.html//www.mail-archive.com/jboss-user@lists.sourceforge.net/msg23640.html
      which are interestingly also relatetd to jBoss (v3.0.4)
      (I'm using v3.2.1)

      So I hope anybody knows something about this problem.
      Thank you,
      Christoph

        • 1. Re: non-JRMP server at remote endpoint
          Adrian Brock Master

          Change the port in conf/jboss-service.xml

          Regards,
          Adrian

          • 2. Re: non-JRMP server at remote endpoint
            kristoeffy Newbie

            Both _should_ use the same registry, because the "Tool" has something to do with profiling...

            (I don't know so much about RMI Registries, but it seems natural to me that several VM-instances can access it!?
            Even under the same port!?)

            • 3. Re: non-JRMP server at remote endpoint
              Adrian Brock Master

              JBoss's Port 1099 is a straight http socket that hands out the JNDI stub. It is not an RMI registry.

              What has profiling got todo with JNDI?

              Regards,
              Adrian

              • 4. Re: non-JRMP server at remote endpoint
                kristoeffy Newbie

                It's about profiling EJBs and accessing them by JNDI (RMI registry).

                I will now state some fundamental opinions and please correct me if anything is wrong:
                - JNP is the jBoss-Implementation of JNDI
                - JNP can be standalone but is a MBean in jBoss
                - the InitialContext abstracts always from "Naming and Directory Services"
                - JNDI is sucha a "Naming and Directory Service" (as would also be LDAP)
                - JRMP is an alternative to IIOP
                - saying RMI means "Java-immanent RPC over JRMP"
                - saying RMI-IIOP means "Java-immanent RPC over IIOP"
                - the term "RMI registry" represents the fundamental stub-recovery principle
                - to use JNDI for component-lookup (that is: as a RMI registry) one has to
                bind a RMI server to JNDI.
                This is done by jBoss, because otherwise I could not access EJBs by JNP
                - I get an InitialContext for JNDI that is used for J2EE as RMI registry
                normaly with java.naming.provider.url=rmi://server:1099
                (according to http://java.sun.com/j2se/1.3/docs/guide/jndi/jndi-rmi.html)
                --> an RMI-IIOP server would normaly have the prefix "iiop://"
                --> jBoss-JNP uses its own prefix "jnp://"

                So now my questions:
                - I do not understand "JBoss's Port 1099 is a straight http socket that
                hands out the JNDI stub", because: The "JNDI stub" still leads to JNP,
                which has a RMI server bound, doesn't it?
                So this "JNDI stub" should represent a "JRMP server" (demanded by the
                Exception) !?
                - Is it perhaps a RMI-IIOP server?

                • 5. Re: non-JRMP server at remote endpoint
                  kristoeffy Newbie

                  Just an addition to the above opinions:
                  - J2EE and EJBs use normaly RMI and not RMI-IIOP, that means JRMP is
                  used as Protocol
                  - RMI-IIOP was introduced to allow communication with CORBA-Obj., that
                  means non-Java (!) applications, but its optional

                  • 6. Re: non-JRMP server at remote endpoint
                    kristoeffy Newbie

                    Ohh!
                    I've just dug into this "which RMI is used with EJB" more and I was wrong:
                    EJBs use RMI-IIOP !!
                    (according to the book "Mastering Enterprise JavaBeans" by Ed Roman, page 492 and http://info.borland.com/devsupport/appserver/faq/dave-curtis-rmiiiop.html)

                    It is a little bit confusing because RMI should, as I said, stand for "using JRMP" because it has it's origins in there. But because EJBs use RMI-IIOP some information-sources to J2EE/EJB skip the -IIOP because they think it would be clear RMI-IIOP is meant -- to all the writers out there: it is NOT!

                    So back to my problem:
                    Is it correct that JNP works as a RMI(-IIOP) registry?
                    But the tool I've got the problem with asumes a RMI(-JRMP) registry.
                    So it can not work - not with EJBs using IIOP.
                    Hmm, the tool never said explicitly it would work with EJBs. I assume now it does work with distributed applications - not with EJBs but ordinary client/server scenarios using RMI-calls. Damn!

                    Okay, sorry to have bothered you.

                    P.S. If anybody likes to give additional informiation (e.g. good Links) about all this - please write.

                    • 7. Re: non-JRMP server at remote endpoint
                      Adrian Brock Master

                      JNP can be used to store remote objects but it is not
                      correct to say it is an RMIRegistry.

                      JNP is not at 1099 that is just the stub that helps you bootstrap
                      access. It will connect back to a different socket (by default
                      random - although you can assign a specific port using mbean
                      config). This socket uses JRMP

                      Regards,
                      Adrian