Re: [AOLSERVER] Binding to port 80

2004-02-27 Thread Taguchi Takeshi
Thanks, Dossy. Sorry for my too late report. > Okay, the patch has been updated: > > http://panoptic.com/aolserver/premature-prebound-closing-patch.txt > > If this is good, and nobody sees a reason why this shouldn't get > committed, I'll commit into CVS later today. Your patch save me! it w

Re: [AOLSERVER] Binding to port 80

2004-02-23 Thread Dossy
On 2004.02.23, Mark Page <[EMAIL PROTECTED]> wrote: > By the way: It would be more proper to use the Ns_IncrTime api to > manipulate this timeval. E.g., > > Ns_GetTime(&timeout); > Ns_IncrTime(&timeout, 10, 0); > > This makes more sense once the constant delta seconds is replaced by a > co

Re: [AOLSERVER] Binding to port 80

2004-02-23 Thread Dossy
On 2004.02.23, Rob Crittenden <[EMAIL PROTECTED]> wrote: > Or here I am with a better fix rather than changing the semantics of an > existing function (what was I thinking!?). Seriously! When I saw the patch against pthread.c, I nearly choked. :-) > Still using Dobby's patch, change the way the

Re: [AOLSERVER] Binding to port 80

2004-02-23 Thread Mark Page
By the way: It would be more proper to use the Ns_IncrTime api to manipulate this timeval. E.g., Ns_GetTime(&timeout); Ns_IncrTime(&timeout, 10, 0); This makes more sense once the constant delta seconds is replaced by a configurable value. Rob Crittenden wrote on 2/23/2004, 11:58 AM:

Re: [AOLSERVER] Binding to port 80

2004-02-23 Thread Mark Page
I don't follow this. The Ns_CondTimedWait is defined to take an absolute time value. (See http://www.aolserver.com/docs/devel/c/api/c-ch49.htm#551016 ) So, you don't want to change it to do adjustments assuming that what's given is a relative time. If what's going wrong is that it's getting a r

Re: [AOLSERVER] Binding to port 80

2004-02-23 Thread Rob Crittenden
Or here I am with a better fix rather than changing the semantics of an existing function (what was I thinking!?). Still using Dobby's patch, change the way the timeout is set from timeout.sec = 10; timeout.usec = 0; to Ns_GetTime(&timeout); timeout.sec += 10; rob Rob Crittenden wrot

Re: [AOLSERVER] Binding to port 80

2004-02-23 Thread Rob Crittenden
It's failing because the timeout isn't setup properly. The timeout value to pthread_cond_timedwait() is based on an absolute time, not a relative time. So I guess the right thing to do is modify Ns_CondTimedWait() to fetch the local time and add the timeout to that. I was able to duplicate the prob

Re: [AOLSERVER] Binding to port 80

2004-02-23 Thread Dossy
On 2004.02.23, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > New error occurs. > > [23/Feb/2004:15:13:51][84562.134557696][-main-] Notice: driver: > starting: nssock > nsthreads: pthread_cond_timedwait failed in Ns_CondTimedWait: > Operation not permitted > Abort > > I think error codes for pthread_

Re: [AOLSERVER] Binding to port 80

2004-02-22 Thread Taguchi Takeshi
New error occurs. [23/Feb/2004:15:13:51][84562.134557696][-main-] Notice: driver: starting: nssock nsthreads: pthread_cond_timedwait failed in Ns_CondTimedWait: Operation not permitted Abort I think error codes for pthread_cond_timedwait(3) are only EINVAL, and ETIMEDOUT. But it's seem EPERM. Doe

Re: [AOLSERVER] Binding to port 80

2004-02-22 Thread Dossy
On 2004.02.23, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > I've applied new patch, and tested it. > But I've got same result. Yeah, I'm not too keen on why those mutexes are even being used around the readers of the values -- I think the Ns_CondTimedWait() should be done without grabbing the Ns_M

Re: [AOLSERVER] Binding to port 80

2004-02-22 Thread Taguchi Takeshi
I've applied new patch, and tested it. But I've got same result. In NsWaitDriversStartup(), I feel something wrong. Because, driver startup is timedout. It means Ns_CondTimedWait() exits abnormaly Is it correct? Thanks. -- T.Taguchi. -- AOLserver - http://www.aolserver.com/ To Remove your

Re: [AOLSERVER] Binding to port 80

2004-02-22 Thread Dossy
On 2004.02.23, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > [23/Feb/2004:10:53:02][67435.134559744][-sched-] Notice: sched: starting > [23/Feb/2004:10:53:02][67435.134557696][-main-] Notice: driver: starting: nssock > [23/Feb/2004:10:53:02][67435.134557696][-main-] Warning: driver: startup timeout:

Re: [AOLSERVER] Binding to port 80

