Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5473

net.exe start reports error starting service, even though the service starts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 3.4.3
    • Fix Version/s: None
    • Labels:
    • Environment:

      Windows Server 2008

    • Template:

      Description

      I have a Java application that uses the Apache Daemon service installer to register it as a Windows service. I am using Puppet to run an exec{} block to register the service, which works, and then chains a service{} block to start the service. Puppet uses "net.exe start" to run the service, but that command reports an error, even though the service starts correctly.

      The output from running the command in a powershell shell is:

      PS C:\ProgramData\PuppetLabs\puppet\etc\modules> net start myservice
      The myservice_descriptive_name service is starting.....
      The myservice_descriptive_name service could not be started.

      More help is available by typing NET HELPMSG 3523.

      As I refresh the Windows service panel while this command is running, I see the state change from:

      blank field -> starting -> started

      I suggest the appropriate service manager for Windows is sc.exe, not net.exe, which does not suffer the same problem. Running sc.exe start <service> the return code is 0

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rcoe67 Robin Coe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support