8 Replies Latest reply on Nov 5, 2003 10:06 AM by rmontag

    set jboss.bind.address??

    uramisten

      How can one specify jboss.bind.address?? The server starts up and tries to bind to 0.0.0.0 I checked all the config files, but no go. It starts up, bind to nothing and then throws a ton of errors :(

      Thnx.
      Ati.

        • 1. Re: set jboss.bind.address??
          mikefinn

          Bind address is determined per-service, and in most cases can be defined in the individual mbean service file, or in the binding service, if you are using it. Most services bind to whatever "new ServerSocket(port)" gives them, unless explicitly specified.

          Dumb question - but do you have a working IP interface? What does ipconfig/ifconfig show? What is the OS?

          Mike

          • 2. Re: set jboss.bind.address??
            rmontag

            Additional question. There are several *-service.xml-Files containig entries "${jboss.bind.address}", but no documentation or comment, what to do with this property (I also like to get rid of those 0.0.0.0):

            1) Do not edit them ?
            2) Replcace each occurence manually with my desired ip address ?
            3) Set a property, so jboss automatically replace all entries for me ?

            Greetings,
            Rainer

            • 3. Re: set jboss.bind.address??
              mikefinn

              It's read from System.getProperty(), so use JAVA_OPTS="-Djboss.bind.address=X.X.X.X" in or prior to run.sh/bat.

              Mike

              • 4. Re: set jboss.bind.address??
                rmontag

                I tried that, but no effect (JBoss 3.2.2 on WIN2K-PC, startet from cygwin. The YY and XX were real numbers, i omitted them here).

                This is really a problem, because e.g. for clustering lookup a server returns "0.0.0.0:1100" for access to his HA-JNDI which is useless, if the client is on another machine than the server.


                $ JAVA_OPTS="-Djboss.bind.address=134.101.XX.YY" ./run.sh
                ================================================================================

                JBoss Bootstrap Environment

                JBOSS_HOME: c:\Entwicklung\tmp\WfMCore-Clustertest\Instanz1\jboss-3.2.2

                JAVA: /cygdrive/c/Java/j2sdk1.4.2_02/bin/java

                JAVA_OPTS: -Djboss.bind.address=134.101.XX.YY -Dprogram.name=run.sh

                CLASSPATH: c:\Entwicklung\tmp\WfMCore-Clustertest\Instanz1\jboss-3.2.2\bin\run.jar;c:\Java\j2sdk1.4.2_02\lib\tools.jar

                ================================================================================

                13:21:44,335 INFO [Server] Starting JBoss (MX MicroKernel)...

                13:21:44,345 INFO [Server] Release ID: JBoss [WonderLand] 3.2.2 (build: CVSTag=JBoss_3_2_2 date=200310182216)

                13:21:44,345 INFO [Server] Home Dir: C:\Entwicklung\tmp\WfMCore-Clustertest\Instanz1\jboss-3.2.2

                13:21:44,345 INFO [Server] Home URL: file:/C:/Entwicklung/tmp/WfMCore-Clustertest/Instanz1/jboss-3.2.2/

                13:21:44,345 INFO [Server] Library URL: file:/C:/Entwicklung/tmp/WfMCore-Clustertest/Instanz1/jboss-3.2.2/lib/

                13:21:44,345 INFO [Server] Patch URL: null

                13:21:44,345 INFO [Server] Server Name: default

                13:21:44,345 INFO [Server] Server Home Dir: C:\Entwicklung\tmp\WfMCore-Clustertest\Instanz1\jboss-3.2.2\server\default

                13:21:44,365 INFO [Server] Server Home URL: file:/C:/Entwicklung/tmp/WfMCore-Clustertest/Instanz1/jboss-3.2.2/server/default/

                13:21:44,395 INFO [Server] Server Data Dir: C:\Entwicklung\tmp\WfMCore-Clustertest\Instanz1\jboss-3.2.2\server\default\data

                13:21:44,395 INFO [Server] Server Temp Dir: C:\Entwicklung\tmp\WfMCore-Clustertest\Instanz1\jboss-3.2.2\server\default\tmp

                13:21:44,395 INFO [Server] Server Config URL: file:/C:/Entwicklung/tmp/WfMCore-Clustertest/Instanz1/jboss-3.2.2/server/default/conf/

                13:21:44,395 INFO [Server] Server Library URL: file:/C:/Entwicklung/tmp/WfMCore-Clustertest/Instanz1/jboss-3.2.2/server/default/lib/

                13:21:44,395 INFO [Server] Root Deployemnt Filename: jboss-service.xml

                13:21:44,425 INFO [Server] Starting General Purpose Architecture (GPA)...

                13:21:45,076 INFO [ServerInfo] Java version: 1.4.2_02,Sun Microsystems Inc.

                13:21:45,076 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_02-b03,Sun Microsystems Inc.

                13:21:45,086 INFO [ServerInfo] OS-System: Windows 2000 5.0,x86

                13:21:45,236 INFO [ServiceController] Controller MBean online

                13:21:45,457 INFO [MainDeployer] Started jboss.system:service=MainDeployer

                13:21:45,687 INFO [MainDeployer] Adding deployer: org.jboss.deployment.JARDeployer@10e3293

                13:21:45,697 INFO [JARDeployer] Started jboss.system:service=JARDeployer

                13:21:45,787 INFO [MainDeployer] Adding deployer: org.jboss.deployment.SARDeployer@111a3a4

                13:21:45,827 INFO [SARDeployer] Started jboss.system:service=ServiceDeployer

                13:21:45,827 INFO [Server] Core system initialized

                13:21:45,877 INFO [MainDeployer] Starting deployment of package: file:/C:/Entwicklung/tmp/WfMCore-Clustertest/Instanz1/jboss-3.2.2/server/default/conf/jboss-service.xml

                13:21:50,995 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml

                13:21:51,776 INFO [LocalJBossServerDomain] Started jboss.management.local:j2eeType=J2EEDomain,name=Manager

                13:21:51,796 INFO [AbstractDeploymentScanner$ScannerThread] Running

                13:21:51,796 INFO [Log4jService] Started jboss.system:type=Log4jService,service=Logging

                13:21:52,046 INFO [WebService] Started WebServer with address: 0.0.0.0:8083

                13:21:52,046 INFO [WebService] Using RMI server codebase: http://0.0.0.0:8083/

                13:21:52,046 INFO [WebService] Started jboss:service=WebService

                13:21:52,056 INFO [NamingService] Starting jnp server

                13:21:52,277 INFO [NamingService] Started jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076

                13:21:52,327 INFO [NamingService] Listening on port 1099

                13:21:52,357 INFO [NamingService] Started jboss:service=Naming
                ...


                As you can see, still the 0.0.0.0. Any ideas ?

                Currently I patched all the -service.xml files containing the "${jboss.bind.address}" with the real ip number to overcome my problems ...

                Greetings,
                Rainer

                • 5. Re: set jboss.bind.address??
                  darranl

                  Does your PC have multiple IP addresses?

                  Have you tried to run JBoss without using cygwin?

                  I haven't tried with JBoss 3.2.2 but I have tried clustering using the default configuration on previous versions which also bind to '0.0.0.0' and I have not had any problems with remote clients accessing the cluster.

                  • 6. Re: set jboss.bind.address??
                    rmontag

                    1) No, PC has no multiple ip addresses. When I write a little java program like this:

                    myAddress = InetAddress.getByName("134.101.XX.YY");
                    System.out.println("myAddress.getHostName() = "
                    + myAddress.getHostName());
                    System.out.println("myAddress.getHostAddress() = "
                    + myAddress.getHostAddress());

                    ,I get the expected results (especially "134.101.XX.YY" for getHostAddress(), not "0.0.0.0").

                    2) Same effect when I use the run.bat with this property as in my run.sh/cygwin constellation. In the meantime I tried the same on a SUN Solaris, same result (0.0.0.0).

                    3) clustering using multicast and client on another machine ? As I said, my server returns a "0.0.0.0:1100" datagram, but this is another topic I think ;-)

                    Thanks for answering,
                    Rainer

                    • 7. Re: set jboss.bind.address??
                      darranl

                      I don't think that binding to '0.0.0.0' is actually your problem, as I understand it this just means that connections will be accepted from any network interface.

                      Can you post the actual error that you are getting when you are trying to run something clustered.

                      • 8. Re: set jboss.bind.address??
                        rmontag

                        Finally I found it out:

                        In Jboss 3.2.2 the Main class has a new startup parameter (use "run.sh -h" to see all options):

                        -b, --host=<host or ip> Bind address for all JBoss services

                        So using "run.sh --host=..." sets a system property for the property ${jboss.bind.address}.

                        Due to a bug in the source code of the Main class you cannot use "run -b ...". I will make a bug report for these.

                        Greetings,
                        Rainer