8 Replies Latest reply on May 25, 2011 5:06 PM by kishore1431

    Jboss http and AJP port not taking the offset ?

    kishore1431

      HI i have Jboss 5.1 GA running on Linux . I have changed the deafult http port to my custom port (lets say 8100) and i havent changed  other ports in  server.xml file.

       

      When i start my jboss instance i am passing the -Djboss.service.binding.set=ports-01  as a parameter and i expect Jboss instance to add offset 100 to all the ports that are in server.xml . This is not happening with my jboss server here  its adding the offset 100 to all other ports like rmi,webservice etc  but not  to  HTTP , AJP and SSL port. It is still taking the ports from server.xml ?

       

      is there a way  that i can select my range of ports and then i can add Offset to that range for each instance that i am running on my Machine.

       

      please suggest me

       

       

      Thank in advance.

        • 1. Jboss http and AJP port not taking the offset ?
          wdfink

          You should not change the server.xml, use the standard server.xml and change the port configuration of the binding manager only.

          1 of 1 people found this helpful
          • 2. Jboss http and AJP port not taking the offset ?
            kishore1431

            Hi fink,

             

              Thank you for you response .

             

            How can i give my own HTTP,AJP and Https port if needed ? or How can i set a range of ports for my Jboss instance ? Lets say i want my Jboss instance to use ports starting from 15000 ? and the second instance i can have offset , but  for which port the Jboss will add offset ?

             

            Thank you ...

            • 3. Jboss http and AJP port not taking the offset ?
              peterj

              Study the  server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml file, that should answer your questions. That file contains all port numbers used by JBoss AS - you can change the numbers to what you want. You can also change the offsets to what you want for the various binding values.

               

              BTW, note that some of the ports are set via XSL transforms (lok at the very end of the file), which is why your original attempt to set server.xml didn't work - it broke the transforms.

              1 of 1 people found this helpful
              • 4. Jboss http and AJP port not taking the offset ?
                kishore1431

                Thank you peter.

                 

                I reverted back all my changes in server.xml and i am using default server.xml which is part of "all" configuration .

                 

                I have changed all the ports in bindings file to my custom ports and when i started the jboss instance ,it throwed an binding exception error with a 4457 port part of  remoting-bisocket-service.xml. There is an other jboss instance running already using this port.

                 

                so i went and modified the port t0 my own custom port and i started the jboss instance again and  now it throwed a different error

                 

                please suggest me if am doing this in right way ???

                 

                 

                2011-05-20 11:04:53,554 ERROR [org.jboss.system.server.profileservice.repository.ScopedProfileServiceController] (main) Error installing to Create: name=ProfileKey@485b701a[domain=default, server=default, name=farm] state=Configured mode=On Demand requiredState=Installed

                java.lang.reflect.InvocationTargetException

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                        at java.lang.reflect.Method.invoke(Method.java:597)

                        at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:97)

                        at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:77)

                        at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.install(AbstractProfileLifeCycleAction.java:49)

                        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

                        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)

                        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

                        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

                        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)

                        at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)

                        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)

                        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                        at org.jboss.Main.boot(Main.java:221)

                        at org.jboss.Main$1.run(Main.java:556)

                        at java.lang.Thread.run(Thread.java:662)

                Caused by: java.lang.IllegalStateException: Must register RepositoryClusteringHandler before calling create()

                        at org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.create(ClusteredDeploymentRepository.java:198)

                        at org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.load(ClusteredDeploymentRepository.java:226)

                        at org.jboss.system.server.profile.repository.AbstractProfile.create(AbstractProfile.java:158)

                        ... 22 more

                2011-05-20 11:04:53,555 INFO  [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Loading profile: ProfileKey@3b4d679[domain=default, server=default, name=node1]

                2011-05-20 11:04:53,555 ERROR [STDERR] (main) Failed to boot JBoss:

                2011-05-20 11:04:53,555 ERROR [STDERR] (main) java.lang.IllegalStateException: Incompletely deployed:

                 

                *** PROFILES IN ERROR: Name -> Error

                Profile: ProfileKey@485b701a[domain=default, server=default, name=farm] in error due to java.lang.reflect.InvocationTargetException

                 

                *** PROFILES MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

                ProfileKey@3b4d679[domain=default, server=default, name=node1] is missing following dependencies: ProfileKey@485b701a[domain=default, server=default, name=farm]{Installed:**ERROR**}

                2011-05-20 11:04:53,555 ERROR [STDERR] (main)   at org.jboss.system.server.profileservice.repository.AbstractProfileService.logErrors(AbstractProfileService.java:613)

                2011-05-20 11:04:53,555 ERROR [STDERR] (main)   at org.jboss.system.server.profileservice.repository.AbstractProfileService.validate(AbstractProfileService.java:390)

                2011-05-20 11:04:53,555 ERROR [STDERR] (main)   at org.jboss.system.server.profileservice.repository.AbstractProfileService.validateProfile(AbstractProfileService.java:373)

                2011-05-20 11:04:53,555 ERROR [STDERR] (main)   at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:265)

                2011-05-20 11:04:53,555 ERROR [STDERR] (main)   at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                2011-05-20 11:04:53,555 ERROR [STDERR] (main)   at org.jboss.Main.boot(Main.java:221)

                2011-05-20 11:04:53,555 ERROR [STDERR] (main)   at org.jboss.Main$1.run(Main.java:556)

                2011-05-20 11:04:53,556 ERROR [STDERR] (main)   at java.lang.Thread.run(Thread.java:662)

                 

                [root@app31 log]# less server.log

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

                        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

                eLifeCycleAction.java:49)

                        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)

                eService.java:308)

                        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)

                        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                        at org.jboss.Main.boot(Main.java:221)

                        at org.jboss.Main$1.run(Main.java:556)

                        at java.lang.Thread.run(Thread.java:662)

                Caused by: java.lang.IllegalStateException: Must register RepositoryClusteringHandler before calling create()

                redDeploymentRepository.java:198)

                dDeploymentRepository.java:226)

                        at org.jboss.system.server.profile.repository.AbstractProfile.create(AbstractProfile.java:158)

                        ... 22 more

                ile: ProfileKey@3b4d679[domain=default, server=default, name=node1]

                2011-05-20 11:04:53,555 ERROR [STDERR] (main) Failed to boot JBoss:

                2011-05-20 11:04:53,555 ERROR [STDERR] (main) java.lang.IllegalStateException: Incompletely deployed:

                 

                *** PROFILES IN ERROR: Name -> Error

                onTargetException

                 

                *** PROFILES MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

                01a[domain=default, server=default, name=farm]{Installed:**ERROR**}

                leService.logErrors(AbstractProfileService.java:613)

                leService.validate(AbstractProfileService.java:390)

                leService.validateProfile(AbstractProfileService.java:373)

                start(ProfileServiceBootstrap.java:265)

                 

                 

                -Thanks

                • 5. Jboss http and AJP port not taking the offset ?
                  peterj

                  You have correctly changed the ports, you are no longer getting a port conflict. Instead you are now getting this error:

                   

                  Caused by: java.lang.IllegalStateException: Must register RepositoryClusteringHandler before calling create()

                   

                  I have no idea what is causing this error. Perhaps someone else can help.

                  • 6. Jboss http and AJP port not taking the offset ?
                    kishore1431

                    Thank you peter ...

                     

                    I am also seeing  other dependecy failures  for  bindingservice.beans/ , vfs.xml ,logging.xml   in boot.log when i start my Jboss instance.

                     

                    please suggest ....Thanks

                     

                    11:04:38,925 DEBUG [ProfileServiceBootstrap] Failed to build ManagedDeployment for: AbstractKernelDeployment@16e15

                    a69{name=file/jboss-as/server/node1/conf/bootstrap/logging.xml installed=true beanFactori

                    es=[AbstractBeanMetaData@24f6af3b{name=LogBridgeHandler bean=org.jboss.logbridge.LogBridgeHandler properties= cons

                    tructor=null autowireCandidate=true}]}

                    org.jboss.deployers.spi.DeploymentException: Error deploying: file:jboss-as/server/node1/

                    conf/bootstrap/logging.xml

                            at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

                            at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.ja

                    va:136)

                            at org.jboss.system.server.profileservice.ProfileServiceBootstrap.initBootstrapMDs(ProfileServiceBootstrap

                    .java:426)

                            at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:242)

                            at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                            at org.jboss.Main.boot(Main.java:221)

                            at org.jboss.Main$1.run(Main.java:556)

                            at java.lang.Thread.run(Thread.java:662)

                    Caused by: java.lang.IllegalStateException: ClassLoader has not been set

                            at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.getClassLoader(AbstractDeploymentUnit.

                    java:159)

                    :

                     

                     

                     

                    11:04:38,931 DEBUG [ProfileServiceBootstrap] Failed to build ManagedDeployment for: AbstractKernelDeployment@96140

                    1f{name=file:/jboss-as/server/node1/conf/bootstrap/vfs.xml installed=true beanFactories=[A

                    bstractBeanMetaData@4fb8b808{name=VFSCache bean=null properties=[realCache, permanentRoots] constructor=AbstractCo

                    nstructorMetaData@370a5c21{parameters=[null] factoryClass=org.jboss.virtual.spi.cache.VFSCacheFactory factoryMetho

                    d=getInstance} autowireCandidate=true start=AbstractLifecycleMetaData@92696c2{ whenRequired=ControllerState@683a3e

                    1b{Start} parameters= }}, AbstractBeanMetaData@47c39412{name=VfsNamesExceptionHandler bean=org.jboss.virtual.plugi

                    ns.context.helpers.NamesExceptionHandler properties= constructor=AbstractConstructorMetaData@792e4e8c{parameters=[

                    java.lang.String]} autowireCandidate=true}]}

                    org.jboss.deployers.spi.DeploymentException: Error deploying: file://jboss-as/server/node1/

                    conf/bootstrap/vfs.xml

                            at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

                            at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.ja

                    va:136)

                            at org.jboss.system.server.profileservice.ProfileServiceBootstrap.initBootstrapMDs(ProfileServiceBootstrap

                    .java:426)

                            at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:242)

                            at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                            at org.jboss.Main.boot(Main.java:221)

                            at org.jboss.Main$1.run(Main.java:556)

                            at java.lang.Thread.run(Thread.java:662)

                    Caused by: java.lang.IllegalStateException: ClassLoader has not been set

                            at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.getClassLoader(AbstractDeploymentUnit.

                    java:159)

                            at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactory

                    :

                     

                     

                     

                    1 ERROR [AbstractKernelController] Error installing to Parse: name=vfsfile:jbo

                    ss-as/server/node1/conf/bindingservice.beans/ state=PreParse mode=Manual requiredState=Parse

                    org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfilejb

                    oss-as/server/node1/conf/bindingservice.beans/

                            at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

                            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsi

                    ngDeployerWithOutput.java:362)

                            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsi

                    ngDeployerWithOutput.java:322)

                            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsi

                    ngDeployerWithOutput.java:294)

                            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeploy

                    erWithOutput.java:234)

                            at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)

                            at org.jboss.deployers.plugins.deployers.DeployersImpl.doI

                        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)

                            at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

                            at org.jboss.Main.boot(Main.java:221)

                            at org.jboss.Main$1.run(Main.java:556)

                            at java.lang.Thread.run(Thread.java:662)

                    Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: {urn:jboss:bean-deployer:2.0}property no

                    t found as a child of {urn:jboss:bean-deployer:2.0}property in unordered_sequence: {urn:jboss:bean-deployer:2.0}an

                    notation* {choice}* {wildcard}?

                     

                     

                     

                    -Thanks

                    • 7. Re: Jboss http and AJP port not taking the offset ?
                      jaikiran

                      1) You can ignore those ClassLoader has not been set DEBUG messages http://community.jboss.org/wiki/ClassLoaderhasnotbeensetexceptioninbootlog

                      2) How did you create that "node1" profile

                      3) The JBossXBException suggests that some of the changes that you did to bindingservice.beans might be incorrect. We'll need more information on what exactly you changed and what the file looks like now with those changes.

                      • 8. Re: Jboss http and AJP port not taking the offset ?
                        kishore1431

                        Thanks for the info jaikiran.

                         

                        I agree with your point 3 . I have cleaned up everything and started everythign from scratch by following the points that was mentioned earlier in the post and now the Jboss is  up and running with out any exceptions. . The changes that i have done might be in correct .

                         

                         

                        Thanks everyone for the suggestions .