KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Test not work under Win2008, when Hostmon run as service
Goto page 1, 2  Next
 
Post new topic   Reply to topic    KS-Soft Forum Index -> Bug reports
View previous topic :: View next topic  
Author Message
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Sat May 15, 2010 10:58 am    Post subject: Test not work under Win2008, when Hostmon run as service Reply with quote

Hi,
I'm installed the trial version of Hostmon 8.58 for examination.
I've found, that your powerfull prog does not support very simple feature - it unable perform TCP Connection test!!!! I'm only need to know - can I establish TCP connection on some port of the remote host, or not! Your program always wait for reply from remote service, but cannot define the fact, that connection is established. I have been compelled to write the bat file, which use PortQry utility from M$ to determine the port state. That bat file returns an error by setting eviromental variable ERRORLEVEL
Here is the my bat file:
Code:
@echo off
portqry.exe -n host.domain.com -e 1935|find /C "NOT LISTENING"|find "0"|| exit /B 3

After that I'm convert it to exe file and point it for TCP Connection test.
It works perfectly, when I run Hostmon under my account. But when I'm run this test under hostmon, which installed as service it returns "Unknown" state for test result. Is it bug or the feature of your program? Can you provide me with example of code, which can pass error code to Hostmon correctly?
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Sat May 15, 2010 11:07 am    Post subject: Reply with quote

TCP test works fine on any Windows.
What exactly port do you check? Do you use "Send data" option?
Do you have installed some antivirus monitors, personal firewall, content monitoring software? Non stanard winsock components?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Sat May 15, 2010 11:19 am    Post subject: Reply with quote

I'm do not want to use "Send data" option at all! The only what I need - to determine, can I establish connection to the port of the remote host or not?
Lets imagine, that I'm try to monitor HTTPS port - which data I'm must to send to this port, that I can receive the reply from this port? It is difficult to do this for HTTPS!
Look for ServersAlive - it has such option, that called Port Connector (Just connects to port and if it can be done - UP). Why you don't include this kind of test in your program? It very simple and very useful.
Back to top
View user's profile Send private message
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Sat May 15, 2010 12:22 pm    Post subject: Reply with quote

Also I have a troubles with certificates under Win 2008 - I'm try to do HTTPS check of some site, which require user certificate. I'm unable to choose any certificate, which installed on Computer or User certification store - your program shows empty list of certificates!
BTW - I'm run hostmon.exe as administrator
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Sat May 15, 2010 12:44 pm    Post subject: Reply with quote

Quote:
I'm do not want to use "Send data" option at all!

So, what is the problem? If you do not want to use this option, do not use it.
By default this option is not marked.

Quote:
The only what I need - to determine, can I establish connection to the port of the remote host or not?

Again, I do not see any problem. Just specify target host, port and timeout and test is ready.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Sat May 15, 2010 12:47 pm    Post subject: Reply with quote

Quote:
Also I have a troubles with certificates under Win 2008 - I'm try to do HTTPS check of some site, which require user certificate. I'm unable to choose any certificate, which installed on Computer or User certification store - your program shows empty list of certificates!

May be certificate is not marked as client certificate?
There is near by thread with solution http://www.ks-soft.net/cgi-bin/phpBB/viewtopic.php?t=5681

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Sat May 15, 2010 1:12 pm    Post subject: Reply with quote

Quote:

Again, I do not see any problem. Just specify target host, port and timeout and test is ready.

It will be so simple. When I do this, your program shows, that host is alive. But I need, that I'm receive notification by e-mail, when host will be unavialable. And in that case your program waiting for REPLY from port, not connection (I'm unable choose from conditions list anything, that differs from reply - here is "no reply", "any reply" etc..)!!!!
Back to top
View user's profile Send private message
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Sat May 15, 2010 2:04 pm    Post subject: Reply with quote

KS-Soft wrote:

May be certificate is not marked as client certificate?
There is near by thread with solution http://www.ks-soft.net/cgi-bin/phpBB/viewtopic.php?t=5681


Thank you, it works!
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Sat May 15, 2010 3:38 pm    Post subject: Reply with quote

Quote from the manual
===============
Alert when
To check the reply from the server, mark this option and choose one of the conditions to consider result of the test as "Bad":
===============
If you want to check just TCP connection, simply keep this option unmarked. If you keep default test settings ("Alert when" option is disabled), HostMonitor will check TCP connection only.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Sat May 15, 2010 10:46 pm    Post subject: Reply with quote

Wow, it works! Thank you, Alex!!
Btw, but i'm found another bug.
Step to reproduce:
1. Let we try to monitor some HTTPS server, running on non-standard port (8080 for example). This server require user sertificate, that is not marked as client certificate.
I do changes in hostmon.ini - add FilterClientCertificates=0 and UseLocalCertStore=1, import client certificate both to computer and my account certification store. Alert settings - to send my e-mail, when 1 consecutive "Bad" results occur and repeat 3 times. Also send me e-mail, when 1 consecutive "Good" results occur, repeat 1 time.
2. I've installed hostmon as service, running under another user account, that has domain admin rights
3. I'm create bat file, that pointed in manual, that i can interact with GUI of service under Win 2008.
4. Run this file as administrator
5. I see, that monitoring works fine under my account - when I'm disable access to port 8080 I'm receive 3 e-mails about "Bad" status and 1 e-mail about "Good" status
6. Close GUI - after that service run in background
7. Disable access to port 8080
8. I'm receive 1 e-mail about "Bad" status
9. Enable access to port 8080
10. BUG - still receive e-mails about "Bad" status, no e-mail about "Good" status at all
11. No matter, how many e-mails I'm receive about "Bad" status - the program never detects status change when running as service.

P.S. TCP Connection status check works perfectly, when the program run as service!
Back to top
View user's profile Send private message
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Mon May 17, 2010 9:38 am    Post subject: Reply with quote

Apparently I've found the reason, why HTTPS test with client certificate does not work, wheh hostmon running as service. I'm connect to service via rcc as built-in user "Admin" and try to change test settings. When I try see certificates list I'm receive error: Host montor response: Test Error: Access is denied.
I'm try find out, where is Access denied via Process monitor, but no success. I'm suppose, that trouble in your code - it pass authenification wrong way and service does not have access to the certificate at all - no matter, where it published.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Mon May 17, 2010 10:23 am    Post subject: Reply with quote

Quote:
Btw, but i'm found another bug.

Why do you think there is a bug if you even don't know test status? Have you checked what is going on using RCC? if you do not want to use RCC for some reasons, have you checked HostMonitor logs or report files?

Why do you use BAT file to stop service while you can use RCC and check test statuses, modify HostMonitor settings and so on?
RCC will show you what HostMonitor is doing while running as service.
http://www.ks-soft.net/hostmon.eng/rcc/index.htm

BTW Have you provided account with necessary rights using options located on Service page in HostMonitor Options dialog?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Mon May 17, 2010 10:32 am    Post subject: Reply with quote

Quote:
When I try see certificates list I'm receive error: Host montor response: Test Error: Access is denied

Have you provided correct account using options located on Service page in HostMonitor Options dialog?

Quote:
I'm suppose, that trouble in your code - it pass authenification wrong way and service does not have access to the certificate at all - no matter, where it published.

You already reported several bugs for no reason. Looks like you just want to see some bugs in our code

1) Have you provided correct account using options located on Service page in HostMonitor Options dialog?
2) Where is your certificate installed? Is it installed in some user store or it is installed in "computer account" store? In 2nd case you should use UseLocalCertStore option: add UseLocalCertStore=1 line into [Misc] section of hostmon.ini file and restart HostMonitor.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Mon May 17, 2010 11:48 am    Post subject: Reply with quote

As I wroute you previously all settings for test and service are correct.
I'm installed user certificate both in user and computer store, add UseLocalCertStore=1 line into [Misc] section of hostmon.ini, also add FilterClientCertificates=0, because this certificate really not marked as user. I'm run Hostmon as service under Local System account and point account with domain admin rights using options located on Service page in HostMonitor Options dialog. I'm connect to the service using RCC and see, that your code cannot see user cerficate at all. But when I run hostmon not as service, you prog see certificate, located in local computer store and test works perfectly.
http://213.247.232.100/bug.jpg - this is screenshot. In "Use client certificate" listbox initially I see the name of certificate. But when I click on arrow I'm receive error message.

P.S. CPU usage monitoring for remote hosts works perfectly, when hostmon run as service, i.e. account, that I'm pointed in Service page in HostMonitor Options dialog is correct.
Back to top
View user's profile Send private message
PwUser



Joined: 15 May 2010
Posts: 12

PostPosted: Mon May 17, 2010 9:22 pm    Post subject: Reply with quote

The bug is real - I'm try to create new Test, that use client certificate, under service via RCC - I'm immediately receive Access denied message, only when I try to expand listbox with user certificates. Under win2003 the service can see client certificates.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Bug reports All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index