Creating a service for snmpd.exe on windows server + Cygwin












1















I need to create a service for the snmp daemon snmpd.exe which is installed on my windows server 2016.
I use sc create snmpd binPath= "C:/path/to/snmpd.exe" and then I try to start it with sc start snmpd but I get the following error:



The service did not respond to the start or control request in a timely fashion.



How can I create a working service for this binary please ?
I'm using cygwin with my windows server if it helps.



I do not need to make it work in that exact way, any other solutions are welcome, I just need a working service with this binary.



PS: I only have an ssh access to the server



Thank you.










share|improve this question























  • I would suggest download the Windows 2003 resource kit - microsoft.com/en-us/download/details.aspx?id=17657 - to get the tools: Instsrv.exe and Srvany.exe. You can use these to create a service out of what I assume isn't a service. See: support.microsoft.com/en-us/help/137890/… for more info.

    – HelpingHand
    Dec 20 '18 at 16:33


















1















I need to create a service for the snmp daemon snmpd.exe which is installed on my windows server 2016.
I use sc create snmpd binPath= "C:/path/to/snmpd.exe" and then I try to start it with sc start snmpd but I get the following error:



The service did not respond to the start or control request in a timely fashion.



How can I create a working service for this binary please ?
I'm using cygwin with my windows server if it helps.



I do not need to make it work in that exact way, any other solutions are welcome, I just need a working service with this binary.



PS: I only have an ssh access to the server



Thank you.










share|improve this question























  • I would suggest download the Windows 2003 resource kit - microsoft.com/en-us/download/details.aspx?id=17657 - to get the tools: Instsrv.exe and Srvany.exe. You can use these to create a service out of what I assume isn't a service. See: support.microsoft.com/en-us/help/137890/… for more info.

    – HelpingHand
    Dec 20 '18 at 16:33
















1












1








1








I need to create a service for the snmp daemon snmpd.exe which is installed on my windows server 2016.
I use sc create snmpd binPath= "C:/path/to/snmpd.exe" and then I try to start it with sc start snmpd but I get the following error:



The service did not respond to the start or control request in a timely fashion.



How can I create a working service for this binary please ?
I'm using cygwin with my windows server if it helps.



I do not need to make it work in that exact way, any other solutions are welcome, I just need a working service with this binary.



PS: I only have an ssh access to the server



Thank you.










share|improve this question














I need to create a service for the snmp daemon snmpd.exe which is installed on my windows server 2016.
I use sc create snmpd binPath= "C:/path/to/snmpd.exe" and then I try to start it with sc start snmpd but I get the following error:



The service did not respond to the start or control request in a timely fashion.



How can I create a working service for this binary please ?
I'm using cygwin with my windows server if it helps.



I do not need to make it work in that exact way, any other solutions are welcome, I just need a working service with this binary.



PS: I only have an ssh access to the server



Thank you.







windows cygwin snmp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 20 '18 at 11:43









John SmithJohn Smith

61




61













  • I would suggest download the Windows 2003 resource kit - microsoft.com/en-us/download/details.aspx?id=17657 - to get the tools: Instsrv.exe and Srvany.exe. You can use these to create a service out of what I assume isn't a service. See: support.microsoft.com/en-us/help/137890/… for more info.

    – HelpingHand
    Dec 20 '18 at 16:33





















  • I would suggest download the Windows 2003 resource kit - microsoft.com/en-us/download/details.aspx?id=17657 - to get the tools: Instsrv.exe and Srvany.exe. You can use these to create a service out of what I assume isn't a service. See: support.microsoft.com/en-us/help/137890/… for more info.

    – HelpingHand
    Dec 20 '18 at 16:33



















I would suggest download the Windows 2003 resource kit - microsoft.com/en-us/download/details.aspx?id=17657 - to get the tools: Instsrv.exe and Srvany.exe. You can use these to create a service out of what I assume isn't a service. See: support.microsoft.com/en-us/help/137890/… for more info.

– HelpingHand
Dec 20 '18 at 16:33







I would suggest download the Windows 2003 resource kit - microsoft.com/en-us/download/details.aspx?id=17657 - to get the tools: Instsrv.exe and Srvany.exe. You can use these to create a service out of what I assume isn't a service. See: support.microsoft.com/en-us/help/137890/… for more info.

– HelpingHand
Dec 20 '18 at 16:33












1 Answer
1






active

oldest

votes


















0














The proper way to install a Cygwin program as service is to use the cygserver
utility.



$ cygrunsrv --help
Usage: cygrunsrv [OPTION]...

Main options: Exactly one is required.

