That's fine ... that's what's expected.

You misunderstand the correlation - I'm attempting to eat file descriptors
(of which there is one set per process).  The problem wasn't eating 3 or 6,
it was that the underlying files had the same names.

-----Burton

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
Of Kouprie, Robbert
Sent: Tuesday, September 16, 2003 3:13 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [Ntop-dev] FILEDESCRIPTOR workaround buggy?


Hi,

Tested the patch. There are no "permission denied" errors anymore, but now
the three temp files are only created (and deleted) for the regular socket,
and not for the SSL socket:

Sep 16 10:09:57 x222168 ntop[2349]:   WEB: Initializing web server
Sep 16 10:09:57 x222168 ntop[2349]:   WEB: Initializing tcp/ip socket
connections for web server
Sep 16 10:09:57 x222168 ntop[2349]:   Initializing socket, port 3000,
address (any)
Sep 16 10:09:57 x222168 ntop[2349]:   FILEDESCRIPTORBUG: Work-around
activated
Sep 16 10:09:57 x222168 ntop[2349]:   FILEDESCRIPTORBUG: Creating 0,
'/tmp/ntop-000002349-0'
Sep 16 10:09:57 x222168 ntop[2349]:   FILEDESCRIPTORBUG: Created file 0 -
'/tmp/ntop-000002349-0'(11)
Sep 16 10:09:57 x222168 ntop[2349]:   FILEDESCRIPTORBUG: Creating 1,
'/tmp/ntop-000002349-1'
Sep 16 10:09:57 x222168 ntop[2349]:   FILEDESCRIPTORBUG: Created file 1 -
'/tmp/ntop-000002349-1'(12)
Sep 16 10:09:57 x222168 ntop[2349]:   FILEDESCRIPTORBUG: Creating 2,
'/tmp/ntop-000002349-2'
Sep 16 10:09:57 x222168 ntop[2349]:   FILEDESCRIPTORBUG: Created file 2 -
'/tmp/ntop-000002349-2'(13)
Sep 16 10:09:57 x222168 ntop[2349]:   WEB: Created a new socket (14)
Sep 16 10:09:57 x222168 ntop[2349]:   Initialized socket, port 3000, address
(any)
Sep 16 10:09:57 x222168 ntop[2349]:   WEB: Waiting for HTTP connections on
port 3000
Sep 16 10:09:57 x222168 ntop[2349]:   Initializing ssl socket, port 3001,
address (any)
Sep 16 10:09:57 x222168 ntop[2349]:   WEB: Created a new ssl socket (15)
Sep 16 10:09:57 x222168 ntop[2349]:   Initialized ssl socket, port 3001,
address (any)
Sep 16 10:09:57 x222168 ntop[2349]:   WEB: Waiting for HTTPS (SSL)
connections on port 3001
Sep 16 10:09:57 x222168 ntop[2349]:   WEB: Starting web server

Is that how it should work?

-- Robbert

