LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2010, 10:06 PM   #1
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Rep: Reputation: 15
services are down...


despite the fact i have already installed ftp and smtp in windows xp? not only that, i opened the ports 21 and 25 respectively in windows firewall. i'm currently using nagios (installed on ubuntu 9.10) to monitor the status of the services running in other windows server.. how come it's still showed as 'DOWN'? i can ping the ubuntu server from my windows xp server.. by the way i'm using vmware to run those servers..

what am i missing exactly? i'm stumped.

the following screenshot depicts the 'down' status:

http://s408.photobucket.com/albums/p...rrent=down.jpg
 
Old 07-21-2010, 10:53 PM   #2
timsgreen
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Rep: Reputation: 2
Pinging the Ubuntu server is not the same as checking if there is a service running on 21/25.

I recommend you try using telnet to see if either of these ports are open and something is listening:

Code:
#telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
...service is listening.

Code:
#telnet localhost 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
...service is not listening. Please replace 'localhost' with the IP address of your Ubuntu machine, and invoke the telnet command from your DOS prompt.
 
Old 07-21-2010, 11:16 PM   #3
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Original Poster
Rep: Reputation: 15
Hi there,

Code:
#telnet localhost 22...
I got this message: "Connecting To 127.0.0.1... Could not open connection to the host, on port 22: Connect failed"

Code:
#telnet localhost 25...
I got this message: 220 [hostname] Microsoft ESMTp MAIL Service, Version 6.0.2600.2180 ready at Thu, 22 Jul 2010 11:16:09 +800"

Like you mentioned, i replaced the localhost with the ip address of the ubuntu machine which is running the nagios. The ip address is shown above.

Last edited by LayTech; 07-21-2010 at 11:24 PM.
 
Old 07-22-2010, 03:09 AM   #4
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 532

Rep: Reputation: 78
Hi LayTech,

can you post the output of the following command:
Code:
/usr/local/nagios/libexec/check_nt -H IP_of_your_xp -p 12489 -v MEMUSE
Do you have the same issue with all hosts that you monitor?
Can you please post the config file where you configure your services check for your xp machine(the .cfg file)

Angel

Last edited by angel115; 07-22-2010 at 03:11 AM.
 
Old 07-22-2010, 03:26 AM   #5
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Original Poster
Rep: Reputation: 15
Hi Angel,

laytech@ubuntu:~$ /usr/local/nagios/libexec/check_nt -H 172.20.130.71 -p 12489 -v MEMUSE
NSClient - ERROR: Invalid password.

hmm..

in windows.cfg, these are written to check for ftp and smtp:

ftp:
Quote:
define service{
use generic-service

host_name wins xp sp2
service_description FTP
check_command check_ftp
}
smtp:
Quote:
define service{
use generic-service
host_name wins xp sp2
service_description SMTP
check_command check_smtp
}

And by the way, my windows xp server is down.

Quote:
Host Status:
DOWN
(for 0d 4h 8m 57s)
Status Information: (Host Check Timed Out)
Performance Data:
Current Attempt: 1/10 (HARD state)
Last Check Time: 21-07-2010 23:03:28
Check Type: ACTIVE
Check Latency / Duration: 0.016 / 30.004 seconds
Next Scheduled Active Check: 21-07-2010 23:08:58
Last State Change: 21-07-2010 20:21:18
Last Notification: 21-07-2010 22:21:28 (notification 2)
Is This Host Flapping?
NO
(0.00% state change)
In Scheduled Downtime?
NO
Last Update: 21-07-2010 23:08:28 ( 0d 1h 21m 47s ago)

Last edited by LayTech; 07-22-2010 at 03:29 AM.
 
Old 07-22-2010, 04:48 AM   #6
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 532

Rep: Reputation: 78
Ok so, just for testing.

Try to disable the password by commanting your line "password" in your "nsc.ini" file on your windows machine.
Make sure that your nagios host is listed on your "allowed_hosts" line and that the line is not commented.
Then restart the "ns" service.

Then try again that line:
Code:
/usr/local/nagios/libexec/check_nt -H 172.20.130.71 -p 12489 -v MEMUSE
 
Old 07-22-2010, 05:32 AM   #7
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Original Poster
Rep: Reputation: 15
I got 'The system cannot find the path specified.'

I assume that when you say commenting out the line "password" in "nsc.ini" is this right?:

Quote:
;# PASSWORD
; This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly.
;password=secret-password
The "allowed hosts" i left it blank to allow all hosts to connect remotely, should be okay i guess?

