monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTTP]:error "running" link


From: Izquierdo, Raul
Subject: [HTTP]:error "running" link
Date: Fri, 11 Oct 2002 10:19:11 +0200

        Hi, I've patched processor.c file but the problem remains. The
browser shows the following message:
                While trying to retrieve the URL:
<http://10.124.16.32:2812/_runtime> 
                The following error was encountered: 
*       Connection Failed 
                        The system returned: 
                    (111) Conexi?n rehusada
                The remote host or network may be down. Please try the
request again. 
        
        The process is killed and I must restart it.
Raúl.           

--=-=-=

"Izquierdo, Raul" <address@hidden <mailto:address@hidden>>
writes:

>       Hi, I've proved 3.0 version at linux and there is not problem with
> runtime status.
> 
>       It doesn't seems a version problem. I installed monit  2.5 in
> several Sun Solaris 8 Machines (netra T1, T1125) and the process is also
> killed when I click on the runtime link. Could it be posible that it
> happends because it is not compatible  with Solaris 8 version. I've seen
> that the package is on tildeslash web for Solaris 7.

monit should compile and work both on Solaris 7 and 8. Obviously
something has changed for the worse in Solaris version 8.

>       The unique difference with linux installation is that I installed a
> new bison version 1.35 because 1.34 and before needed libiconv and make
> doesn't worked without it.

That's okay and not a factor.

>       I've seen in the /core file the following message at Solaris
> machine:
> 
>        580  A/_runtime
>    581  pe: text/html
>    582  %.0H
>    583  1922
>    584  SunOS
>    585  24999
>    586  tmpfs
>    587  24999
>    588  3898
>    589  ntime HTTP/1.0
>    590  0OeZ
>    591  0K:6
>    592  0IK-
>    593  0Od}
>    594  0I~l
>    595  0Ov#
>    596  0IKw
>    597  0Ovz
>    598  0Iv8
>    599  _signotifywait(): bad return; exiting process

The monit process is killed, alright. After a bit of debugging it
looks like the "fancy" usage of sigsetjmp we use for request timeout
does not work properly with solaris 8. I'm not 100% sure if this is
the reason for the bug but at least I also got a SIGSEGV when I tested
on Solaris 8. Please try the enclosed patch and let us know if it helps!

Install:

Copy the patch to the monit-3.0 source directory and do:
 patch -p1 < http.patch


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=http.patch
Content-Description: http.patch

--- http/processor.c    Fri Sep  6 20:13:37 2002
+++ 3.0/http/processor.c        Mon Oct  7 16:05:29 2002
@@ -73,7 +73,6 @@
 static void destroy_entry(void *);
 static void internal_error(int, int, char *);
 static HttpParameter parse_parameters(char *);
-static int do_timeout(int);
 static void request_timeout(int);
 
 
@@ -122,8 +121,16 @@
   
   RequestWrapper W= wrapper;
 
-  if (do_timeout(W->socket))
-      goto shutdown;
+  set_alarm_handler(request_timeout);
+  alarm(REQUEST_TIMEOUT);
+
+  if(sigsetjmp(timeout, TRUE) ) {
+    
+    internal_error(W->socket, SC_REQUEST_TIMEOUT,
+                  "Time out when handling the Request");
+    goto shutdown;
+    
+  }
     
   do_service(W);
 
@@ -965,30 +972,6 @@
 
 
 /**
- * Activate a timeout alarm clock, set a signal handler to handle the
- * alarm and a jmp_buffer for handling a timeout.
- */
-static int do_timeout(int client) {
-
-  set_alarm_handler(request_timeout);
-  
-  alarm(REQUEST_TIMEOUT);
-  
-  if ( sigsetjmp(timeout, TRUE) ) {
-    
-    internal_error(client, SC_REQUEST_TIMEOUT,
-                  "Time out when handling the Request");
-    
-    return TRUE;
-    
-  }
-  
-  return FALSE;
-  
-}
-
-
-/**
  * Do Basic Authentication if this auth. style is allowed. 
  */
 static int is_authenticated(HttpRequest req, HttpResponse res) {

--=-=-=


-- 
Jan-Henrik Haukeland

--=-=-=--







reply via email to

[Prev in Thread] Current Thread [Next in Thread]