1 2 Previous Next 25 Replies Latest reply on Apr 4, 2011 2:03 AM by matthias.boschen

    jboss multiple installation

    dwarakanathan

      Hi.. for the multiple instance jboss concept.. do i need to install one more jboss.. or it is just copy-paste of one more directory inside SERVER folder of the jboss? urgent case.. thanks !!

        • 1. Re: jboss multiple installation
          peterj

          The latter is the best approach - make a copy of an existing directory in the server folder. (On my system, I never use 'all' or 'default', I always make a copy and run the resulting configuration. I have a dozen configurations.)

          • 2. Re: jboss multiple installation
            dwarakanathan

            hey thanks.. i did all the changes of the conf files.. but still when i start the second instance, i get port number in use for all changed ports.. also when i start the jboss, it shows deployment failed for the second instance.

            • 3. Re: jboss multiple installation
              peterj

              To change the port numbers, see http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigurePorts

              Also, look at the file docs/examples.binding-manager/sample-bindings.xml for instructions on setting up the port binding manager.

              Another possibility is to assign each server a different IP address. This works only if you have multiple nICs or you NIC supports multiple iP addresses (and you have set up multiple IP addresses). To bind a server to a specific IP address, use the -b command line option. For example:

              run -b 192.168.0.100 -c server01
              run -b 192.168.0.101 -c server02



              • 4. Re: jboss multiple installation
                matthias.boschen

                Hi Peter,

                sorry for capturing this thread, but I have difficulties in starting multiple servers with multiple IP-addresses - as described

                here http://community.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOnemachine.

                For the first time after installation or java update it "mostly" works fine, but soon enough the JBoss hangs on deployment

                after Catalina startup. The final entries in logfile just say:

                ...
                2010-09-28 08:30:26,460 INFO  [org.apache.coyote.http11.Http11AprProtocol] Initializing Coyote HTTP/1.1 on http-192.168.18.143-8080
                2010-09-28 08:30:26,460 INFO  [org.apache.coyote.ajp.AjpAprProtocol] Initializing Coyote AJP/1.3 on ajp-192.168.18.143-8009
                2010-09-28 08:30:26,460 INFO  [org.apache.catalina.startup.Catalina] Initialization processed in 718 ms
                2010-09-28 08:30:26,460 INFO  [org.apache.catalina.core.StandardService] Starting service jboss.web
                2010-09-28 08:30:26,460 INFO  [org.apache.catalina.core.StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
                2010-09-28 08:30:26,507 INFO  [org.apache.catalina.startup.Catalina] Server startup in 53 ms

                No noticeable processor or HD activity. Any idea ?

                 

                I'm using Jboss 4.2.0 on Windows XP, Java 1.5 or 1.6

                 

                Thanks, Matthias

                • 5. Re: jboss multiple installation
                  peterj

                  Are you using EAP 4.2.0 or AS 4.2.0? If AS 4.2.0, what changes did you make to jboss-log4j.xml? Have you checked the server.log to see what is going on in there? Have you tried accessing theh ome page via http://<ip-addr>:8080?

                   

                  I ask these questions because this is usually the last line one sees when the console log is turned off for the app server (the console log lines that appeared so far are from the bootstrap code which uses a separate log configuration).

                  • 6. Re: jboss multiple installation
                    matthias.boschen

                    I'm using AS 4.2.0.

                    I set the log-level for org.jboss to DEBUG and found some more lines in server.log

                    2010-09-30 13:58:38,050 INFO  [org.apache.catalina.startup.Catalina] Server startup in 32 ms
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.deployment.MainDeployer] Adding deployer: MBeanProxyExt[jboss.web:service=WebServer]
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.deployment.SuffixOrderHelper] Static suffix exists; ignoring request for adding enhanced suffix: 500:.war
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.deployment.MainDeployer] trying to deploy with new deployer: ROOT.war
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.deployment.MainDeployer] using deployer MBeanProxyExt[jboss.web:service=WebServer]
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.web.tomcat.service.JBossWeb] Begin init
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.web.tomcat.service.JBossWeb] webContext: null
                    2010-09-30 13:58:38,050 DEBUG [org.jboss.web.tomcat.service.JBossWeb] warURL: file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.web.tomcat.service.JBossWeb] End init
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Added url: file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/, to ucl: org.jboss.mx.loading.UnifiedClassLoader3@c9b196{ url=file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ ,addedOrder=6}
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.web.tomcat.service.JBossWeb] create, ROOT.war
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.system.ServiceController] Creating service jboss.web.deployment:war=ROOT.war,id=-834223982
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.system.ServiceController] adding depends in ServiceController.register: []
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.web.WebModule] Creating jboss.web.deployment:war=ROOT.war,id=-834223982
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.web.WebModule] Created jboss.web.deployment:war=ROOT.war,id=-834223982
                    2010-09-30 13:58:38,066 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.web.deployment:war=ROOT.war,id=-834223982 dependents are: []
                    2010-09-30 13:58:38,081 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying ROOT.war
                    2010-09-30 13:58:38,081 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/
                    2010-09-30 13:58:38,081 DEBUG [org.jboss.system.ServiceController] starting service jboss.web.deployment:war=ROOT.war,id=-834223982
                    2010-09-30 13:58:38,081 DEBUG [org.jboss.web.WebModule] Starting jboss.web.deployment:war=ROOT.war,id=-834223982
                    2010-09-30 13:58:38,081 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] webContext: null
                    2010-09-30 13:58:38,081 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] warURL: file:/D:/.../deployed/jboss-4.2.0.GA/server/zvv/deploy/jboss-web.deployer/ROOT.war/
                    2010-09-30 13:58:38,081 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] webAppParser: org.jboss.web.AbstractWebDeployer$DescriptorParser@314585
                    2010-09-30 13:58:38,113 DEBUG [org.jboss.web.WebPermissionMapping] Qualified url patterns: {/=PatternInfo[pattern=/,type=3,isOverriden=false,qualifiers=[]]}

                    .. which did'nt help me.

                     

                    The request on http://ip-addr:8080 does neither return nor display any error message, the browser simply returns to the last shown page.

                     

                    In netstat -b I can see that port 8080 is opened, but already in use - by the jboss itself !  

                    Proto  Lokale Adresse         Remoteadresse          Status           PID  

                    TCP    :1557       :8080  ESTABLISHED    1484  [java.exe]  

                    TCP    :8080       :1557  ESTABLISHED    1484  [java.exe]

                    • 7. Re: jboss multiple installation
                      matthias.boschen

                      I just got the tip to prefix the connector port in

                      deploy\jboss-web.deployer\server.xml

                      with the IP-address in use,

                      and it succeeded, deployment and startup went well ....

                      But this is one further configuration step I tried to avoid by using multiple IP-addresses and the -b start option

                      • 8. Re: jboss multiple installation
                        peterj

                        Matthias Boschen wrote:

                         

                        I just got the tip to prefix the connector port in

                        deploy\jboss-web.deployer\server.xml

                        with the IP-address in use,

                        Interesting. I've never had to do that, but then I haven't used APR in combination with running on multiple IP addresses before. Perhaps this is an APR-required change. Here is the line that shows that APR is being used:

                         

                        2010-09-28 08:30:26,460 INFO  [org.apache.coyote.ajp.AjpAprProtocol] Initializing Coyote AJP/1.3 on ajp-192.168.18.143-8009

                         

                        By the way, so that 6 months down the line when someone runs across this post, to save them from having to ask the question, could you post the exact config change you made in server.xml?

                        • 9. Re: jboss multiple installation
                          matthias.boschen

                          I rejoiced to son .

                           

                          The AS startet well - apparently.

                          But access via web to jboss, jmx-console or my application fails (site not available).

                          Port 8080 is not in use according to netstat.

                           

                          When shuting down I found the error message:

                          2010-10-01 08:50:39,402 INFO  [org.apache.coyote.ajp.AjpAprProtocol] Stopping Coyote AJP/1.3 on ajp-192.168.18.143-8009
                          2010-10-01 08:50:39,402 ERROR [org.apache.tomcat.util.net.AprEndpoint] Socket accept failed
                          org.apache.tomcat.jni.Error: Ein Blockierungsvorgang wurde durch einen Aufruf von WSACancelBlockingCall unterbrochen. 
                              at org.apache.tomcat.jni.Socket.accept(Native Method)
                              at org.apache.tomcat.util.net.AprEndpoint$Acceptor.run(AprEndpoint.java:1109)
                              at java.lang.Thread.run(Thread.java:619)

                          transl: "A blocking operation was interrupted by a call to WSACancelBlockingCall"

                          How did you manage to run Jboss AS on multiple IP-addresses without APR ?

                           

                          To answer your question:

                          I prefixed the first port-attribute in

                               ...\jboss-4.2.0.GA\server\<myServer>\deploy\jboss-web.deployer\server.xml

                          with the IP address and a colon:

                               <Service name="jboss.web">

                               ..

                                    <Connector port="<ip-address>:8080" address="${jboss.bind.address}"

                          • 10. Re: jboss multiple installation
                            peterj

                                 >>How did you manage to run Jboss AS on multiple IP-addresses without APR ?

                            Actually, all of the wiki pages you and I mentioned assume that APR is not installed.

                             

                            How did you install APR? Via JBoss Native? Or some other way?

                            • 11. Re: jboss multiple installation
                              matthias.boschen

                              How did you install APR? Via JBoss Native? Or some other way?

                              I wasn't jet aware that I'm using APR - nor what its function is.

                              I simply extracted the downloaded jboss-4.2.0.GA.zip and used the default server installation for my application.

                              The APR configuration seems to be part of the jboss-web.deployer package.

                               

                              So my questions remains: how can I use Jboss without APR - if this is the problem of my installation with multiple IP-addresses.

                              • 12. Re: jboss multiple installation
                                peterj

                                APR is not part of JBoss AS. However, you might have installed it as part of another product, such as Tomcat. What OS are you using?

                                 

                                See if this recent discussion of someone else's experience with unintentionally using APR helps: http://community.jboss.org/message/563470#563470

                                • 13. Re: jboss multiple installation
                                  matthias.boschen

                                  Hi Peter, and thank you so far for your answers.

                                   

                                  The quoted discussion didn't help me due to the different OS - I'm using Windows Server 2003.

                                   

                                  While struggling with APR I once copied tc-native.dll into the c:\windows directory.

                                  Now I removed it and still get an APR-message:

                                  ...
                                  12:25:19,410 INFO  [EJB3Deployer] Starting java:comp multiplexer
                                  12:25:20,754 INFO  [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
                                  12:25:21,395 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
                                  12:25:21,441 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-<ip-address>-8080
                                  12:25:21,457 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-<ip-address>-8009
                                  12:25:21,457 INFO  [Catalina] Initialization processed in 136 ms
                                  12:25:21,457 INFO  [StandardService] Starting service jboss.web
                                  12:25:21,457 INFO  [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
                                  12:25:21,488 INFO  [Catalina] Server startup in 43 ms

                                  .. and it still hangs.

                                  Port 8080 is connected to another local port used by the java.exe with the same pid.

                                  Shutdown does not work, I have to kill the process.

                                  • 14. Re: jboss multiple installation
                                    peterj

                                    Note that this APR message states that the APR library was not found and not loaded, And yes, placing tc-native.dll (which is the APR DLL) into c:\windows (which is in your PATH) is sufficient to cause JBoss AS to load it.

                                     

                                    Could you post the full console log, including the command you entered?

                                     

                                    Also, are you still trying to run multiple instances? And is this problem related to the first or second instance? If the problem is related to the second instance, also post the full console log, including the command entered, for the first instance.

                                    1 2 Previous Next