running as a service

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
Guest

Post by Guest »

I seem to be having an issue with HM running as a service. I have set it up on a w2k server with SP2 and created a specific service account. I also set it up as a service. When I access it through Terminal server it starts and runs and I get alerts sent to me through pager and email. This is telling me that the service copy on the server is not running and or alerting. What do I do so that it will run on its own when the server is not logged in?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I am not quite sure I understand the problem. Do you mean HM does not do anything until you login to the system? And it starts send e-mail only after login?
Its strange because if you start HM as a service, it doesn't know anythink about user session and must work independently of user session. May be I understand you wrong?

Regards
Alex
Guest

Post by Guest »

I have the same problems in a similar environment. HM runs just fine when executed from the desktop. But when you exit the desktop application and now need to rely on HM running all tests as a service, no test appears to be running.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Did you check logs? NT Event Log and HostMonitor's log files?
Guest

Post by Guest »

I have the same problems. My action is to send mail when something is going wrong. When I log out the Win 2K server nothing happens, so everything seems right. But when I log in again and start HM then it starts sending e-mails with failed test wich happened earlier.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

>But when I log in again and start HM

Why do you start HM again? Was HM installed as a Win32 service? Or you start HM as regular application? If you start HM as regular application (or if you start HM from Startup group), Windows will unload the program every time you logged off. To install HM as service, use command line parameter "/InstallService". HostMonitor will display message like "service installed" and you will see "Advanced Host Monitor" item in the list of services installed on your system.

Regards
Alex
vicdatacsp
Posts: 3
Joined: Mon Nov 18, 2002 6:00 pm
Contact:

Post by vicdatacsp »

I am experiencing an issue, when HM is running as a service. When running a URL Request, the sites can not be found, but running HM manually, everything works fine.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Do you use some proxy server? Did you specify some user account on Service page in the Options dialog?

Regards
Alex
vicdatacsp
Posts: 3
Joined: Mon Nov 18, 2002 6:00 pm
Contact:

Post by vicdatacsp »

PC - XP pro
On a domain but logged in locally
No system Proxy - HM was set to 127.0.0.1 80
Service - Local System Account (with interact with desktop ticked)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

This test must works under local system account. But may be some peculiarity on XP... Try to specify user account (power user) on Service page in the Options dialog.

Regards
Alex
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

I have HM running under W2K as a service without problem. Before running HM as a service, I have done the following:

1. Created the user account for HM to start as a service (give it the 'logon as a service' and 'act as part of the operating system' privileges).
2. Log on as that same user to create the user profile.
3. Start HM (while running under the above user profile) and make sure it works fine.
4. Install HM with the /InstallService switch
5. Start the service.

HM will run fine, even odbc logging will work correctly (HM uses user dsn, which is not available for the system account). When you want to make modifications to HM, logon as the HM account and stop the SERVICE, start the APPLICATION and make your modifications. After saving, stop the APPLICATION and start the SERVICE. Then you can close your terminal service session and the service will continue to run.

For the last part I created two cmd scripts which will do it automatically for me and which I can start, using a shortcut on my desktop.
vicdatacsp
Posts: 3
Joined: Mon Nov 18, 2002 6:00 pm
Contact:

Post by vicdatacsp »

Thanks !
It now appears to be working.

The only thing is, that when I followed this process, I lost all of the profile settings, even though I had saved all previously. This has happened a few times, and I have to reconfigure each time, that I re-install.
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

If you use the same account for the service and for running the application, you will not loose any changes made by a terminal service session.

Don't forget that if you log on to the console, make changes and then use terminal services to stop the services, all changes will be lost unless you saved them while running on the console!
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Or you can set "When service is being stopped" parameter to "save changes in HML file" mode. This option located on Service page in the Options dialog.
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

Normally, you do not have control over de console. That's why you use TS.

In that case NOT saving changes with the service, gives you full control over the application. So you know you're the one in control. In that case it is even usefull to turn of the system tray icon to prevent console users to start the service interface.
Locked