Menu

openwfe 1.7.1 as a Windows Service

2006-08-24
2013-04-25
  • Brian Pieslak

    Brian Pieslak - 2006-08-24

    Hi,
      I was previously running 1.6.1pre5 on Windows 2000 Server as a windows service using the Java Service Wrapper (http://sourceforge.net/projects/wrapper).
      I have now upgraded to 1.7.1, and I'm having difficultly running 1.7.1 as a Windows Service.

      A colleague of mine found that if the file path is too long, then openwfe won't even start from the batch file, so I am currently running 1.7.1 from "C:\wf\"

      When I install the Windows Services using the Java Service Wrapper, openwfe will start, but I am seeing "LibraryNotFound" Exceptions in the webclient when I try to do anything.  I *do not* get these errors when I run openwfe from the batch file.

      Perhaps this is a better question to post on the Java Service Wrapper forums  (and I'll go ahead and do that now).  
      I was curious if anyone else was running 1.7.1 on Windows as a Windows Service, and if they would be willing to share how they have it installed & configured.

      If I can find a consistently stable method of deploying openwfe as a Windows Service, I'm definitely willing to write up some content on it to be included in the help documentation.  (or if someone else already has it, will they submit it to be included as part of the help docs?)

    Thanks!
    Brian
     

     
    • John Mettraux

      John Mettraux - 2006-08-24

      Hi Brian,

      indeed, win2000 is giving some troubles to 1.7.1 at startup.

      http://sourceforge.net/forum/forum.php?thread_id=1537954&forum_id=181920

      Feel free to send me per email the engine.log produced by one of those 'false starts', maybe there's something there that will help me fix that.

      Thanks in advance for any contribution, cheers,

      John

       
    • Jarod

      Jarod - 2006-08-24

      I've had good luck running 1.7.1 as a Windows Service under both XP and Win2k3 using a binary included with Sun AppServer.  Here is an excerpt of a document I created for some co-workers:

      =======================================
      Running OpenWFE as a Windows Service:

          -  NOTE:  This method of creating a Windows Service applies only to Windows XP and 2003

      -    You will need to edit two files first … both will require the same change.  In $owfe/bin/owfe-suite-withdb.bat and $owfe/bin/owfe-suite-stop.bat add the following immediately before the line that begins with “call”:  “cd \openwfe-1.7.1\bin”.  Obviously you’ll need to remove the quotes and edit the path if you installed to a location other than [drive]:\openwfe-1.7.1\bin  Also, if you installed to a drive other than C: (e.g. D: drive) add an additional “D:” on the line prior to the line you just added to change to the proper drive.

      -    Run the following command from a command prompt (edit as needed) to create the service:  C:\WINDOWS\system32\sc.exe create OpenWFE binPath= "C:\openwfe-1.7.1\bin\appservService.exe \"C:\openwfe-1.7.1\bin\owfe-suite-withdb.bat\" \"C:\openwfe-1.7.1\bin\owfe-suite-stop.bat\"" start= auto DisplayName= "OpenWFE"

      The only file you need from the Sun AppServer install is appservService.exe.  I'm not sure if this would be an acceptable solution for you, but I wanted to offer my version of a solution anyway.  :)

      - Jarod

       
    • Brian Pieslak

      Brian Pieslak - 2006-08-24

      Thanks for the posting Jarod.

      I'm thinking we'll probably have licensing issues w/ appservService.exe, since we redistribute our product.

      Here's what I got from the Java Service Wrapper lists:

      start quote ===============================

      Brian,
      The problem is that when you are running with the batch file, a specific library path is most likely not being defined. In such cases, Java defaults to using the value of the PATH environment variable for the library path.

      In the case of the Wrapper, a library path is usually specified to help the wrapper's java component locate the wrapper.dll.

      You can solve this is one of two ways.

      1) The best way is to locate the dlls that are required and make sure that they are located on the library path by adding appropriate entries:
      http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-n.html

      2) It is also possible to tell to the wrapper to add the full PATH to the library path. This will give you back the default behavior.
      http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-append-system-path.html

      I suggest using 1) as this will work cleanly on all systems. 2) has the problem that you may accidentally find the incorrect dll if other applications are also adding dlls or modifying the PATH.

      Cheers,
      Leif
      end quote =================================

      I will work with Leif's response tonight and will let you know if that works.

      Brian

       
    • Jarod

      Jarod - 2006-08-24

      Hi Brian,

      Regarding Sun AppServer licensing, as I understand the agreement you can use the software (all or part) commercially for internal use, but may not redistrubute the software to customers.  However, the customer could download and install the software themselves, and of course, have the same rights to use that you do.  So yeah, for a redistributable app my suggestion probably isn't the best solution, but for other applications it remains an option.  Thanks for pointing that out and for your research into the Java Service Wrapper ... keep us posted!

      - Jarod

       
    • Brian Pieslak

      Brian Pieslak - 2006-08-25

      Hey Jarod.

      After re-reading your previous post, I noticed that your filePath is C:\openwfe-1.7.1\....

      A colleague and I ran into issues running "owfe-suite.bat" from C:\openwfe-1.7.1\bin

      But if we renamed the folder to C:\wf\bin, the "owfe-suite.bat" runs with no problems.

      Are you able to run 1.7.1 from C:\openwfe-1.7.1\ without any problems? 
      If so, did you have to modify any of the files?

      Thanks,
      Brian

       
      • Brian Pieslak

        Brian Pieslak - 2006-08-25

        apologies for my rushed posting - I just noticed that you identify the operating system(s) in your posting as winXP and win2k3.

         
    • Brian Pieslak

      Brian Pieslak - 2006-09-11

      Sorry for the late response to this.  I got busy with another project and hadn't had a chance to look at this for a little while.

      After reviewing the documentation for the Java Service Wrapper, I believe that we have found a solution.

      I am continuing to go through system testing with this configuration change.

      Inside of %OWFE_HOME%\wrapper\etc\wrapper.conf, the first section concatenates the wrapper.java.classpath elements.

      Add the following:
      wrapper.java.classpath.5=jars/restricted/*.jar

      If you have the Java Service Wrapper installed for OpenWFE, you will need to uninstall it and re-install it.

      John - I will continue to system test this and I will let you know if I run into any issues. 

      Brian

       

Log in to post a comment.