Trouble with EXTERNAL - Check Method

[Deleted User][Deleted User]
Good Morning / Evening / Afernoon all,



I'm currently trying to get ServersCheck to work with an "External" Check Method.



I've written an exe-file, wich tests a file. The Program gives out "OK" (only this!) to the Console Window if the test succeedes.



I've setted up Servers Check Expecting Value field to OK. (So that ServersCheck will recognize the OK in the Console Window).



But the Test always returns me "OK not returned by external check"



I already read the Wiki page, but there I cant find any solution.



Greetings from Germany



Stefan

Comments

  • AdministratorAdministrator
    Run the web server as per knowledge base in debug mode (http://kb.serverscheck.com) and then click on TEST SETTINGS



    What do you get in the debug output? (only copy the lines related to the check being performed)
  • [Deleted User][Deleted User]
    Ok... now its getting strange. I started the s-server.exe in Debug mode as described in the Knowledge Base. As long the Program is running in debug mode, everything works fine! I get a passed result by klicking on TEST SETTINGS.



    Now I closed the s-servers.exe and restarted ServersCheck.



    Now, I got the same error as before (OK not returned by external check"



    Here are the lines in the debug file regarding the test.



    # test Thu Dec 10 17:47:39 2009 Starting Monitoring Rule Thread test

    # Running in test mode

    # test Thu Dec 10 17:47:39 2009 TEST - Starting check

    result: OK

    # test Thu Dec 10 17:47:40 2009 TEST - OK - -

    # Thu Dec 10 17:47:44 2009 Serving Wizard 4_1 - 0





    Edit: I've tried it again...



    It seemes that the s-server.exe Console Window (without Debug) has to be visible to use the external function. When its running as a service (and no window is visible) it runs into an error.
  • AdministratorAdministrator
    The reason behind this is simple and is probably related to your app.



    When running as a service, an application doesn't run in the context of a user. For example, this means that it doesn't run from a directory. Typically coders forget to specify the directory causing the app they wrote (or batch file) not work properly.



    You can do the same in debug mode but then with the option for the service set to allow to interact with desktop and then do the TEST SETTINGS
This discussion has been closed.