HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   WARNING: services not running (http://www.howtoforge.com/forums/showthread.php?t=6258)

MicCo 17th August 2006 01:37

WARNING: services not running
 
Hello,

We at MicCo WebDesign are testing an server with ISPConfig at an Debian Sarge release.

We are reciving this warning message every 30 min.:

WARNING: service not running (server: epsilon.eurohost.dk, port: 443)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 81)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 22)!

WARNING: service dns not running (server: epsilon.eurohost.dk, port: 53)!

WARNING: service dns not running (server: epsilon.eurohost.dk, port: 53)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 10000)!

WARNING: service mail not running (server: epsilon.eurohost.dk, port: 143)!

WARNING: service mail not running (server: epsilon.eurohost.dk, port: 993)!

WARNING: service pop3 not running (server: epsilon.eurohost.dk, port: 995)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 3306)!

WARNING: service web not running (server: epsilon.eurohost.dk, port: 953)!

Message generated at August 17, 2006, 0:30.

Any one knows what to do, due to that fact that we can't find any documentation for solving the problem.

:eek:

till 17th August 2006 11:20

Please post the output of:

netstat -tap

what is in your /etc/hosts file?

MicCo 18th August 2006 09:19

WARNING: service not running
 
Hello Till,

This is the result of netstat -tap:

Quote:

epsilon:~# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:mysql *:* LISTEN 16770/mysqld
tcp 0 0 *:81 *:* LISTEN 6592/ispconfig_http
tcp 0 0 *:ftp *:* LISTEN 17265/proftpd: (acc
tcp 0 0 epsilon.eurohost:domain *:* LISTEN 28812/named
tcp 0 0 localhost.locald:domain *:* LISTEN 28812/named
tcp 0 0 *:smtp *:* LISTEN 17347/master
tcp 0 0 localhost.localdoma:953 *:* LISTEN 28812/named
tcp6 0 0 *:imaps *:* LISTEN 8023/couriertcpd
tcp6 0 0 *:pop3s *:* LISTEN 7940/couriertcpd
tcp6 0 0 *:pop3 *:* LISTEN 7884/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 7975/couriertcpd
tcp6 0 0 *:www *:* LISTEN 6960/apache2
tcp6 0 0 *:ssh *:* LISTEN 2278/sshd
tcp6 0 0 *:smtp *:* LISTEN 17347/master
tcp6 0 0 ip6-localhost:953 *:* LISTEN 28812/named
tcp6 0 0 *:https *:* LISTEN 6960/apache2
tcp6 0 0 ::ffff:213.173.250.:www ::ffff:85.235.249.:1847 FIN_WAIT2 -
tcp6 0 52 ::ffff:213.173.250.:ssh 0x57313cbd.banxx4:62122 ESTABLISHED24914/0
tcp6 0 0 ::ffff:213.173.250.:ssh 0x57313cbd.banxx4:62118 ESTABLISHED24897/sshd: root@no
epsilon:~#
And this is the contens of the /etc/hosts file:

Quote:

127.0.0.1 localhost.localdomain localhost
213.173.250.118 epsilon.eurohost.dk epsilon

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Looking forward to Your comment, thank you.

We still recives an warning email every 30 minut. :eek:

narut0b0y 18th August 2006 10:17

is there an installed firewall on your linux box? kindly disable it and use the ispconfig firewall instead.

you can activate the firewall service of ispconfig under management->server->services.

MicCo 18th August 2006 11:46

Quote:

Originally Posted by narut0b0y
is there an installed firewall on your linux box? kindly disable it and use the ispconfig firewall instead.

you can activate the firewall service of ispconfig under management->server->services.

The server are setup via the "The Perfect Setup - Debian Sarge (3.1)", so no other firewall, only the once in ISPConfig are used.

falko 18th August 2006 14:51

What's in /root/ispconfig/scripts/shell/check_services.php?

MicCo 19th August 2006 01:42

Quote:

Originally Posted by falko
What's in /root/ispconfig/scripts/shell/check_services.php?

This is the contents of the file:

Quote:

class check_services {

function warning()
{

$warning = "";

if(!$this->_check_tcp("213.173.250.118",80)) {
$warning .= "WARNING: service web not running (server: epsilon.eurohost.dk, port: 80)!\n\n";

}
if(!$this->_check_ftp("213.173.250.118",21)) {
$warning .= "WARNING: service ftp not running (server: epsilon.eurohost.dk, port: 21)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118",25)) {
$warning .= "WARNING: service mail not running (server: epsilon.eurohost.dk, port: 25)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118",110)) {
$warning .= "WARNING: service pop3 not running (server: epsilon.eurohost.dk, port: 110)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/SSL",443)) {
$warning .= "WARNING: service not running (server: epsilon.eurohost.dk, port: 443)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/ISPConfig",81)) {
$warning .= "WARNING: service not running (server: epsilon.eurohost.dk, port: 81)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/SSH",22)) {
$warning .= "WARNING: service not running (server: epsilon.eurohost.dk, port: 22)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/TCP",53)) {
$warning .= "WARNING: service dns not running (server: epsilon.eurohost.dk, port: 53)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/UDP",53)) {
$warning .= "WARNING: service dns not running (server: epsilon.eurohost.dk, port: 53)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/Webmin",10000)) {
$warning .= "WARNING: service not running (server: epsilon.eurohost.dk, port: 10000)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/IMAP2",143)) {
$warning .= "WARNING: service mail not running (server: epsilon.eurohost.dk, port: 143)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/IMAPS",993)) {
$warning .= "WARNING: service mail not running (server: epsilon.eurohost.dk, port: 993)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/POP3S",995)) {
$warning .= "WARNING: service pop3 not running (server: epsilon.eurohost.dk, port: 995)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/MySQL",3306)) {
$warning .= "WARNING: service not running (server: epsilon.eurohost.dk, port: 3306)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/unknown",953)) {
$warning .= "WARNING: service web not running (server: epsilon.eurohost.dk, port: 953)!\n\n";

}