2004-02-22 Thread Taguchi Takeshi
> I've implemented it, and the patch is here: > > http://panoptic.com/aolserver/premature-prebound-closing-patch.txt I've try it. But Ns_SockListenEx() was called after executing NsClosePreBound(). Here is a patch for my testing: --- nsd/binder.c~ Mon Feb 23 10:39:48 2004 +++ nsd/binder.

Re: [AOLSERVER] Binding to port 80

2004-02-22 Thread Dossy
On 2004.02.22, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > In nsmain.c, I modify it as following: ... > NsStartDrivers(); > #ifndef _WIN32 > sleep(10); /* DARTY SOLUTION! */ > NsClosePreBound(); > #endif > > It's seem work fine. I was going to suggest this just to see if it was a ra

Re: [AOLSERVER] Binding to port 80

2004-02-21 Thread Taguchi Takeshi
Hi,all. Followings is my darty, not beautifull solution. In nsmain.c, I modify it as following: /* * Start the drivers now that the server appears ready * and then close any remaining pre-bound sockets. */ NsStartDrivers(); #ifndef _WIN32 sleep(10); /* DARTY SOLUTION

Re: [AOLSERVER] Binding to port 80

2004-02-21 Thread Taguchi Takeshi
Hi, Dossy. > I'd do the same here. Maybe "sa" isn't the same, so it's not finding > the hash entry. > > > Tcl_FindHashEntry() is seem fail. Why ? I think key value may be > > incorrect. > > I'm thinking you're right. What platform are you on again? OSX? My platform is FreeBSD-5.2-CURRENT. An

Re: [AOLSERVER] Binding to port 80

2004-02-21 Thread Dossy
On 2004.02.21, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > Log file said: > [21/Feb/2004:21:06:55][52251.134557696][-main-] Warning: prebind: closed unused: > 10.0.0.6:80 = 3 > > HERE > [21/Feb/2

Re: [AOLSERVER] Binding to port 80

2004-02-21 Thread Dossy
On 2004.02.21, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > static void > PreBind(char *line) > { ... > hPtr = Tcl_CreateHashEntry(&prebound, (char *) &sa, &new); I'd run through this with gdb, and dump the contents of the sockaddr_in struct in "sa" to see what's being set as the h

Re: [AOLSERVER] Binding to port 80

2004-02-21 Thread Taguchi Takeshi
Log file said: [21/Feb/2004:21:06:55][52251.134557696][-main-] Warning: prebind: closed unused: 10.0.0.6:80 = 3 HERE [21/Feb/2004:21:06:55][52251.134560768][-nssock:driver-] Notice: starting [21/F

Re: [AOLSERVER] Binding to port 80

2004-02-21 Thread Taguchi Takeshi
I've read source code again. In nsd/binder.c, I've modified it as followings: static void PreBind(char *line) { Tcl_HashEntry *hPtr; int new, sock, port; struct sockaddr_in sa; char *err, *ent, *p, *q, *addr, *baddr; Ns_Log(Warning, "DEBUG:PreBind: called: %s", line); ent

Re: [AOLSERVER] Binding to port 80

2004-02-20 Thread Taguchi Takeshi
> I'm betting [ns_info address] is not returning 10.0.0.6, but some other > IP address on your box. To experiment, change line 4 to read: > > set address 10.0.0.6 > > then try to start bin/nsd with the same command line you were using > before. I've try it. But I got same results. [21/Feb/20

Re: [AOLSERVER] Binding to port 80

2004-02-20 Thread John Shafto
r" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 20, 2004 04:41 Subject: Re: [AOLSERVER] Binding to port 80 You have to bing to port 80 using the -b switch on the command line, and you also need to specify port 80 in the config.tcl file. The reason port 80 is

Re: [AOLSERVER] Binding to port 80

2004-02-20 Thread Dossy
On 2004.02.20, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > Thanks, Dossy. > > I've executed nsd as following: > > # cd /usr/local/aolserver > # bin/nsd -ft config.tcl -u www -g www -b 10.0.0.6:80 > > My config.tcl is: [snip] Here's what's interesting from your config.tcl: 1 set httpport

Re: [AOLSERVER] Binding to port 80

2004-02-20 Thread Taguchi Takeshi
Sorry, This ML delete uuencoded file Here is a my config. Thanks. -- T.Taguchi. set httpport 80 set httpsport 8443 set hostname [ns_info hostname] set address[ns_info address] set servername "www.TclTk.jp" set serverdesc

Re: [AOLSERVER] Binding to port 80

2004-02-20 Thread Taguchi Takeshi
Thanks, Dossy. I've executed nsd as following: # cd /usr/local/aolserver # bin/nsd -ft config.tcl -u www -g www -b 10.0.0.6:80 My config.tcl is: BEGIN>---88--- END>---88--- above is gzip+uuencode format. following commands will extract it. # cat THIS_FILE | uudecode # gunzip config.tcl.gz I've

Re: [AOLSERVER] Binding to port 80

2004-02-20 Thread Dossy
On 2004.02.20, Taguchi Takeshi <[EMAIL PROTECTED]> wrote: > Using "-b" option, prebind bind port 80. but it will be closed by > prebind itself as "unused port". And then, nsd try to bind port 80 > using non-root priv, so it will get permission denied error... Send your config .tcl file (what you

Re: [AOLSERVER] Binding to port 80

2004-02-20 Thread Dave Bauer
You have to bing to port 80 using the -b switch on the command line, and you also need to specify port 80 in the config.tcl file. The reason port 80 is unsed is that you had still specified port 8000 in the configuration file. Dave Taguchi Takeshi wrote: Did you find a solution yet T

Re: [AOLSERVER] Binding to port 80

2004-02-19 Thread Taguchi Takeshi
> Did you find a solution yet Takeshi? No. I can not find any solution. Many people say "Use -b option". But "-b" option is *NOT* solution. it can not resolve this probrem. Using "-b" option, prebind bind port 80. but it will be closed by prebind itself as "unused port". And then, nsd try to bi

Re: [AOLSERVER] Binding to port 80

2004-02-19 Thread Dossy
On 2004.02.19, Peter Alberer <[EMAIL PROTECTED]> wrote: > >I've try to bind aolserver 4.1 to port 80, but I've got "permission > denied" >error. > > Unfortunately I experienced the same problem yesterday. Aolserver 4.1 > can not bind to port 80, but aolserver 3.3-ad13 with the exact same > config f

Re: [AOLSERVER] Binding to port 80

2004-02-19 Thread Peter Alberer
T.Taguchi. wrote: >I've try to bind aolserver 4.1 to port 80, but I've got "permission denied" >error. Unfortunately I experienced the same problem yesterday. Aolserver 4.1 can not bind to port 80, but aolserver 3.3-ad13 with the exact same config file and the same command line parameters (as roo

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Taguchi Takeshi
Thanks, Chris. I've read source. -b and -B use same PreBind(). I think PreBind() itselfs may be work. But NsClosePreBound() closes pre-binded tcp 80 port. log file said: [-main-] Warning: prebind: closed unused : 10.0.0.6:80 = 4 I think I must change my question. Why NsClosePreBound() clos

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Chris Davies
I believe it is a -B capital B and I don't recall if it needed to be the last option. On Mon, 2004-02-16 at 01:23, Taguchi Takeshi wrote: > and I got "Permission denied" errors... -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTE

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Taguchi Takeshi
> In the second case you have a conflict between command line port and > config file port. I've tested following config files: set httpport 8080 and set httpport 80 and I got "Permission denied" errors... > Also - is 10.0.0.0 a valid address? 10.0.0.6 is a varid address. This FreeBSD box has th

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Taguchi Takeshi
> Is there anything on already on the port? If you have lsof command you can > run lsof -i TCP:80 I've installed lsof using ${PORTSDIR}/sysutild/lsof now. but "lsof -i TCP:80" returns nothing. I've try to exec "netstat", but it said same results. there are no process using tcp 80 port. Thanks. --

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Alfred Werner
In the second case you have a conflict between command line port and config file port. Also - is 10.0.0.0 a valid address? On Mon, 16 Feb 2004, Taguchi Takeshi wrote: > Not work for me ...;( > > Firstly, I type simply > > # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www > > and I got same pe

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Alfred Werner
Is there anything on already on the port? If you have lsof command you can run lsof -i TCP:80 Regards, Alfred Werner On Mon, 16 Feb 2004, Taguchi Takeshi wrote: > Not work for me ...;( > > Firstly, I type simply > > # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www > > and I got same permissi

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Taguchi Takeshi
Not work for me ...;( Firstly, I type simply # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www and I got same permission error. Then I edit config.tcl as followings: set httpport8080 and start nsd as following: # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www Then I got following

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Alfred Werner
usr/local/aolserver/bin/nsd -t /web/aolserver/site-config.tcl -b 1.2.3.4:80 -u webuser works for me in that order. Naruhodo! On Sun, 15 Feb 2004, Chris Davies wrote: > I think you're missing the -b parameter > > -b 1.2.3.4:80 > > needs to be on the command line, but there might be some specifi

Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Chris Davies
I think you're missing the -b parameter -b 1.2.3.4:80 needs to be on the command line, but there might be some specific order, I don't recall specifically. On Sun, 2004-02-15 at 20:52, Taguchi, Takeshi wrote: > Hi,all. > > I've try to bind aolserver 4.1 to port 80, but I've got > "permission den

[AOLSERVER] Binding to port 80

2004-02-15 Thread Taguchi, Takeshi
Hi,all. I've try to bind aolserver 4.1 to port 80, but I've got "permission denied" error. I've edit config.tcl file as following: BEGIN>---88--- set httpport 80 ...[snip]... ns_param userwww ns_param group www ...[snip]... END>---88--- user www adn group