6 Replies Latest reply on Oct 27, 2016 12:21 AM by Sayan Roy

    BLDeploy job to install Jboss in Windows doesnt get completed

    Sayan Roy

      Hi,

       

      I wanted to install Jboss on windows using BSA. I created a BLPackage where I copied the Jboss installer, used java to extract the jar file and install jboss in the install directory (for me the path is C:\jboss-4.0.4). Then go to bin directory of installed folder and execute "run.bat". This batch file starts the jboss service and I can see the Jboss welcome page in the browser when I give http://localhost:8080. But the BLDeploy job doesn't get completed in BSA, since the command prompt doesn't give the control back while running the batch file. If you hit Ctrl+C the batch job ends and the jboss service gets stopped.

      How to resolve this issue?

       

      Best,

      Sayan

        • 1. Re: BLDeploy job to install Jboss in Windows doesnt get completed
          Edwin Lindeman

          in your BLPackage are you using external command to execute "run.bat" ? if so can you use "start run.bat" and see if it separates itself then your BLPackage should continue? Just a thought.

          1 of 1 people found this helpful
          • 2. Re: BLDeploy job to install Jboss in Windows doesnt get completed
            Wenchi Liao

            You're not actually getting the prompt back; ie, run.bat is not returning. If run.bat did return, ^c will not stop it. It looks like run.bat is starting a new shell, and you are seeing a new shell's prompt.

             

            The general way to handle this is to run the command as a service, or use a helper command to run it in the background. Looking around, there seems to be some documented mechanisms to run jboss as a service at RunJBossAsAServiceOnWindows | JBoss Developer .

             

            The "start cmd" may work as a helper to move it to the background, but I have mixed results with other commands. I usually opt for a little vbs helper script to push things into the background.

            1 of 1 people found this helpful
            • 3. Re: BLDeploy job to install Jboss in Windows doesnt get completed
              Bill Robinson

              Or figure out why it’s not returning and fix that.  if this is a supported silent install method i would expect it to return and exit cleanly after the install is done.

              • 4. Re: BLDeploy job to install Jboss in Windows doesnt get completed
                Sayan Roy

                Thanks Liao. The start command did work as a helper to move it to the background, opening a new window and BSA job got completed, and the url is working too. I don't why i tried the same thing yesterday as Edwin told BSA job didnt work. Might be I made some mistake.

                 

                I tried the other way round too, to see  if it works. To start jboss as a windows service. There i download the jboss-web version, extracted it. Went to bin folder and executed the following commands, but was getting an error.

                 

                C:\temp\jboss-web-3.0.0-beta-2\bin>service.bat install

                Service JBoss Application Server 6.0 installed

                C:\temp\jboss-web-3.0.0-beta-2\bin>net start JBAS60SVC

                The service name is invalid.

                 

                The service.bat has these lines written for setting the service:

                REM

                if "x%SVCNAME" == "x" (

                    set "SVCNAME=JBAS60SVC"

                )

                • 5. Re: BLDeploy job to install Jboss in Windows doesnt get completed
                  Wenchi Liao

                  Sorry, I've never used the jboss-service thing before. The error message seems to be a generic service name error message, though. IE, if you ran "net start random_string_123", you should get the "service name is invalid" message as well. Are you sure that's the name of the created service? Do you see that service listed in the services control panel?

                  • 6. Re: BLDeploy job to install Jboss in Windows doesnt get completed
                    Sayan Roy

                    I figured out a way around to make the Jboss installation work using windows as a service through BSA.

                    I guess that download was having some issue. I used a different download i.e jboss-native-2.0.10-windows-x64-ssl, extracted it. Went to the bin folder and ran the command "service install".

                    It installed the service with the name JBAS50SVC, set the startup of the service as automatic through cmd line and ran the command to start the service. All this in one BLPackage. This way is working perfect. I see the Jboss service listed in the services control panel, set to automatic and running after the job gets executed. Even the Jboss welcome page comes when i type http://localhost:8080.