1 2 Previous Next 20 Replies Latest reply on Sep 5, 2011 12:53 PM by tomjenkinson

    TransactionManager failed to deploy

    eduarm76

      While following the  steps of the 2 min. deploymnet guide is not possible to initiate the JBoss instance after configuring the transanction manager (ant jts).

       

      This issue was identified by  Michael Musgrove as a posible "TransactionManager that failed to deploy"

       

      Here is the (extended) output of the relevant steps:

       

      1) $ ant -v jts

      Apache Ant version 1.7.1 compiled on June 27 2008
      Buildfile: build.xml
      Detected Java version: 1.5 in: /dvl/web/webroot/blacktie/jdk1.5.0_16/jre
      Detected OS: Linux
      parsing buildfile /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/build.xml with URI = file:/dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/build.xml
      Project base dir set to: /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions
      [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
      Build sequence for target(s) `jts' is [jts]
      Complete build sequence is [jts, usage, modify-jts-config-files, tools, xts, ]

       

      jts:
           [move] Moving 1 file to /dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/conf
           [move] Attempting to rename: /dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/conf/jbossts-properties.xml to /dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/conf/jbossts-properties-old-for-jta.xml
           [copy] Copying 1 file to /dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/conf
           [copy] Copying /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/jbossts-properties.xml to /dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/conf/jbossts-properties.xml
           [echo] Transaction service configuration file installed.
      Project base dir set to: /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions
        [antcall] calling target(s) [modify-jts-config-files] in build file /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/build.xml
      parsing buildfile /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/build.xml with URI = file:/dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/build.xml
      Project base dir set to: /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions
      Override ignored for property "target.server.dir"
      Build sequence for target(s) `modify-jts-config-files' is [modify-jts-config-files]
      Complete build sequence is [modify-jts-config-files, jts, usage, tools, xts, ]
        [antcall] Entering /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/build.xml...
      Build sequence for target(s) `modify-jts-config-files' is [modify-jts-config-files]
      Complete build sequence is [modify-jts-config-files, jts, usage, tools, xts, ]

       

      modify-jts-config-files:
      [replaceregexp] Replacing pattern '<property\s+name=.com\.arjuna\.ats\.arjuna\.recovery\.recoveryExtension\d+.\s*value=.com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.\s*/>' with '' in '/dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/conf/jbossts-properties.xml'.
      [replaceregexp] File has changed; saving the updated file
      [replaceregexp] Replacing pattern 'com.arjuna.ats.jbossatx.jta.TransactionManagerService' with 'com.arjuna.ats.jbossatx.jts.TransactionManagerService' in '/dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/deploy/transaction-jboss-beans.xml' by line.
      [replaceregexp] File has changed; saving the updated file
      [replaceregexp] Replacing pattern '</bean>' with '    <start><parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter></start>
      [replaceregexp]
      [replaceregexp]     </bean>' in '/dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/deploy/transaction-jboss-beans.xml'.
      [replaceregexp] File has changed; saving the updated file
      [replaceregexp] Replacing pattern 'jacorb.poa.thread_pool_max\s*=\s*\d+' with 'jacorb.poa.thread_pool_max=32' in '/dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/conf/jacorb.properties'.
      [replaceregexp] File has changed; saving the updated file
      [replaceregexp] Replacing pattern 'org.jboss.tm.iiop.TxServerClientInterceptorInitializer' with 'com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl' in '/dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/deploy/iiop-service.xml'.
      [replaceregexp] File has changed; saving the updated file
      [replaceregexp] Replacing pattern 'org.jboss.tm.iiop.TxServerInterceptorInitializer' with 'com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer' in '/dvl/web/webroot/blacktie/jboss-5.1.0.GA/server/all/deploy/iiop-service.xml'.
      [replaceregexp] File has changed; saving the updated file
        [antcall] Exiting /dvl/web/webroot/blacktie/jboss-5.1.0.GA/docs/examples/transactions/build.xml.
           [echo] JBossAS config files updated to run JTS in config ../../../server/all

       

      BUILD SUCCESSFUL
      Total time: 0 seconds

       

       

      2) Edit <JBOSS_HOME>/server/all/conf/jbossts-properties.xml to change the CONFIGURATION_FILE to NAME_SERVICE

           $grep NAME_SERVICE  server/all/conf/jbossts-properties.xml
              <property name="com.arjuna.orbportability.bindMechanism" value="NAME_SERVICE"/>

       

      3)From this point on, I cannot start the jboss instance. Here is the list of errors message found in the log files:

             ./run.sh -c all -b XXX.XXX.XXX.XXX  -Djboss.service.binding.set=ports-03

      09:32:58,935 FATAL [TransactionManagerService] Problem encountered while trying to register transaction manager with ORB!
      09:32:58,935 FATAL [TransactionManagerService] Failed to initialize recovery manager
      java.lang.Exception: Problem encountered while trying to register transaction manager with ORB! org.omg.CORBA.TRANSIENT: Re
      tries exceeded, couldn't reconnect to 127.0.0.1:3528  vmcid: 0x0  minor code: 0  completed: No
              at com.arjuna.ats.jbossatx.jts.TransactionManagerService.start(TransactionManagerService.java:281)
              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:585)
              at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
              at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControl
      lerContextAction.java:241)

            and later inf the same log:  

      DEPLOYMENTS IN ERROR:
        Deployment "interface javax.transaction.TransactionManager" is in error due to the following reason(s): ** NOT FOUND Depends on 'interface javax.transaction.TransactionManager' **
        Deployment "jboss.jca:service=CachedConnectionManager" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:service=CachedConnectionManager' **
        Deployment "TransactionManager" is in error due to the following reason(s): **ERROR**, java.lang.Exception: Problem encountered while trying to register transaction manager with ORB! org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to 127.0.0.1:3528  vmcid: 0x0  minor code: 0  completed: No
        Deployment "jboss.web:service=WebServer" is in error due to the following reason(s): Configured
        Deployment "<UNKNOWN DefaultUserTransactionprovider>" is in error due to the following reason(s): ** UNRESOLVED Demands 'TransactionManager' **
        Deployment "jboss.jca:service=WorkManager" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:service=WorkManager' **
        Deployment "jboss:service=TransactionManager" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss:service=TransactionManager' **
        Deployment "jboss:service=invoker,type=unified" is in error due to the following reason(s): Configured

       

      My environment is exactly the same as in the example:

      $ java -version

      java version "1.5.0_16"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_16-b02, mixed mode)java version "1.6.0_10"
      $ant -version

      Apache Ant version 1.7.1 compiled on June 27 2008

      $mvn -version

      Maven version: 2.0.9

      jboss-5.1.0.GA

       

       

      Any ideas?

        • 1. Re: TransactionManager failed to deploy
          mmusgrov

          Would it be possible for you to attach the name service config file located at:

           

               server/all/conf/jacorb.properties

          • 2. Re: TransactionManager failed to deploy
            eduarm76

            Sure, here it is.

            • 3. Re: TransactionManager failed to deploy
              mmusgrov

              That looks ok so it must be the port bindings you are using. The bindings are defined in server/all/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml and the one you have chosen offsets all the ports by 300.

               

              Would it be possible to use the default port bindings ie don't use -Djboss.service.binding.set="ports-03" when starting JBoss. If this is not possible try adding 300 to the naming service port number (though I must admit I would have thought the service binding manager would already have done that for you when you specified binding set ports-03).

              • 4. Re: TransactionManager failed to deploy
                eduarm76

                Ok so I tried using the standard ports  and looks like is not making any diference. Attached is the new log file.

                 

                Just a thought:  Could all this NOT FOUND Depends on... be realted to a missed maven action?

                • 5. Re: TransactionManager failed to deploy
                  mmusgrov

                  The App Server log is now indicating that the transaction manager conf file (server/all/deploy/transaction-jboss-beans.xml) is corrupt. Did you accidently edit it - the original should still be in the AS examples directory.

                  • 6. Re: TransactionManager failed to deploy
                    eduarm76

                    No , I didn't change the transaction-jboss-beans.xml file, I suppose it was corrupted after my previous attempts.

                     

                    Anyway, you were right about the port bindings, using the default ones works but only in a different host machine which is not running anything else. Before I was using a host with a running instance of Tomcat, that was the reason for using the parameter -Djboss.service.binding.set="ports-03" ,but I suppose this is not enough to avoid port conflicts.

                     

                     

                    Thanks a lot.

                    • 7. Re: TransactionManager failed to deploy
                      mmusgrov

                      Before I was using a host with a running instance of Tomcat, that was the reason for using the parameter -Djboss.service.binding.set="ports-03" ,but I suppose this is not enough to avoid port conflicts.

                      Ok glad to see some progress. I'll check out the AS branch or consult with AS team when I get the chance.

                       

                      Now to install BlackTie into the AS - let us know how you get on and what you think of it.

                      • 8. Re: TransactionManager failed to deploy
                        stevenable

                        [I apologize if this shouldn't be a "reply" but it is strongly related.]

                         

                        I am getting the same error as Eduardo originally posted but my cause seems to be different.  I basically followed the README that is part of the JBoss install.  I'm running on RedHat 5.3 64bit, installed JBoss 5.1.0GA, HornetQ 2.1.2 Final, BlackTie 3.0.0 Final.  I followed the steps in the readme without any problems.  I did find that step #5 (black tie admin) had to be changed somewhat because the btconfig.xml is not transferred [I found instruction on here about expanding the ear myself and copying the btconfig].

                         

                        If I do NOT change the JBossTS TransactionFactory to 'NAME_SERVICE' (leave it 'CONFIGURATION_FILE'), the only error I get is a small one in JBoss startup (ERROR [orb] no adapter activator exists for Naming).   And JBoss appears to be running normally.  But trying to start the example xamti server fails (examples/xatmi/fooapp), unable to register and telling me I missed step #3 (ant jts ...)

                         

                        Changing JBossTS to 'NAME_SERVICE' then fails during JBoss startup with the backtrace that Eduardo shows above (item #3).  I am NOT using an alternate port set (e.g. only 'run.sh -c all-with-hornetq -b IP').  I have poked around, tried various things with no success and I must admit to not knowing where to start.  And when I saw this was similar to a previously reported error...  This is consistently reproducable so if some log might be of benefit to you, please let me know. 

                         

                        I also have been unable to use 'btadmin' to start the server (when JBoss is active) as it always reports 'No machines configured for host'.  I saw somewhere here on starting the server (xamti, not jboss) manually using 'server -c linux -i 1 -s fooapp' which is how I'm starting it.  And it fails with the same error 'Unknown error resolving Tx Service did you run ant jts in the JBoss {etc}'.

                         

                        I have tried removing temporaries under jboss/server/al-with-hornetq (e.g. data, log, tmp, work) as I saw referenced in another response but that seems to have no affect on my results.  Not thinking it is relevant but the JBoss shutdown script doesn't work with TS changed to 'NAME_SERVICE', I have to kill the JVM running JBoss (but shutdown does work for 'configuration_file' although I find I have to specify the host:port URL).

                        • 9. Re: TransactionManager failed to deploy
                          stevenable

                          I think I have figured out the cause of the failure but am still trying to find how to correct it.

                           

                          My host appears to have two NICs and 'localhost' (127.0.0.1) is NOT the same as 'hostname' (10.65.225.81). (That is, listening on 127.0.0.1 won't receive connection from 10.65.225.81)  Some of the configurations setup for 'localhost', some setup for 'hostname'.  Thus (I think) the problem is the ORB service is on one connection and the TM trying to access from the other.  I'm basing this on the following from JBoss startup log [I have to retype the log entries]:

                           

                          INFO [com.arjuna.ats.arjuna.logging.arjLogger] (main) TransactionStatusManagerItem - host: 10.65.225.81 port: 4713

                          ... (two other entries) ...

                          FATAL [com.arjuna.ats.jbossatx.jts.TransactionManagerService] (main) Failed to initialize recover manager

                          java.lang.Exception: Problem encountered while trying to register transaction manager with ORB! org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to 127.0.0.1:3528  vmcid: 0x0  minor code: 0  completed: No

                           

                          I do notice these are different ports and there is no startup message for port 3528 but I presume that is just hidden by the log level.

                           

                          Now to try and see what JBoss config file I need to change to be consistent on the host IP to use.  If anyone knows, please let me know.

                          • 10. Re: TransactionManager failed to deploy
                            stevenable

                            Well, that was the problem and JBoss now starts as well as the Blacktie example working correctly.

                             

                            I modified both 'jbossts-properties.xml'; changed 'com.arjuna.ats.arjuna.recovery.transactionStatusManagerAddress' from empty to be the IP I needed.  I also changed 'jacorb.properties', changed value for 'ORBInitRef.NameService' replacing 'localhost' to be the IP as well as defining 'OAIAddr' to my IP which was commented out.  I am not certain which of those actually was the correct change; may investigate that too.

                             

                            I still get the simple 'Error [orb] no adapter activator exists for Naming' in the JBoss log but have seen other posts that imply this is a non-problem.

                             

                            I also still am unable to use 'btadmin startup' to launch server (get 'No machines configured for host') BUT I am able to run the server manually (./server -i 1 -s fooapp) AND can use btadmin to stop the server.  I'll look into that some other time.

                             

                            Thank you to anyone that DID review my post even if you didn't respond.

                            • 11. Re: TransactionManager failed to deploy
                              mmusgrov

                              Could you append the btadmin log (it is called blacktie-J.log and will be in the directory from where you ran the command)

                              • 12. Re: TransactionManager failed to deploy
                                stevenable

                                Quick follow-up to my prior post.  I removed the 'jbossts-propertiex.xml' setting and it still starts up fine so it appears the jacorb.properties settings are what was needed.  I tried keeping only the 'OAIAddr' setting and that was insufficient, it does need 'ORBInitRef.NameService' 2nd field to be the IP.

                                • 13. Re: TransactionManager failed to deploy
                                  stevenable

                                  You requested the 'btadmin' log; please realize I'm working on a closed network and am unable to simply copy files  

                                   

                                  I just repeated the test using 'btadmin startup' and the log contains only a few lines; here is what I hope is relevant.  I'm skipping the first few lines  where it reads the btconfig.xml.  The shell 'hostname' command echo 'hostxyz' and the JBOSSAS_IP_ADDR envar is set to 'hostxyz' as well.

                                   

                                  DEBUG (conf.XMLEnvHandler :329) - blacktie.orb.arg.1 is -ORBInitRef

                                  DEBUG (conf.XMLEnvHandler :329) - blacktie.org.arg.2 is NameService=corbaloc::hostxyz:3528/NameService

                                  -- skip two lines

                                  DEBUG (commands.Startup :87) - Listing machines

                                  INFO (conf.Server :51) - Checking for host: hostname.domain or ip: 10.65.225.81

                                  DEBUG (conf.Server :55) - Checking against: hostxyz or ip: null

                                  DEBUG (conf.Server :55) - Checking against: hostxyz or ip: null

                                  ERROR (commands.Startup :141) - No machines configured for host

                                  -- end of log [yes that one lines does repeat twice]

                                  • 14. Re: TransactionManager failed to deploy
                                    mmusgrov

                                    The output of /bin/hostname needs to match hostxyz. I don't why that is the case (where does hostxyz come from) but you can work around the issue by putting an explicit ip address to 10.65.225.81 in each MACHINE section of your btconfig.xml file. For example:

                                     

                                    <MACHINE id="fooapp1" hostname="${HOSTNAME}" ipAddress=10.65.225.81 etc

                                    1 2 Previous Next