if($warning != ""){
$warning .= "Message generated at ".date("F j, Y, G:i", time()).".\n";
return $warning;
} else {
return false;
}

}

function _check_tcp ($host,$port) {

$fp = fsockopen ($host, $port, &$errno, &$errstr, 2);

if ($fp) {
fclose($fp);
return true;
} else {
return false;
}
}

function _check_udp ($host,$port) {

$fp = fsockopen ('udp://'.$host, $port, &$errno, &$errstr, 2);

if ($fp) {
fclose($fp);
return true;
} else {
return false;
}
}

function _check_ftp ($host,$port){

$conn_id = @ftp_connect($host, $port);

if($conn_id){
@ftp_close($conn_id);
return true;
} else {
return false;
}
}
}

$cs = new check_services;

if(is_file("/home/admispconfig/ispconfig/adminmail.txt")){
$fp = fopen ("/home/admispconfig/ispconfig/adminmail.txt", "r");
$email = trim(fread($fp, filesize ("/home/admispconfig/ispconfig/adminmail.txt")));
fclose($fp);
$email = str_replace("\r\n", "", $email);
$email = str_replace("\r", "", $email);
$email = str_replace("\n", "", $email);
}
$msg = $cs->warning();
if(!empty($email) && strstr($email, "@") && strlen($email) > 3 && $msg) mail($email, "WARNING: services not running", $msg);

Looking forward to Your comment.

falko 19th August 2006 14:31

Ok, and what's the output of
Code:

ifconfig
?

MicCo 19th August 2006 15:50

Quote:

Originally Posted by falko
Ok, and what's the output of
Code:

ifconfig
?

This is the output:

Quote:

epsilon:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:EC:69:7F:F8
inet addr:213.173.250.118 Bcast:213.173.250.119 Mask:255.255.255.248
inet6 addr: fe80::216:ecff:fe69:7ff8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1640696 errors:0 dropped:0 overruns:0 frame:0
TX packets:1634992 errors:2 dropped:0 overruns:0 carrier:2
collisions:26752 txqueuelen:1000
RX bytes:432182355 (412.1 MiB) TX bytes:398255278 (379.8 MiB)
Interrupt:193 Base address:0xe400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:399232 errors:0 dropped:0 overruns:0 frame:0
TX packets:399232 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24449043 (23.3 MiB) TX bytes:24449043 (23.3 MiB)

epsilon:~#

Looking forward to your comments.

till 20th August 2006 14:56

If you dont use IPv6, please try to comment out the line:

::1 ip6-localhost ip6-loopback

in /etc/hosts

and restart the services mentioned as not running.


All times are GMT +2. The time now is 18:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.