4 Replies Latest reply on Feb 16, 2009 5:44 PM by johnnewman

    Copying large ear over network: URLDeploymentScanner reads i

      Hello,

      We are revisiting our build process, one of the things I'd like to do is automate copying of the final ear out to whatever server. Currently all of our servers are configured with the URLDeploymentScanner to check the deploy folder every 5 seconds.

      This doesn't really work over the network - copying a 25 MB ear over a network takes longer than 5 seconds, and the scanner complains "Can't open corrupt file etc"

      So instead I have to copy it to the folder above deploy, and when that finishes I can move it into the deploy folder. This works fine but is far from ideal.

      I could increase the timeout of the scanner, which would yield a better percentage of this working, but if I start the copy at the wrong second it will still fail.

      Is there a way to turn off the scanner completely, and manually kick jboss to say "hey, deploy this ear file I just put into that folder"?

        • 1. Re: Copying large ear over network: URLDeploymentScanner rea
          peterj

          Yes, you can do this. With the scanner off, call the deploy operation of the jboss.system:service=MainDeployer mbean. Here is an example using twiddle:

          twiddle invoke "jboss.system:service=MainDeployer" deploy /jboss/home/server/xxx/deploy/myapp.ear

          • 2. Re: Copying large ear over network: URLDeploymentScanner rea

            Thanks for the quick response Peter.

            I've gotten this to work fine locally using the command you've posted. So we are getting somewhere... However I'm stuck when trying to do it over the network.


            \\test-server\e$\jboss\bin\twiddle.bat invoke "jboss.system:service=MainDeployer" deploy file:///e:/jboss/server/default/deploy/OurApp.ear

            it doesn't seem to do anything, i think it is because I don't have the URL correct. I've tried:

            file://///test-server/e$/jboss/server/default/deploy/OurApp.ear and
            file:///e:/jboss/server/default/deploy/OurApp.ear

            both of those appear to be the correct urls, if I paste them into a browser the file pops up. But the mbean thing doesn't seem to pick up the file with either one. What am I doing wrong?

            Thanks

            • 3. Re: Copying large ear over network: URLDeploymentScanner rea
              peterj

              The second URL is the best bet (doesn't reply on an administrative share and admin access to that share), and it should work. So it is debugging time. Here's what I would do:

              1) Install JBoss AS locally and run twiddle from a local bin directory. This will eliminate weird issues with accessing twiddle, and the files it requires, across the network. If this works, reduce the local JBoss AS footprint to include only the necessary files to satisfy twiddle. If it does not work, go to set 2. (An alternative is to log into test-server, open a command prompt and run twiddle from there.)

              2) Try the URL in jmx-console. If that works then the URL is fine and the issue is with twiddle. If it does not work, then the problem is in the MBean somewhere.

              3) Then add debug code to twiddle or the mbean to figure out what is going on.

              Wait a minute, another thought crossed my mind. Are you running twiddle from a remote system? If so, twiddle connects to locahost by default, which is the remote system, which is not where the app is located! Try adding "-s test-server:1099" to the command line (run "twiddle --help" for full syntax).

              • 4. Re: Copying large ear over network: URLDeploymentScanner rea

                Peter,

                Thanks again for your response. I do appreciate it. I have been away from this for a while but will revisit soon and update.