8 Replies Latest reply on May 7, 2011 11:00 AM by Ramesh Reddy

    Fail to deploy vdb by Admin API sometimes.

    S.Q. R Newbie

      Hi, all

       

      Sometimes I failed to deploy vdb by Admin API.

       

      The jboss is jboss-soa-p.5.0.0. The jboss home is /opt/teiid/jboss-teiid-5.0.1-7.4-beta1/jboss-soa-p.5.0.0/jboss-as/

      The teiid version is 7.2.

      And the option -c used when starting jbossas refers to a symbolic link.

      The start cmd is below:

      nohup ../bin/run.sh -b 15.154.146.111 -Djboss.service.binding.set=ports-01 -c teiid-server &
      

      The teiid-server is a symbolic link.

      lrwxrwxrwx  1 root root        29 Apr 14 16:04 teiid-server -> /var/mwm/server/teiid-server/

       

      The whole log file "deployError.log" was attached. You can search the key word  "/StreamingDeploymentTarget" in the log file.

      The test case is that deploying a given VDB continuously. There are two fail of hundreds deployments.

      The exception is below:

      11:07:47,017 INFO  [DeployHandler] Begin start, [vfszip:/opt/teiid/jboss-teiid-5.0.1-7.4-beta1/jboss-soa-p.5.0.0/jboss-as/server/teiid72/deploy/W23.vdb/]
      11:07:48,163 INFO  [DeployHandler] Failed to complete command: [start] for deployment: names=[vfszip:/opt/teiid/jboss-teiid-5.0.1-7.4-beta1/jboss-soa-p.5.0.0/jboss-as/server/teiid72/deploy/W23.vdb/]
      java.lang.NullPointerException
              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:776)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:293)
              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:207)
              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
              at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
              at org.jboss.remoting.Client.invoke(Client.java:1917)
              at org.jboss.remoting.Client.invoke(Client.java:768)
              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304)
              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:189)
              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)
              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)
              at org.teiid.adminapi.jboss.ManagedUtil.execute(ManagedUtil.java:289)
              at org.teiid.adminapi.jboss.ManagedUtil.deployArchive(ManagedUtil.java:244)
              at org.teiid.adminapi.jboss.ManagedUtil.deployArchive(ManagedUtil.java:222)
              at org.teiid.adminapi.jboss.Admin.deployVDB(Admin.java:186)
              at sun.reflect.GeneratedMethodAccessor446.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.teiid.logging.LogManager$LoggingProxy.invoke(LogManager.java:121)
              at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:297)
              at $Proxy221.deployVDB(Unknown Source)
              at sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.teiid.transport.ServerWorkItem.run(ServerWorkItem.java:81)
              at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)
              at org.teiid.transport.SocketClientInstance.processMessagePacket(SocketClientInstance.java:160)
              at org.teiid.transport.SocketClientInstance.receivedMessage(SocketClientInstance.java:149)
              at org.teiid.transport.SSLAwareChannelHandler.messageReceived(SSLAwareChannelHandler.java:210)
              at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)
              at org.teiid.transport.SSLAwareChannelHandler.messageReceived(SSLAwareChannelHandler.java:210)
              at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
              at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:144)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:214)
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
              at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
              at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281)
              at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201)
              at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
              at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:636)
      11:07:48,165 INFO  [DeployHandler] Remove, [vfszip:/opt/teiid/jboss-teiid-5.0.1-7.4-beta1/jboss-soa-p.5.0.0/jboss-as/server/teiid72/deploy/W23.vdb/]
      11:07:48,168 ERROR [ADMIN_API] Unexpected exception for session dh8/NXOSSwZH
      [AdminComponentException]java.lang.NullPointerException
      1 [AdminProcessingException]java.lang.NullPointerException
      2 [RuntimeException]java.lang.NullPointerException
      3 [NullPointerException]
              at org.teiid.client.util.ExceptionUtil.convertException(ExceptionUtil.java:72)
              at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:303)
              at $Proxy221.deployVDB(Unknown Source)
              at sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.teiid.transport.ServerWorkItem.run(ServerWorkItem.java:81)
              at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)
              at org.teiid.transport.SocketClientInstance.processMessagePacket(SocketClientInstance.java:160)
              at org.teiid.transport.SocketClientInstance.receivedMessage(SocketClientInstance.java:149)
              at org.teiid.transport.SSLAwareChannelHandler.messageReceived(SSLAwareChannelHandler.java:210)
              at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
              at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:144)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:214)
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
              at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
              at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281)
              at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201)
              at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
              at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:636)
      Caused by: [AdminProcessingException]java.lang.NullPointerException
      1 [RuntimeException]java.lang.NullPointerException
      2 [NullPointerException]
              at org.teiid.adminapi.jboss.ManagedUtil.execute(ManagedUtil.java:294)
              at org.teiid.adminapi.jboss.ManagedUtil.deployArchive(ManagedUtil.java:244)
              at org.teiid.adminapi.jboss.ManagedUtil.deployArchive(ManagedUtil.java:222)
              at org.teiid.adminapi.jboss.Admin.deployVDB(Admin.java:186)
              at sun.reflect.GeneratedMethodAccessor446.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.teiid.logging.LogManager$LoggingProxy.invoke(LogManager.java:121)
              at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:297)
              ... 32 more
      Caused by: java.lang.RuntimeException: java.lang.NullPointerException
              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)
              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:189)
              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)
              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)
              at org.teiid.adminapi.jboss.ManagedUtil.execute(ManagedUtil.java:289)
              ... 40 more
      Caused by: java.lang.NullPointerException
              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:776)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:293)
              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:207)
              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
              at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
              at org.jboss.remoting.Client.invoke(Client.java:1917)
              at org.jboss.remoting.Client.invoke(Client.java:768)
              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304)
              ... 44 more
      11:07:52,930 INFO  [PROCESSOR] Clearing prepared plan cache
      11:07:53,132 INFO  [RUNTIME] Data Source DFS_CORE not accessible.
      11:07:53,133 INFO  [RUNTIME] Data Source workspace_23Connection not accessible.
      11:07:53,134 INFO  [RUNTIME] Data Source workspace_23Connection not accessible.
      11:07:53,134 INFO  [RUNTIME] VDB "W23.1[DR_dfs[dfs/teiid/DFS_CORE, localdb/oracle/workspace_23Connection], ext[ext/oracle/workspace_23Connection], workspaceInstance[]]" deployed in inactive state.
      

       

      BTW, I found that there was an issue of Jboss-soa that has similar exception.

       

      https://issues.jboss.org/browse/SOA-1768?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs

       

      Any hint is appreciated.

       

      Thank you.

       

       

      Best Regards,

      S.Q.R

        • 1. Fail to deploy vdb by Admin API sometimes.
          Ramesh Reddy Master

          The issue you referenced was during the remove, and artifact was already removed, then NPE generated. In your case you are deploying. What I want to know is in your case is

           

          Did the VDB actually deployed, and NPE was saying that the deployment already done or actual error in deploying. I am trying to figure out if I can ignore the NPE or not.

           

          Thanks

           

          Ramesh..

          • 2. Re: Fail to deploy vdb by Admin API sometimes.
            allen li Newbie

            Hello Ramesh,

             

                      When we use option "-c path" to start jboss, if this path is a link as description of this topic.  we met a issue about deploy VDB in Teiid 7.2 ( or 7.1) sometimes.

            If this path is real path, it will be ok. 

            Now we have used 7.4 beta1 for Teiid. We use "link" to start Jboss. it looks OK.

            So I want to know whether this is known bug which has been fix from 7.1 or 7.2 to now.

             

             

            Thanks for your help.

            • 3. Re: Fail to deploy vdb by Admin API sometimes.
              Ramesh Reddy Master

              Allen,

               

              -c <profile> = points to what profile you want to start like 'default', 'all' etc. I did not understand the link part here. Either way, I do not know of any fix we put in for this issue.

               

              Thanks

               

              Ramesh..

              • 4. Re: Fail to deploy vdb by Admin API sometimes.
                allen li Newbie

                Hello Ramesh.

                 

                     I am testing this case. Follow is my test code.

                 

                 

                for (int i = 0; i < 100000; i++) {

                            long l = System.currentTimeMillis();

                            try {

                                Admin admin = org.teiid.adminapi.AdminFactory.getInstance()

                                        .createAdmin("admin", "admin".toCharArray(),

                                                "mm://15.154.146.168:31543");

                                FileInputStream p = new FileInputStream("c:/W23.vdb");

                                admin.deployVDB("W23.vdb", p);

                                p.close();

                                admin.close();

                                System.out.println(i+"==>>"+(System.currentTimeMillis()-l));

                            } catch (Exception e) {

                                // TODO Auto-generated catch block

                                e.printStackTrace();

                                throw e;

                            }

                        }

                 

                 

                I am testing for Teiid 7.4 beta1.  I also find same issue. When I start jboss use "-c teiid-server". This issue will be happened. The attchement is log of this issue.

                In my environment , we create a link which is below our $JBOSS_HOME/server.

                It looks that.

                lrwxrwxrwx 1 root root        34 Mar 31 15:17 teiid-server -> /var/mwm/jboss/server/teiid-server

                 

                 

                "$JBOSS_HOME/server/teiid-server" and "/var/mwm/jboss/server/teiid-server" are not same path. So I create a link from

                "$JBOSS_HOME/server/teiid-server" to "/var/mwm/jboss/server/teiid-server"/

                .


                We can have 2 difference ways to start jboss. Thay are "-c teiid-server" and "-c /var/mwm/jboss/server/teiid-server".

                 

                Way 1. 

                          When using "-c teiid-server", it will throw an exception as you have saw. 

                Way 2.

                          When using "-c /var/mwm/jboss/server/teiid-server", I have not found this issue by now.

                I am testing way 2. At this time it has run over 900 times. It is OK now.

                 

                 

                 

                Could you give me any advice to avoid this issue ?

                 

                Mega thanks

                Allen.

                • 5. Re: Fail to deploy vdb by Admin API sometimes.
                  allen li Newbie

                  An update follow previous message.

                   

                  It is running over  1800 times use way 2. It is ok now.

                  • 6. Re: Fail to deploy vdb by Admin API sometimes.
                    allen li Newbie

                    By now, My test has been running over 10700 times in way 2.

                    It is still ok.

                    • 7. Fail to deploy vdb by Admin API sometimes.
                      allen li Newbie

                      Hello Ramesh.

                       

                      My test has been running all day.  It has been run over 14000 times in way 2. It looks OK.

                      It fail under 1000 times in way 1.

                      So Maybe it is a bug for teiid I think.  Or shall I configure something to avoid it?

                      What do you think about it?

                       

                       

                       

                      Thanks a lot

                       

                      Allen

                      • 8. Fail to deploy vdb by Admin API sometimes.
                        Ramesh Reddy Master

                        Allen,

                         

                        Look at this https://issues.jboss.org/browse/TEIID-1511

                         

                        and the releated JBoss Remoting JIRA, try to apply the patch from that issue and rebuild the jboss-remoting.jar, this will remove the remote deployer to local in VM deployer. That may improve the above deployment situation.

                         

                        Thanks

                         

                        Ramesh..