Topic
3 replies Latest Post - ‏2014-01-29T17:49:46Z by MyScreen2
MyScreen2
MyScreen2
41 Posts
ACCEPTED ANSWER

Pinned topic Liberty Profile Windows Service Apache Commons Daemon

‏2014-01-13T17:58:55Z |

I have been trying to figure out how to create a Windows Service for WLP using Apache Commons Daemon but am having issues.  Here is the command I am using to create the service, but when I try to start it I get an error (the dreaded Access is Denied, even though I run this command as the local admin):

 

ZZZRunService //IS --DisplayName="ZZZ Application Server" --Description="ZZZ Application Server" --Startup=auto --StartMode=exe --StartImage=C:\Windows\system32\cmd.exe --StartPath="c:\wlp\bin" --StartParams=start;server1;--clean

 

I know this command is not complete but if I can't get this basic part done then no sense doing the rest.  Has anyone done this before?

  • hockic
    hockic
    1 Post
    ACCEPTED ANSWER

    Re: Liberty Profile Windows Service Apache Commons Daemon

    ‏2014-01-14T11:25:12Z  in response to MyScreen2

    Running Websphere Liberty as a windows service:

    1.  Download commons daemon  ( commons-daemon-x.x.xx-bin-windows.zip
    http://www.apache.org/dist/commons/daemon/binaries/windows/

    2.   Unzip commons-daemon-x.x.xx-bin-windows.zip  and   copy prunsrv.exe to <WLP_INSTALL_DIR>\bin  

    3.   cd <WLP_INSTALL_DIR>\bin 

    4.     prunsrv //IS//WLP --Startup=manual --DisplayName="IBM Liberty Server - wlpserver1" --Description="IBM WebSphere Liberty Profile" ++DependsOn=Tcpip --LogPath=C:\IBM\wlp\usr\servers\wlpserver1\logs --StdOutput=auto --StdError=auto --StartMode=exe --StartPath=C:\IBM\wlp --StartImage=C:\IBM\wlp\bin\server.bat --StartParams=start#wlpserver1 --StopMode=exe --StopPath=C:\IBM\wlp --StopImage=C:\IBM\wlp\bin\server.bat --StopParams=stop#wlpserver1

    In red what need to be changed for yours installation.

    • MyScreen2
      MyScreen2
      41 Posts
      ACCEPTED ANSWER

      Re: Liberty Profile Windows Service Apache Commons Daemon

      ‏2014-01-14T11:53:04Z  in response to hockic

      Thanks so much for this and filling out the rest of it!  I made a few minor changes to the command and I get the service but it still will not start.  It does have a different error though - maybe I am overlooking something.  The command I used is:

       

      prunsrv //IS//WLP --Startup=manual --DisplayName="IBM Liberty Server - server1" --Description="IBM WebSphere Liberty Profile" ++DependsOn=Tcpip --LogPath=C:\wlp\usr\servers\server1\logs --StdOutput=auto --StdError=auto --StartMode=exe --StartPath=C:\wlp --StartImage=C:\wlp\bin\server.bat --StartParams=start#server1 --StopMode=exe --StopPath=C:\wlp --StopImage=C:\wlp\bin\server.bat --StopParams=stop#server1

       

      The error in the Event Viewer is:

       

      The IBM Liberty Server - server1 service terminated with service-specific error The device does not recognize the command..

       

      Have you seen that before?

      • MyScreen2
        MyScreen2
        41 Posts
        ACCEPTED ANSWER

        Re: Liberty Profile Windows Service Apache Commons Daemon

        ‏2014-01-29T17:49:46Z  in response to MyScreen2

        By chance, does anyone see what I am doing wrong?