11 Replies Latest reply on Jul 14, 2007 5:59 AM by cjc

    JNDI Connection Problem! jboss.bind.address always 127.0.0.1

    cjc

      Hi,
      I'm using JBoss 4.0.5.GA and now i wont to migrate to 4.2.0.GA. I'm using
      some java bigger 1.5.

      My architectuer looks like

      PC A) eth0: 192.168.200.210 (dbserver)
      Jboss4.0.5.GA
      MySQL

      PC B) eth1: 192.168.200.211 and eth0: INET (XXX.XXX.XXX.XXX)
      Tomcat 5.5

      My jndi.propterties on PC B looks like:

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


      All that works greate with 4.0.5.GA. But under 4.2.0.GA dosn't!!!
      I edit the file conf/jboss-service.xml and make all Bindings where
      $(jboss.bind.address) is using to Empty == ALL but the result was
      that telnet can connect to dbserver:1099 but get a address 127.0.0.1 to go forward. So my Tomcat cannont establich jndi Connections?

      If i add the parameter -Djboss.bind.address=0.0.0.0 it changed nothing!
      Even jboss.bind.address=dbserver or the IP.

      If im just to stupid read right the manual say me where to look!

      Do I have to use the bind-service.xml to do that?

      regards
      cjc

        • 1. Re: JNDI Connection Problem! jboss.bind.address always 127.0
          chapata_gunner

          While starting the server pass the bind address as follows -

          ./run.sh -b 192.168.200.210


          That should solve it.


          • 2. Re: JNDI Connection Problem! jboss.bind.address always 127.0
            cjc

            Thangs that works!
            But the Produktion System is MS :-/ and There i have to use javaservice. Running the run.bat -b x.x.x.x works as well!
            But with -Djboss.bind.address it will not workt!

            This is how the registry looks:

            [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\JBOSS\Parameters]
            "JavaService Version"="2,0,10,0"
            "JVM Library"="C:\\Programme\\Java\\jdk1.5.0_06\\jre\\bin\\server\\jvm.dll"
            "JVM Option Count"=dword:00000004
            "JVM Option Number 0"="-Djava.class.path=D:\\Apps\\jboss-4.2.0.GA\\bin\\run.jar;C:\\Programme\\Java\\jdk1.5.0_06\\lib\\tools.jar"
            "JVM Option Number 1"="-Djboss.bind.address=192.168.200.210"
            "JVM Option Number 2"="-Xms256M"
            "JVM Option Number 3"="-Xmx400M"
            "Start Class"="org.jboss.Main"
            "Start Method"="main"
            "Start Param Count"=dword:00000000
            "Stop Class"="org.jboss.Main"
            "Stop Method"="systemExit"
            "Stop Param Count"=dword:00000000
            "System.out File"="D:\\Apps\\jboss-4.2.0.GA/log/stdout.log"
            "System.err File"="D:\\Apps\\jboss-4.2.0.GA/log/stderr.log"
            "Current Directory"="D:\\Apps\\jboss-4.2.0.GA\\bin"
            "Shutdown Timeout"=dword:00007530
            "Overwrite Files Flag"=dword:00000001
            "Startup Sleep"=dword:00001770


            thx



            • 3. Re: JNDI Connection Problem! jboss.bind.address always 127.0

              HI cjc

              I guess im running in to a similar problem.[ Refer to my Post --> JNDI lookup problem from remote client present in External N ]

              http://www.jboss.com/index.html?module=bb&op=viewtopic&t=112775

              Im running the JBoss 4.0.5 on Windows.Can you tell me what all setting you have done.

              I greatly appreciate any kind help from you.

              Note: You mentioned something about javaservice. Can you tell me what
              exactly you mean by it.

              Regards
              Ved

              • 4. Re: JNDI Connection Problem! jboss.bind.address always 127.0
                peterj

                cjc, you could try passing the -b option by changing the registry as follows:

                "Start Param Count"=dword:000000002
                "Start Param Number 0"="-b"
                "Start Param Number 1"="192.168.200.210"


                (Though, the changes you made should have worked.)

                Ved, you can read about javaservice at http://www.multiplan.co.uk/software/javaservice/

                • 5. Re: JNDI Connection Problem! jboss.bind.address always 127.0

                  Hi,
                  Thanks for the rely...
                  I tried doing the what you guys suggested i.e passing -b X.X.X.X to run.bat
                  [c:\AppServer>run.bat -b X.X.X.X]
                  When i did this i got the following exception

                  2007-07-10 18:53:09,095 ERROR [org.jboss.remoting.transport.socket.SocketServerInvoker] Error starting ServerSocket. Bind port: 3873, bind address: /X.X.X.X
                  2007-07-10 18:53:09,095 ERROR [org.jboss.remoting.transport.Connector] Error starting connector.
                  java.net.BindException: Cannot assign requested address: JVM_Bind
                   at java.net.PlainSocketImpl.socketBind(Native Method)
                   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
                   at java.net.ServerSocket.bind(ServerSocket.java:319)
                   at java.net.ServerSocket.<init>(ServerSocket.java:185)
                   at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:169)
                   at org.jboss.remoting.transport.socket.SocketServerInvoker.createServerSocket(SocketServerInvoker.java:186)
                   at org.jboss.remoting.transport.socket.SocketServerInvoker.start(SocketServerInvoker.java:136)
                   at org.jboss.remoting.transport.Connector.start(Connector.java:316)
                  .......................
                  ................
                  2007-07-10 18:53:09,252 WARN [org.jboss.system.ServiceController] Problem starting service jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
                  java.net.BindException: Cannot assign requested address: JVM_Bind
                   at java.net.PlainSocketImpl.socketBind(Native Method)
                   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
                   at java.net.ServerSocket.bind(ServerSocket.java:319)
                  
                  

                  also the port 3873 is unoccupied.

                  What is going wrong here?
                  Also i tried the changing the run.sh file, but i got the same exception.

                  And,

                  I couldnot find the following entry in the registry:


                  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\JBOSS\Parameters]
                  "JavaService Version"="2,0,10,0"
                  "Start Param Count"=dword:000000002
                  "Start Param Number 0"="-b"
                  



                  Have i done some mistake while installing JBoss or am going wrong somewhere.

                  Please help me out in solving this issuse as it is becoming a major bottleneck for our product.

                  Thanks for any suggestion or help.
                  Regards
                  Ved

                  • 6. Re: JNDI Connection Problem! jboss.bind.address always 127.0
                    peterj

                    I need to know the exact OS you are running (which flavor of Windows?). It would appear that you are being blocked by a firewall. If you are running, for example, Windows Server 2003 in a corporate environment with Active Directory, the AD administrators could have locked the machine down, thus preventing your form opening the port.

                    Regarding the missing registry entry, if you are not using JavaServer, there will not be an entry.

                    • 7. Re: JNDI Connection Problem! jboss.bind.address always 127.0

                      Hi Peter,
                      Thanks for replying and keeping patience :)

                      Im using Windows Server 2003 and the firewall is disabled.
                      But still the am getting the same exception which i wrote earlier.

                      You wrote ~
                      Regarding the missing registry entry, if you are not using JavaServer, there will not be an entry.

                      Please let what do you mean by JavaServer.

                      Also what should i do now.??
                      Regards
                      Ved

                      • 8. Re: JNDI Connection Problem! jboss.bind.address always 127.0
                        peterj

                        Sorry, typo, meant to type JavaService.

                        If the OS does not let you open a port, then either something is already using it, or something is preventing it (firewall, AD config, etc.) For the former, what tool(s) did you use to ascertain that the port is not in use? For the later, perhaps there is something in the event log.

                        • 9. Re: JNDI Connection Problem! jboss.bind.address always 127.0

                          Hi PeterJ
                          Thanks again for the reply.

                          I used the below to find the opened ports
                          C:\WINDOWS>netstat -an |find /i "listening".

                          Im using the open source JBoss application server.

                          Is it that i have to purchase Production JBoss Application server for accessing the application deployed in it from outside world(external network..... the production scenario).

                          Otherwise i dont see any other issue as to why it is not able to respond to request from external world.

                          Help me :)

                          Regards
                          Ved

                          • 10. Re: JNDI Connection Problem! jboss.bind.address always 127.0
                            peterj

                            Don't limit the netstat output to the listening state, the port could be in another state.

                            The only reason for purchasing the JBoss Enterprise Application Platform is to get support, the code base is the same as for JBoss Application Server. So using EAP will not solve this problem.

                            • 11. Re: JNDI Connection Problem! jboss.bind.address always 127.0
                              cjc

                              Hi,
                              @ vedgunjan: I'm think your problem is something with FW too. If i install a fresh donwloaded JBoss it works well on Windows Server 2003. I havnt installed a Activ directory or somthing like that (dev system!)

                              maybe write your own programm and bind the requred Port so u can test if it is JBOSS or your system.

                              Javaservice:
                              http://forge.objectweb.org/projects/javaservice/
                              Is a programm to run Javaprogramms as Windows Services under windows.
                              Try it its creat!
                              The Directorys for the logfiles (%JBOSS_HOME%/log) must exist or the service will not start and no Error message are Posted!

                              My installing script to use Javaservice looks something like that:

                              rem Folgende Parameter nach bedarf anpassen
                              rem Javaservice kann man auf http://forge.objectweb.org/project/showfiles.php?group_id=137 runterladen
                              rem copy Javaservice.exe and this Script in %JBOSS_HOME%/bin.
                              rem rename Javaservice.exe in to %jbossexe%
                              
                              set JDK_HOME=%JDK_HOME%
                              set JBOSS_HOME=%JBOSS_HOME%
                              set XMS=64
                              set XMX=128
                              set OUT_LOG=%JBOSS_HOME%/log/stdout.log
                              set ERR_LOG=%JBOSS_HOME%/log/stderr.log
                              set dependopt=MySQL
                              
                              rem -auto / -manual
                              set svcmode=-manual
                              set jbossexe=JbossService.exe
                              set SERVICE_NAME=JBOSS
                              
                              SET jvmdll=%JDK_HOME%\jre\bin\server\jvm.dll
                              SET toolsjar=%JDK_HOME%\lib\tools.jar
                              SET jbossjar=%JBOSS_HOME%\bin\run.jar
                              
                              
                              rem remove the following 2 rem's to make this script working!
                              rem %jbossexe% -uninstall %SERVICE_NAME%
                              
                              rem "%jbossexe%" -install %SERVICE_NAME% "%jvmdll%" -Djava.class.path="%jbossjar%;%toolsjar%" -Xms%XMS%M -Xmx%XMX%M -start org.jboss.Main -stop org.jboss.Main -method systemExit -out "%OUT_LOG%" -err "%ERR_LOG%" -current "%JBOSS_HOME%\bin" -depends %dependopt% %svcmode% -overwrite -startup 6
                              
                              echo bitte das script anpassen!!!
                              pause