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 works

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

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

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

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 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 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 configurable

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 race

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.c

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 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

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

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.

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-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

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 hash key.

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

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. And I think

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

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

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 specify

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---8CUT HERE8--- END---8cut here8--- above is gzip+uuencode format. following commands will extract it. # cat THIS_FILE | uudecode # gunzip

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 John Shafto
] 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 unsed is that you had still specified port

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.

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 root:

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 file and the

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 bind port

[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---8part of config.tcl8--- set httpport 80 ...[snip]... ns_param userwww ns_param group www ...[snip]... END---8cut

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 denied

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 specific

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

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 permission

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

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 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 this

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

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()