Restart remote service

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
Roozbeh
Posts: 8
Joined: Wed Apr 03, 2002 6:00 pm

Post by Roozbeh »

Hello Alex,
Whatever i do I can not restart a service on remote computer . Hostmonitor is intalled as service using the admin account. And all accounts/password is right. What could be the problem ? No reboot / No service restart / no service start / but check service and cpu test works fine .. Is there anything special in service features ? It's a fresh win2000 that I am doing tests on

KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Could you please check HostMonitor's system log. The program must record information about error (if "Record info about failed actions" option is enabled), it can be useful. Also, what version of HostMonitor do you use?

Regards
Alex
Roozbeh
Posts: 8
Joined: Wed Apr 03, 2002 6:00 pm

Post by Roozbeh »

It's Hostmonitor 3.12b.

Error messages are :

Error: can not connect to service control manager: the RPC server is unavailbe

Error: can not connect to service control manager: Access is denied.

but the RPC service is working. Is there any permission setting for RPC ?

Thanks
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

As I understand this problem appears only when HostMonitor starts as a service?
I think I found what can be reason for the problem. Please try patch http://www.ks-soft.net/download/hm314.zip

Regards
Alex
Roozbeh
Posts: 8
Joined: Wed Apr 03, 2002 6:00 pm

Post by Roozbeh »

YES Alex :smile: It's been solved .. is it the same 3.14 in the website or a patch after that ?

Thanks,
Roozbeh
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

This is patch after 3.14

Regards
Alex
rdol
Posts: 20
Joined: Sun Apr 28, 2002 6:00 pm
Contact:

Post by rdol »

I have met another issue.

Error: Cannot stop sevice "IISADMIN". A stop control has been sent to a service that other running services are dependent on.

Error: Cannot start sevice "IISADMIN". An instance of the service is already running.

Our web site generated Application Popup window and the only way how to re-run our web is iisreset. The same could be done by restarting iisadmin service. Unfortunately it seems it is not supported in HostMonitor if other services need to be restarted too.

Regards

Radek
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, HostMonitor cannot restart services like IISADMIN in one step. However its possible, complicated but possible. There are quote from another topic:
Recover IIS is not so easy. In HostMonitor 1.xx you can specify only 1 service to restart. But to restart IISADMIN you have to stop dependants (MSFTPSVC, W3SVC), this is impossible in HostMonitor 1.xx. HostMonitor 3.xx is more flexible, I think you can create alert profile with actions defined like these:
1) Action "Change test interval", start after 1 consecutive bad result, repeat 1 time. Purpose: Set new short test interval, to stop/start services one by one. New interval can be 1 min (usually 1 min is enough to stop/start service)
2) Action "Stop service", start after 2 consecutive bad results, repeat 1 time. Service: W3SVC
3) Like item #2. Service: MSFTPSVC
4) Action "Restart service", start after 3 consecutive bad results, repeat 1 time. Service: IISADMIN
5) Action "Start service", start after 4 consecutive bad results, repeat 1 time. Service MSFTPSVC.
6) Like item #5. Service W3SVC
7) Action "send e-mail", start after 5 consecutive bad results, repeat 1 time.
Also, create "good" actions:
1) Action "Change test interval", start after 1 consecutive good result, repeat 1 time. Restore original value.

With this complicated alert profile when server goes down, HostMonitor must work in follow sequence:
1) set new interval to 1 min
2) stop W3SVC and MSFTPSVC
3) restart IISADMIN
4) start MSFTPSVC and W2SVC
5) if server still down, send e-mail (to admin), otherwise restore normal test interval.
Regards
Alex
rdol
Posts: 20
Joined: Sun Apr 28, 2002 6:00 pm
Contact:

Post by rdol »

Unfortunately I use NT Event log test when an event appears only once. I think it is impossible to implement your solution.
However I tried iisreset /? and it should be suitable for "Execute external program".
Usage:
iisreset [computername]

/RESTART Stop and then restart all Internet services.
/START Start all Internet services.
/STOP Stop all Internet services.
/REBOOT Reboot the computer.
/REBOOTONERROR Reboot the computer if an error occurs when starting,
stopping, or restarting Internet services.
/NOFORCE Do not forcefully terminate Internet services if
attempting to stop them gracefully fails.
/TIMEOUT:val Specify the timeout value ( in seconds ) to wait for
a successful stop of Internet services. On expiration
of this timeout the computer can be rebooted if
the /REBOOTONERROR parameter is specified.
The default value is 20s for restart, 60s for stop,
and 0s for reboot.
/STATUS Display the status of all Internet services.
/ENABLE Enable restarting of Internet Services
on the local system.
/DISABLE Disable restarting of Internet Services
on the local system.

This should work, of course on Windows 2000 only.

Radek
Locked