1 2 Previous Next 25 Replies Latest reply on Apr 4, 2011 2:03 AM by matthias.boschen Go to original post
      • 15. Re: jboss multiple installation
        matthias.boschen

        I start the jboss by calling

        run.bat -b <ip-addess> -c zvv

        in the <path>\jboss-4.2.0.GA\bin directory.

        My aim is to start multiple instances, but it is already the first instance that fails.

         

        My server-folder looks like this:

        server

        + zvv

           + conf

           + deploy

              + ejb3.deployer

              + jboss-aop-jdk50.deployer

              + jboss-bean.deployer

              + jboss-web.deployer

              + jbossws.sar

              + jms

              + jmx-console.war

              + management

           + lib

        (plus data, log, tmp and work)

         

        And the console output is:

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

          JBoss Bootstrap Environment

          JBOSS_HOME: <path>\jboss-4.2.0.GA

          JAVA: c:\Programme\Java\jdk1.6.0_17\bin\java

          JAVA_OPTS:  -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

          CLASSPATH: c:\Programme\Java\jdk1.6.0_17\lib\tools.jar;<path>\jboss-4.2.0.GA\bin\run.jar

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

        06:32:55,366 INFO  [Server] Starting JBoss (MX MicroKernel)...
        06:32:55,366 INFO  [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
        06:32:55,366 INFO  [Server] Home Dir: <path>\jboss-4.2.0.GA
        06:32:55,366 INFO  [Server] Home URL: file:/<path>/jboss-4.2.0.GA/
        06:32:55,366 INFO  [Server] Patch URL: null
        06:32:55,366 INFO  [Server] Server Name: zvv
        06:32:55,366 INFO  [Server] Server Home Dir: <path>\jboss-4.2.0.GA\server\zvv
        06:32:55,366 INFO  [Server] Server Home URL: file:/<path>/jboss-4.2.0.GA/server/zvv/
        06:32:55,366 INFO  [Server] Server Log Dir: <path>\jboss-4.2.0.GA\server\zvv\log
        06:32:55,382 INFO  [Server] Server Temp Dir: <path>\jboss-4.2.0.GA\server\zvv\tmp
        06:32:55,382 INFO  [Server] Root Deployment Filename: jboss-service.xml
        06:32:55,647 INFO  [ServerInfo] Java version: 1.6.0_17,Sun Microsystems Inc.
        06:32:55,647 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 14.3-b01,Sun Microsystems Inc.
        06:32:55,647 INFO  [ServerInfo] OS-System: Windows 2003 5.2,x86
        06:32:55,944 INFO  [Server] Core system initialized
        06:33:05,397 INFO  [WebService] Using RMI server codebase: http://<ip-address>:8083/
        06:33:05,397 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
        06:33:08,163 WARN  [EJBTimerServiceImpl] Cannot obtain the implementation of a PersistencePolicy, using NoopPersistencePolicy: java.lang.RuntimeException: Error creating MBeanProxy: jboss.ejb:service=EJBTimerService,persistencePolicy=database
        06:33:08,179 INFO  [EJB3Deployer] Starting java:comp multiplexer
        06:33:09,350 INFO  [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
        06:33:10,022 INFO  [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: c:\Programme\Java\jdk1.6.0_17\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\oracle\ora102srv\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\WINDOWS\system32\WindowsPowerShell\v1.0
        06:33:10,069 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-<ip-address>-8080
        06:33:10,069 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-<ip-address>-8009
        06:33:10,069 INFO  [Catalina] Initialization processed in 142 ms
        06:33:10,069 INFO  [StandardService] Starting service jboss.web
        06:33:10,069 INFO  [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
        06:33:10,100 INFO  [Catalina] Server startup in 35 ms
        • 16. Re: jboss multiple installation
          peterj

          The only thing I can think of is that <ip-address> is not being recognized. Can you ping <ip-address> from that same box? Is the IP address IPv6? Is IPv6 enabled for that IP appress? What is in the etc/hosts file? Also, what firewall are you running?

           

          When you get to this state, take a thread dump (CTRL-BREAK) and post the output.

           

          Perhaps we need to back up a little and see where things start to break.  Try starting the app server without specifying -b, then it should bind to localhost. Does that work. The try -b 0.0.0.0 and see if that works. If it works, can you access the home page via http://localhost:8080 and via http://<ip-address>:8080?

           

          I know that you want to obfuscate your IP address, and thus used <ip-address>, but it might be best if you obfuscated your IP address by using a generic home-based router address instead, such as 192.168.1.100. Because I would like you to tell me how many IP addresses you have defined. I you defined 2 addresses, then we can refer to them as 192.168.1.100 and 1.92.168.1.101. Then I can refer to specific addresses and you can make the mental conversion to the actual address. This will be really beneficial right now because I want to tell you to try all of your IP addresses if the app server starts with -b 0.0.0.0. In other words, continuing the examples os far, try http://localhost:8080, http://192.168.1.100:8080 and http://192.168.1.101.

          • 17. Re: jboss multiple installation
            matthias.boschen

            Hi Peter,

            Can you ping  from that same box?

            Yes, I can.

            Is the IP address IPv6? Is IPv6 enabled for that IP appress?

            No to both  - I assume, since ipconfig does not return an v6-address and ping -6 fails.

            What is in the etc/hosts file?

            Only "127.0.0.1       localhost".

            When you get to this state, take a thread dump (CTRL-BREAK) and post the output.

            Put the thread dump into the attached archive.

            Perhaps we need to back up a little and see where things start to break.

            Sounds like some work, but I'm very happy you're making this effort with me and get some clue from the dumps.

            Try starting the app server without specifying -b, then it should bind to localhost. Does that work?

            It starts, but throws

            CommunicationException: Could not obtain connection to any of these urls: 192.168.18.143

            when entering my ear. (Yes, I'm using hibernate for persistence.) Output is in the attached archive.

            The try -b 0.0.0.0 and see if that works.

            No, it also hangs.

             

            I'm using JBoss for my EJB3-application in some occasions, but this is the first time with multiple IP-addresses. I have the requirement to run the same application for different customers on the same machine (a VM, does that matter?) and configured it with eight IP-addresses from 192.168.18.143 to ~.150

             

            I tried the other IP-addresses (run.bat -b ...), it hanged for all addresses but it started with ConnectionException for the last (~.150) Then it throws again CommunicationException with IP-address ~.143 !?! I added the complete output of this run.

            • 18. Re: jboss multiple installation
              peterj

              Let me see if I can summarize this just to check my understanding.

              a) The app server starts just fine without -b, and with -b ~.150

              b) The app server does not start with -b of 0.0.0.0 or any of the other IP addreses

              c) In the cases where it starts, there is a connection error for ~.143:1099 (the JNDI port)

              d) You are running inside a VM

               

              The VM should not matter, I run within a VM all the time. However, VMs do some screwy things with networking. Is it possible to try this on a physical server? That would tell us if it is VM related or not.

               

              Is there anything within your app that reference IP address ~.143? Specifically an JNDI lookup or a jndi.properties file? I ask because if you start the app server with -b ~.150 and you get an error on ~.143, there are only two possible reasons for that:

              1) Someone is using ~.143 for JNDI lookup

              2) Your networking configuration is wrong. This problem often shows up on Linux where the /etc/hosts file is misconfigured, see this dicusssion for tips on how to debug this, especially the 'telnet' suggestion: http://community.jboss.org/thread/120995?tstart=0. (This is where the VM networking could be causing an issue. I would aks you how you configured multiple IP addresses within the VM, but I don't know enough about networking within a VM to know whether you did everythign correctly - you will need a VM networking expert for that.)

              • 19. Re: jboss multiple installation
                peterj

                Hit submit too soon, didn't include my observations on the thread dump. There was only one active thread:

                 

                "main" prio=6 tid=0x27d6a800 nid=0x4b8 runnable [0x282db000]

                java.lang.Thread.State: RUNNABLE
                        at java.net.SocketInputStream.socketRead0(Native Method)
                        at java.net.SocketInputStream.read(SocketInputStream.java:129)

                 

                It was about 200 methods deep, not exactly sure what it was working on - I saw web deploy and security methods among other things. How busy was the CPU? If not busy, then this thread was hung here. If busy, then this thread was looping.

                • 20. Re: jboss multiple installation
                  matthias.boschen

                  Step by step - said the centipede

                  Let me see if I can summarize this just to check my understanding.

                  a) The app server starts just fine without -b, and with -b ~.150

                  b) The app server does not start with -b of 0.0.0.0 or any of the other IP addreses

                  c) In the cases where it starts, there is a connection error for ~.143:1099 (the JNDI port)

                  d) You are running inside a VM

                  I agree to your summary, but "starts fine" is an extended interpretation ..

                  And we could add

                  e) when it hangs it may not be shut down via signal, only interrupted by OS.

                   

                  Is there anything within your app that reference IP address ~.143? Specifically an JNDI lookup or a jndi.properties file? I ask because if you start the app server with -b ~.150 and you get an error on ~.143, there are only two possible reasons for that:

                  1) Someone is using ~.143 for JNDI lookup

                  2) Your networking configuration is wrong. This problem often shows up on Linux where the /etc/hosts file is misconfigured, see this dicusssion for tips on how to debug this, especially the 'telnet' suggestion: http://community.jboss.org/thread/120995?tstart=0. (This is where the VM networking could be causing an issue. I would aks you how you configured multiple IP addresses within the VM, but I don't know enough about networking within a VM to know whether you did everythign correctly - you will need a VM networking expert for that.)

                  The only place I use a jndi.properties - with the ~.143-address in it - is in the war file inside the ear.

                  I assumed it is only used on demand and on the client side.

                  So I tried and removed the war and it's configuration in the ear\meta-inf\application.xml -

                  and the server (really) starts fine without -b or with -b ~.150, no exceptions and I may connect to Jboss or jmx-console, in latter case even from remote.

                  When starting with -b 0.0.0.0 or any of the other IP addresses it still hangs.

                  • 21. Re: jboss multiple installation
                    matthias.boschen

                    Peter Johnson schrieb:

                     

                    How busy was the CPU? If not busy, then this thread was hung here. If busy, then this thread was looping.

                    No activities monitored on CPU or harddisk.

                    • 22. Re: jboss multiple installation
                      matthias.boschen

                      any ideas ?

                      or further questions ?

                      • 23. Re: jboss multiple installation
                        peterj

                        You are going to need to have a VWare networking expert come and take a look at your networking configuration. There must be something incorrect about how it is set up, either that or networking under VMWare just behaves differently. I've never had these issues when using a physical server. Which, by the way, you might want to try - if you can get a physical server with multiple IP addresses running, then at least you will know that it can work and the way you have set it up is correct. And I assume that you have used ping, tracert and other networking tools to verify that the networking configuration is correct.

                        • 24. Re: jboss multiple installation
                          matthias.boschen

                          I handed the problem to our technicians and advised the installation on a real machine.

                          Any success will be reported here ....

                          • 25. jboss multiple installation
                            matthias.boschen

                            It seems we found the problem:

                            a colleague read the thread dump carefully:

                            the main thread is in state RUNNABLE, but waiting on socketRead().

                            A few lines down the stack some Property and Policy classes are listed,

                            so we suspected the local configuration for the hangup.

                             

                            Our application includes a war-file with a swing applet,

                            the policy for this applet is included in a local .java.policy file,

                            which can be addressed by remote clients / Java-VMs via http://<server>:8080/<appl>/.java.policy.

                            I configured the server machine to enable client startup,

                            which means I made an entry in JRE\lib\security\java.security:

                                 policy.url.N=http://localhost:8080/<appl>/.java.policy

                             

                            Apparently the starting Jboss-server reads this security file and tries to follow the http-link,

                            the port 8080 is already opened, but our application is not yet loaded so the request could not be answered.

                             

                            I wonder why no timeout gets working ?

                            We removed the line and the AS started without problems.

                             

                            Afterwards things get clear ...

                            1 2 Previous Next