-I, --install <svc_name> Installes a new service named <svc_name>.
-R, --remove <svc_name> Removes a service named <svc_name>.
-S, --start <svc_name> Starts a service named <svc_name>.
-E, --stop <svc_name> Stops a service named <svc_name>.
-Q, --query <svc_name> Queries a service named <svc_name>.
-L, --list [server] Lists services that have been installed
with cygrunsrv.
<svc_name> can be a local service or "server/svc_name" or "serversvc_name".
....


Any other way will fail to proper execute the program.
See for example:
https://stackoverflow.com/questions/52704903/running-cygwin-application-as-a-windows-service?rq=1






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386246%2fcreating-a-service-for-snmpd-exe-on-windows-server-cygwin%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The proper way to install a Cygwin program as service is to use the cygserver
    utility.



    $ cygrunsrv --help
    Usage: cygrunsrv [OPTION]...

    Main options: Exactly one is required.

    -I, --install <svc_name> Installes a new service named <svc_name>.
    -R, --remove <svc_name> Removes a service named <svc_name>.
    -S, --start <svc_name> Starts a service named <svc_name>.
    -E, --stop <svc_name> Stops a service named <svc_name>.
    -Q, --query <svc_name> Queries a service named <svc_name>.
    -L, --list [server] Lists services that have been installed
    with cygrunsrv.
    <svc_name> can be a local service or "server/svc_name" or "serversvc_name".
    ....


    Any other way will fail to proper execute the program.
    See for example:
    https://stackoverflow.com/questions/52704903/running-cygwin-application-as-a-windows-service?rq=1






    share|improve this answer




























      0














      The proper way to install a Cygwin program as service is to use the cygserver
      utility.



      $ cygrunsrv --help
      Usage: cygrunsrv [OPTION]...

      Main options: Exactly one is required.

      -I, --install <svc_name> Installes a new service named <svc_name>.
      -R, --remove <svc_name> Removes a service named <svc_name>.
      -S, --start <svc_name> Starts a service named <svc_name>.
      -E, --stop <svc_name> Stops a service named <svc_name>.
      -Q, --query <svc_name> Queries a service named <svc_name>.
      -L, --list [server] Lists services that have been installed
      with cygrunsrv.
      <svc_name> can be a local service or "server/svc_name" or "serversvc_name".
      ....


      Any other way will fail to proper execute the program.
      See for example:
      https://stackoverflow.com/questions/52704903/running-cygwin-application-as-a-windows-service?rq=1






      share|improve this answer


























        0












        0








        0







        The proper way to install a Cygwin program as service is to use the cygserver
        utility.



        $ cygrunsrv --help
        Usage: cygrunsrv [OPTION]...

        Main options: Exactly one is required.

        -I, --install <svc_name> Installes a new service named <svc_name>.
        -R, --remove <svc_name> Removes a service named <svc_name>.
        -S, --start <svc_name> Starts a service named <svc_name>.
        -E, --stop <svc_name> Stops a service named <svc_name>.
        -Q, --query <svc_name> Queries a service named <svc_name>.
        -L, --list [server] Lists services that have been installed
        with cygrunsrv.
        <svc_name> can be a local service or "server/svc_name" or "serversvc_name".
        ....


        Any other way will fail to proper execute the program.
        See for example:
        https://stackoverflow.com/questions/52704903/running-cygwin-application-as-a-windows-service?rq=1






        share|improve this answer













        The proper way to install a Cygwin program as service is to use the cygserver
        utility.



        $ cygrunsrv --help
        Usage: cygrunsrv [OPTION]...

        Main options: Exactly one is required.

        -I, --install <svc_name> Installes a new service named <svc_name>.
        -R, --remove <svc_name> Removes a service named <svc_name>.
        -S, --start <svc_name> Starts a service named <svc_name>.
        -E, --stop <svc_name> Stops a service named <svc_name>.
        -Q, --query <svc_name> Queries a service named <svc_name>.
        -L, --list [server] Lists services that have been installed
        with cygrunsrv.
        <svc_name> can be a local service or "server/svc_name" or "serversvc_name".
        ....


        Any other way will fail to proper execute the program.
        See for example:
        https://stackoverflow.com/questions/52704903/running-cygwin-application-as-a-windows-service?rq=1







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 20 '18 at 18:19









        matzerimatzeri

        1,269156




        1,269156






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386246%2fcreating-a-service-for-snmpd-exe-on-windows-server-cygwin%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            If I really need a card on my start hand, how many mulligans make sense? [duplicate]

            Alcedinidae

            Can an atomic nucleus contain both particles and antiparticles? [duplicate]