dgbillotte has asked for the wisdom of the Perl Monks concerning the following question:

Dear Enlightened Ones!

I've written a very simple network server that I'm trying to get to run on a Windows 2003 Server machine. I have a decade of experience doing such things on *nix machines, but working on a Windows box on such stuff is new territory for me.

The server runs fine when I run it on the cmd line, but doesn't really appear to do anything at all when I run it as a service. The Event Viewer shows that it has "entered the running state" and I don't see any errors.

I've read many postings about doing this, on this site and many others. I have followed all of the directions for using the srvany.exe utility, but to no avail. I'm considering trying out Win32::Daemon or FireDaemon at this point, but it really bothers me that I can't make this work when all of the things that I read indicate that it should. Thanks! - Daniel

  • Comment on Perl network server as a service on Windows 2003 Server

Replies are listed 'Best First'.
Re: Perl network server as a service on Windows 2003 Server
by NetWallah (Canon) on Mar 11, 2008 at 01:52 UTC
    I have used svrany for years to run perl programs (mostly mrtg data collectors) for over 5 years.

    It works fine , once you get past the learning curve, and poor documentation.

    I would suggest your program write to a log (Eventlog, or flat file), so you can see what state it is in.

    Feel free to /msg me to discuss.

         "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

      I was using EventLog initially and added some logging to flat-file just to be redundant and don't get any output to either of those sources when I run it as a process.

      I started this proj a while ago and am just getting back to it and I'm wondering if I perhaps missed a step in the installation of srvany. I'm going to do that over again and see if it helps. Thanks for your feedback.

      - daniel

        When I was creating SRVANY based services frequently, I wrote the code below. Even if it is not directly usable, the registry entry documentation in this should help you.
        I hereby place this in the public domain.

             "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom