Right - the patch I sent you gets past the failure to start the web server.
That's all.

You can speed up the '10 minutes' (no joke - it takes even longer on a VPC),
by cutting the timeout from 5s to 1s in ntop.c (in packetCaptureLoop()
around line 750):

#ifdef __FreeBSD__
    timeout.tv_sec  = 1 /* seconds */;
    timeout.tv_usec = 0;
#else
    timeout.tv_sec  = 5 /* seconds */;
    timeout.tv_usec = 0;
#endif

The only solution I've found is to put back some form of the
--set-pcap-nonblock code from 3.0 that got ripped out. 

-----Burton


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Stanley Hopcroft
Sent: Friday, December 17, 2004 5:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [Ntop] Re: 3.1 web server fails to respond on FBSD
Was:NtopCVSfails to compile on FreeBSD 4

Dear Sir,

I am writing to thank you for your letter and say,

On Fri, Dec 17, 2004 at 06:06:06AM -0600, Burton Strauss wrote:
> Socket zero is a different problem, one that appears to mask the other.
> Specifically, 0 is legal as a socket descriptor, but doesn't appear to 
> be used except under Fbsd.  The code tests <=0...
> 
> Use this patch:
>

patch applied; gmake clean; gmake; gmake install.

No apparent freeze/hang relief.

pc09011# telnet a.b.c.d 3000
Trying a.b.c.d...
Escape character is '^]'.
GET /

^]
telnet> q
Connection closed.


Dec 18 09:34:02 pc09011 ntop[56632]:   GDVERCHK: ... as 1.8.4
Dec 18 09:34:02 pc09011 ntop[56632]:   Initializing external 
applications
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Started thread 
(140574720) for network packet analyser
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Started thread 
(140576768) for fingerprinting
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Started thread 
(140577792) for idle hosts detection
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Started thread 
(140578816) for DNS address resolution
Dec 18 09:34:02 pc09011 ntop[56632]:   Calling plugin start functions 
(if any)
Dec 18 09:34:02 pc09011 ntop[56632]:   SSL is present but https is 
disabled: use -W <https port> for enabling it
Dec 18 09:34:02 pc09011 ntop[56632]:   INITWEB: Initializing web server
Dec 18 09:34:02 pc09011 ntop[56632]:   INITWEB: Initializing tcp/ip 
socket connections for web server
Dec 18 09:34:02 pc09011 ntop[56632]:   INITWEB: Converted address 
'10.0.3.110' - binding to the specific interface
Dec 18 09:34:02 pc09011 ntop[56632]:   INITWEB: Initialized socket, port 
3000, address a.b.c.d
Dec 18 09:34:02 pc09011 ntop[56632]:   INITWEB: Waiting for HTTP 
connections on a.b.c.d port 3000
Dec 18 09:34:02 pc09011 ntop[56632]:   INITWEB: Starting web server
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Started thread 
(140579840) for web server
Dec 18 09:34:02 pc09011 ntop[56632]:   Listening on [fxp0]
Dec 18 09:34:02 pc09011 ntop[56632]:   Loading Plugins
Dec 18 09:34:02 pc09011 ntop[56632]:   Searching for plugins in 
/usr/local/ntop-3.1/lib/ntop/plugins
Dec 18 09:34:02 pc09011 ntop[56632]:   ICMP: Welcome to icmpWatchPlugin. 
(C) 1999-2004 by Luca Deri
Dec 18 09:34:02 pc09011 ntop[56632]:   LASTSEEN: Welcome to 
LastSeenWatchPlugin. (C) 1999 by Andrea Marangoni
Dec 18 09:34:02 pc09011 ntop[56632]:   NETFLOW: Welcome to NetFlow.(C) 
2002-04 by Luca Deri
Dec 18 09:34:02 pc09011 ntop[56632]:   PDA: Welcome to PDAPlugin. (C) 
2001-2004 by L.Deri and W.Brock
Dec 18 09:34:02 pc09011 ntop[56632]:   **WARNING** Unable to load plugin 
'/usr/local/ntop-3.1/lib/ntop/plugins/rrdPlugin.so'
Dec 18 09:34:02 pc09011 ntop[56632]:   **WARNING** Message is 'Shared 
object "libmyrrd-3.1rc1.so" not found'
Dec 18 09:34:02 pc09011 ntop[56632]:   SNMP: Welcome to snmpPlugin. (C) 
2004 by F.Fusco and G.Giardina
Dec 18 09:34:02 pc09011 ntop[56632]:   SFLOW: Welcome to sFlow.(C) 
2002-04 by Luca Deri
Dec 18 09:34:02 pc09011 ntop[56632]:   XML: Welcome to xmldump plugin. 
(C) 2003-2004 by Burton Strauss
Dec 18 09:34:02 pc09011 ntop[56632]:   Calling plugin start functions 
(if any)
Dec 18 09:34:02 pc09011 ntop[56632]:   Now running as requested user 
'nobody' (65534:65534)
Dec 18 09:34:02 pc09011 ntop[56632]:   INIT: Created pid file 
(/var/log/ntop/ntop.pid)
Dec 18 09:34:02 pc09011 ntop[56632]:   Note: Reporting device initally 
set to 0 [fxp0] (merged)
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Started thread 
(140580864) for network packet sniffing on fxp0
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Packet processor 
thread running...
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Fingerprint scan 
thread running...
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Idle host scan thread 
running...
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: Address resolution 
thread running...
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: web connections 
thread (56632) started...
Dec 18 09:34:02 pc09011 ntop[56632]:   Note: SIGPIPE handler set 
(ignore)
Dec 18 09:34:02 pc09011 ntop[56632]:   WEB: ntop's web server is now 
processing requests
Dec 18 09:34:02 pc09011 ntop[56632]:   THREADMGMT: pcapDispatch(fxp0) 
thread running...

After about _10 minutes_ (no joke), Firefox is displaying the <TITLE>Welcome
to ntop!</TITLE> in the window (title) bar.

Ntop started by

protocols="HTTP=http|https,DNS=domain,Ntop=3000,\
NBios-IP=netbios-ns|netbios-dgm|netbios-ssn|microsoft-ds,Mail=lotusnote|pop2
|pop3|kpop|smtp|imap,\
SNMP=snmp|snmptrap,Telnet=telnet,Cache=3128,BEA=7000-7010,SSH=ssh,TSMBackup=
1500,\
SAP=3202,PSCAM=4754,Virus=2967,LPD=515,PCAny=5631|5632,FTP=ftp|ftp-data"

# ftp data for passive mode
# see <netinet/in.h> IP_PORTRANGE

case "$1" in
start)
        # ntop 3.1
        $ntop_path/bin/ntop --skip-version-check --disable-schedyield -o -c
-u nobody -d -P /var/log/ntop -w a.b.c.d:3000 -i fxp0 -p $protocols && echo
-n ' ntop'

Yours sincerely.

--
Stanley Hopcroft

IP Australia
Ph: (02) 6283 3189  Fax: (02) 6281 1353
PO Box 200 Woden  ACT 2606
http://www.ipaustralia.gov.au

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

Reply via email to