> -----Oorspronkelijk bericht-----
> Van: Burton M. Strauss III [mailto:[EMAIL PROTECTED]
> Verzonden: maandag 15 september 2003 21:27
> Aan: [EMAIL PROTECTED]
> Onderwerp: RE: [Ntop-dev] FILEDESCRIPTOR workaround buggy?
>
>
> Yeah - when I moved the boundary for the delete to the
> shutdown for the web
> server, I forgot to only create them once.
>
> Try this:
>
> --- ntop/webInterface.c 2003-09-10 18:25:08.000000000 -0500
> +++ ntop/webInterface.c 2003-09-15 14:18:58.000000000 -0500
> @@ -65,6 +65,10 @@
>
>  #endif /* CFG_NEED_INET_ATON */
>
> +#ifdef HAVE_FILEDESCRIPTORBUG
> +static int tempFilesCreated=0;
> +#endif
> +
>  /* ************************************* */
>
>  #if !defined(WIN32) && defined(PARM_USE_CGI)
> @@ -4677,7 +4681,8 @@
>     *   - burn some file descriptors so the socket() call
> doesn't get a
> dirty one.
>     *   - it's not pretty, but it works...
>     */
> -
> +  if(tempFilesCreated == 0) {
> +    tempFilesCreated = 1;
>      myGlobals.tempFpid=getpid();
>      traceEvent(CONST_TRACE_INFO, "FILEDESCRIPTORBUG: Work-around
> activated");
>      for(i=0; i<CONST_FILEDESCRIPTORBUG_COUNT; i++) {
> @@ -4699,6 +4704,7 @@
>                     i, myGlobals.tempFname[i], myGlobals.tempF[i]);
>        }
>      }
> +  }
>  #endif /* FILEDESCRIPTORBUG */
>
>      errno = 0;
> --------------------------------------------------------------
> -----------
> (watch out for line wrap)
>
> -----Burton
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf
> Of Kouprie, Robbert
> Sent: Monday, September 15, 2003 8:20 AM
> To: '[EMAIL PROTECTED]'
> Subject: [Ntop-dev] FILEDESCRIPTOR workaround buggy?
>
>
> Hi,
>
> This is today's CVS (few minutes ago) on a RedHat 9 system
> (kernel 2.4.20).
> Last CVS checkout one I tried before was two weeks ago, on a
> Debian system,
> and the filedescriptor bug workaround didnt exist back then, so no old
> version for reference I'm afraid.
>
> Anyway, if I enable http and https simultaneously, the
> filedescriptor bug
> workaround seems to try to create an already existant file
> when setting up
> the ssl socket. This produces some errors.
>
> Regards,
> -- Robbert
>
> Sep 15 15:01:17 x222168 ntop[3370]:   WEB: Initializing tcp/ip socket
> connections for web server
> Sep 15 15:01:17 x222168 ntop[3370]:   Initializing socket, port 3000,
> address (any)
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Work-around
> activated
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Creating 0,
> '/tmp/ntop-000003370-0'
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG:
> Created file 0 -
> '/tmp/ntop-000003370-0'(11)
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Creating 1,
> '/tmp/ntop-000003370-1'
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG:
> Created file 1 -
> '/tmp/ntop-000003370-1'(12)
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Creating 2,
> '/tmp/ntop-000003370-2'
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG:
> Created file 2 -
> '/tmp/ntop-000003370-2'(13)
> Sep 15 15:01:17 x222168 ntop[3370]:   WEB: Created a new socket (14)
> Sep 15 15:01:17 x222168 ntop[3370]:   Initialized socket,
> port 3000, address
> (any)
> Sep 15 15:01:17 x222168 ntop[3370]:   WEB: Waiting for HTTP
> connections on
> port 3000
> Sep 15 15:01:17 x222168 ntop[3370]:   Initializing ssl
> socket, port 3001,
> address (any)
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Work-around
> activated
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Creating 0,
> '/tmp/ntop-000003370-0'
> Sep 15 15:01:17 x222168 ntop[3370]:   **ERROR**
> FILEDESCRIPTORBUG: Unable to
> create file - may cause problems later - 'Permission denied'(13)
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Creating 1,
> '/tmp/ntop-000003370-1'
> Sep 15 15:01:17 x222168 ntop[3370]:   **ERROR**
> FILEDESCRIPTORBUG: Unable to
> create file - may cause problems later - 'Permission denied'(13)
> Sep 15 15:01:17 x222168 ntop[3370]:   FILEDESCRIPTORBUG: Creating 2,
> '/tmp/ntop-000003370-2'
> Sep 15 15:01:17 x222168 ntop[3370]:   **ERROR**
> FILEDESCRIPTORBUG: Unable to
> create file - may cause problems later - 'Permission denied'(13)
> Sep 15 15:01:17 x222168 ntop[3370]:   WEB: Created a new ssl
> socket (15)
> Sep 15 15:01:17 x222168 ntop[3370]:   Initialized ssl socket,
> port 3001,
> address (any)
> Sep 15 15:01:17 x222168 ntop[3370]:   WEB: Waiting for HTTPS (SSL)
> connections on port 3001
> Sep 15 15:01:17 x222168 ntop[3370]:   WEB: Starting web server
>
> _______________________________________________
> Ntop-dev mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
>
> _______________________________________________
> Ntop-dev mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
>

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to