1 2 Previous Next 20 Replies Latest reply on May 4, 2007 4:59 AM by alexkomlev

    Difference JDK - connection problems

    alexkomlev

      Hello
      We used JBoss on server (Linux kernell 2.4) with JDK 1.4.
      Client writing for Widows with JDK 5.0 in 1.4 compatible mode. Then we try connect to jboss from jndi
      it write about RMI problems with 127.0.0.1 host, but JBoss and clint configured with remoute adress.

        • 1. Re: Difference JDK - connection problems
          peterj

          What properties are you using when you get the InitialContext? Post either the code setting up the properties or the jndi.properties file.

          Also, see the discussion at https://mvs01.spt.unisys.com/index.html,DanaInfo=www.jboss.com+?module=bb&op=viewtopic&t=93668

          • 2. Re: Difference JDK - connection problems
            alexkomlev

            I'm using standart jndi.properties file with one change - remoute adress:

            java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
            java.naming.provider.url=jnp://192.168.60.46:1099
            java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
            


            I'm afraid of that problem in RMI mechanizm which work incorrect between JRE 1.5 and JRE 1.4.

            • 3. Re: Difference JDK - connection problems
              peterj

              Did you look at the post that I referenced? Did that help? What response did you get from telnet?

              Another thought, on Linux try adding the -Djava.net.preferIPv4Stack=true JVM option to the app server command line.

              • 4. Re: Difference JDK - connection problems
                alexkomlev

                I don't look at post that You referenced. This reference conducted in deadlock. There I download a ActiveX comp. and me have suggested to enter a login with the password.
                After holidays(02.05) i try start server with params.

                • 5. Re: Difference JDK - connection problems
                  peterj

                  Sorry, I was using my VPN when I copied the URL. Try this one: http://www.jboss.com/?module=bb&op=viewtopic&t=93668

                  • 6. Re: Difference JDK - connection problems
                    alexkomlev

                    Thanks for your help :-)
                    Tomorrow i will check Jboss with params and try rewrite hosts file.

                    • 7. Re: Difference JDK - connection problems
                      alexkomlev

                      Hello
                      We try change host, we try run JBoss witn params - no effect.
                      In telnet we see:

                      ??srvjava.rmi.MarshalledObject|-^??c?>O¦I¦hashlocBytestO[BobjBytesq~Oxpr^?)urO[B
                      ¦°T?Oxp$??thttp://MCBC24:8083/q~q~uq~¦L??sr org.jnp.server.NamingServer_StubOOxr
                      java.rmi.server.RemoteStub?¦-???eOxrLjava.rmi.server.RemoteObjectLa+?
                      a3^¦xpw4
                      Uni
                      castRef2 127.0.0.1¦J?+GO¦L--{?Ox

                      in Eclipse, then we try to start application:

                      Exception in thread "main" javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
                      java.net.ConnectException: Connection refused: connect]
                      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
                      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
                      at javax.naming.InitialContext.lookup(Unknown Source)
                      at org.AppTest1.main(AppTest1.java:49)
                      Caused by: 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 org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
                      ... 3 more
                      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.(Unknown Source)
                      at java.net.Socket.(Unknown Source)
                      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
                      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
                      ... 9 more

                      • 8. Re: Difference JDK - connection problems
                        peterj

                        Did you notice my instructions concerning the telnet response? Go back and look at the IP address given on the last line of the telnet response: 127.0.0.1. That is not the correct address, and is why you are running into problems. Go back and read my instructions on the other post.

                        • 9. Re: Difference JDK - connection problems
                          alexkomlev

                          I know that 127.0.0.1 is incorrect adress :-) and read your instructions on the other post.
                          And i write in begin of my last post about effect:
                          I change Linux Hosts file - no effect
                          I change startup VM params in run.sh - no effect
                          More that, i try change JBoss conf file,
                          if find reference on localhost (if this param not declareted like local) - no effect.
                          Where JBoss find 127.0.0.1? I don't understand.

                          • 10. Re: Difference JDK - connection problems
                            peterj

                            Which version of JBoss AS are you using?

                            • 11. Re: Difference JDK - connection problems
                              alexkomlev

                              JBoss-4.0.5.GA

                              • 12. Re: Difference JDK - connection problems
                                peterj

                                I assume that you are not starting the app server using the -b option.

                                Please post the contents of your /etc/hosts file. Maybe I will see something in there.

                                Also, post the console log you get when starting the app server (up through the "Started in xx minutes" message). Perhaps I will see something in there.

                                • 13. Re: Difference JDK - connection problems
                                  alexkomlev

                                  You right, we didn't started with -b option (It can help?)
                                  I don't remember host file exactly.
                                  127.0.0.1 localhost ... (full name i forget)
                                  192.168.60.46 mcbc24
                                  Console log will be tomorrow.

                                  • 14. Re: Difference JDK - connection problems
                                    peterj

                                    That second line in the /etc/hosts file is incorrect. It should read something like:

                                    192.168.60.46 mcbc24 mcbc24.somedomainname

                                    If you don't have the entry with the domain name, then things go wrong, and 12.0.0.1 shows up in the telnet response.

                                    1 2 Previous Next