Quote:
> ;# ALLOWED HOST ADDRESSES
; This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons.
; If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password).
; The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access
allowed_hosts=
and, there's one part in the commands.cfg for nagios, we have to add in the password in it, together with -s, i separate the two which is > -s password.

Last edited by LayTech; 07-22-2010 at 05:40 AM.
 
Old 07-22-2010, 07:22 AM   #8
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 532

Rep: Reputation: 78
Quote:
I got 'The system cannot find the path specified.'
Can you please post the copy and past of the line you type an the output of it?

Quote:
I assume that when you say commenting out the line "password" in "nsc.ini" is this right?:
Yes

Quote:
The "allowed hosts" i left it blank to allow all hosts to connect remotely, should be okay i guess?
Yes, this is ok (for testing)

Quote:
and, there's one part in the commands.cfg for nagios, we have to add in the password in it, together with -s, i separate the two which is > -s password.
yes, this is correct as well but for testing I would recommand to remove it as well, as for now we just try to make it work , not to make it secure. Once it will be working, then you will re-enable the password and the host restriction one after another so we can narrow down the root cause of the issue.

Do you have the same issue with all hosts that you monitor or just with that one?

Last edited by angel115; 07-22-2010 at 07:26 AM.
 
Old 07-22-2010, 08:55 AM   #9
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by angel115 View Post
Can you please post the copy and past of the line you type an the output of it?


Yes


Yes, this is ok (for testing)


yes, this is correct as well but for testing I would recommand to remove it as well, as for now we just try to make it work , not to make it secure. Once it will be working, then you will re-enable the password and the host restriction one after another so we can narrow down the root cause of the issue.

Do you have the same issue with all hosts that you monitor or just with that one?


Am i missing something here???
the nagios monitor is trying to get to a windows xp host on ports 21 & 25.
Why is NSClient++ even needed??
Should work with standard nagios plugin on the nagios box.
check_tcp, check_smtp, check_ftp.

The first step after setting up a host to monitor is to check that you can reach this host by running the nagios command from the monitoring machine. ie


Code:
./check_ftp -H hostname -p port -w warntime -c criticaltime
 
Old 07-22-2010, 08:58 AM   #10
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
anyway, regardless of all that (and i did look at your screenshot that shows you are monitoring CPU etc etc...meaning you will need NSClient++) the nagios host cannot reach the windows server.
So at the moment it does NOT appear to be the NSC.ini config yet....because you are not even reaching the windows host.
I'd suggest looking at that firewall again...or at least tracing where the hold up is.
 
Old 07-22-2010, 09:19 AM   #11
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Do you have the same issue with all hosts that you monitor or just with that one?
Yeah, there was another server which had the same issue as this.
 
Old 07-22-2010, 09:23 AM   #12
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
./check_ftp -H hostname -p port -w warntime -c criticaltime
Okay, i will try this asap. Will keep you updated.
 
Old 07-22-2010, 09:23 AM   #13
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by LayTech View Post
Yeah, there was another server which had the same issue as this.
can y ou telnet to either of these hosts on the given port from the nagios box?
 
Old 07-22-2010, 09:27 AM   #14
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
anyway, regardless of all that (and i did look at your screenshot that shows you are monitoring CPU etc etc...meaning you will need NSClient++) the nagios host cannot reach the windows server.
So at the moment it does NOT appear to be the NSC.ini config yet....because you are not even reaching the windows host.
I'd suggest looking at that firewall again...or at least tracing where the hold up is.
Hmm. If the firewall is ON, it would be alright i guess? Cause right now i can't even ping the windows xp server from ubuntu. ICMP is related to ping, so is there like any way to open the port for ICMP? But i don't think there's any port for ICMP...
 
Old 07-22-2010, 09:29 AM   #15
LayTech
Member
 
Registered: Jul 2010
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
can y ou telnet to either of these hosts on the given port from the nagios box?
Can't. I mentioned this before in the earlier post
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
services-admin/Services deardron Ubuntu 7 09-22-2006 09:32 PM
Media Services on Linux platform similar to Windows Media Services happyok Linux - Software 3 05-27-2006 05:36 PM
TightVNC Ver terminal Services.. also looking for terminal Services for linux 2782d4 Linux - Security 3 05-20-2004 03:30 AM
Services floyd Linux - Software 1 05-17-2004 10:14 AM
services im1crazyassmofo Linux - General 3 03-29-2003 05:05 PM


All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration