Re: monit – can't connect from browser



Am Sat, 29 Nov 2008 15:07:12 -0800 schrieb Vwaju:


https://192.168.2.2:2812
^^^^^^^^^^^
I get the following error message:
- - - - - - - - - - - - - - - - - - - - - - - -
Server Connection Failed
192.168.2.2 uses an invalid security certificate
The certificate is not trusted because it is self-signed.
The certificate is valid only for jupiter.obliqueuniverse.org
(Error code: sec_error_ca_cert_invalid)
- - - - - - - - - - - - - - - - - - - - - - - -

Your CN in the certificate doesn't match with the name in the addressbar
of your browser.
You can force the browser to accept it, you can change the CN in your
certificate or you connect to the valid name (juniper..)


The Windows XP Firewall is disabled. I have configured the Dell
Truemobile Router to forward any traffic directed to port 2812 at
207.237.37.110 to port 2812 on 192.168.2.2. (However, on the LAN side
of my router, I don't think this should make any difference.)

It has nothing to do with the xp firewall.


ps and "monit status" indicates that monit is running, but that
"Connection failed" for apache:

How is your check for apache in monit.conf?


# monit validate

/etc/monit/monitrc:414: Warning: TOTALMEMORY statement does not work
properly on Linux

there is obviously a error mit totalmemory in your config, remove it it.
It seems you use a old monit version, I haven't any trouble with mem
checks.


HTTP error: Server returned status 404

You try to connect to a non existing file, place an index file in the
documentroot directory if you check only for /, otherwise you need to
write alos the filenam in your configfile.

'apache' failed protocol test [HTTP] at INET[www.obliqueuniverse.org:
80].
'apache' trying to restart
'apache' stop: /etc/init.d/apache2
'apache' start: /etc/init.d/apache2

Sure, the webserver works not correct (status 404) monit do the right
thing.


if totalmem > 500 MB for 5 cycles then restart

see above and check your syslog
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 5291 1.6 2.5 23044 9776 ? Ss 21:03 0:00 /usr/

How much memory has your machine? You'are using 2.5% with one process,
ypu should check your apache conf, it depends on the modules you need but
usually I've never seen a parent process it's using more than 10 to 12 MB.

If I kill one of these processes another is spawned, keeping the total
at 6.

apache.conf prefork, works correctly. One child dies the parent process
open it again.


/var/log/syslog shows that monit tries to restart apache2 about every
60 seconds.

If your check intervall is 1 minute, monit works correct.

Thanks for having read all of the above! As always, interested to
hear your thoughts.

Try the following:
Place an index.html in documentroot (apache) or enable Options +Index
in your apache.config.

Check your monitrc file should be similar like that:

check process apache2 with pidfile $PATH_TO_APACHAES_PID
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
if failed host $IP_APACHE_IS_LISTENING port $PORT
protocol http and request "/" then restart

You also could use protocol http and request "/YOURFILE" then restart
YOURFILE has to be in your documentroot.

cheers
.



Relevant Pages

  • Re: [F8] Apache Mod_Security and SubVersion
    ... > have been able to setup Apache, the Mod_Security, SSL and SubVersion ... > and it work via the browser and the svn commands in the shell. ... It appears to show some bogus certificate Issuer ...
    (Fedora)
  • Re: Apache 2.x for Windows running behind ISA 2004 - intermediate certificate not trusted
    ... I assume you are publishing the Apache web site via web publishing in ISA ... If that is the case and you want to use SSL bridging (people connect to ISA ... Install the Apache certificate on the ISA Server machine, ... a simpler way to publish your Apache server is to just use HTTPS ...
    (microsoft.public.isa)
  • Re: ssl + redirect
    ... ErrorDocument 401 http://www.mysite.net ... i would ask you if it's possible to have a redirect to ... an error-disclaimer page if the user has not the certificate ... You can, for an entrance page or a set of them, specify the Apache ...
    (comp.lang.php)
  • Re: Apache 2.2 mod_ldap refusing to work over SSL/TLS (solved)
    ... The current status is that authentication works without problems when ... certificate verification works without any problems. ... I can use SSL and TLS with ldapsearch, there is no reason why it ... shouldn't be working from apache. ...
    (freebsd-questions)
  • Re: Automatic email relay agent?
    ... > The saslauthd restart wasn't necessary. ... > configured for that as well, and has to know about a certificate to use. ... >> When I check the incoming emails, it shows the message about server ... > SSL cache. ...
    (Fedora)