Re: [AOLSERVER] AOLserver questions

2015-03-20 Thread Sep Ng
This is an intriguing solution.  If it were possible to configure ns_pools 
to do that.  I'm not too familiar with how this can be accomplished however.

Regards.

On Friday, March 20, 2015 at 8:54:10 PM UTC+8, Jeff Rogers wrote:
>
> Sep Ng wrote: 
> > Thank you very much for shedding a lot of light into this. 
> > 
> > On Friday, March 20, 2015 at 3:58:19 PM UTC+8, Gustaf Neumann wrote: 
> > 
> >  > Am 20.03.15 um 07:48 schrieb Sep Ng: 
> > 
> > what is hurting you? 
> > 
> >  > We have instances where we'd get a high number of concurrent 
> > users that the requests are getting queued, but when I look at the 
> > logs, there's a > lot of static files being served for each login 
> > page, let alone other pages being served in aolserver.  So, I'm 
> > theorizing that being able to get those > static file requests 
> > pushed into a single thread and free up the connection threads would 
> > help in scalability. 
> > 
> > yes, there is a certain hope, that removing this burden from the 
> > connection threads will improve the situation. Another option to 
> reduce 
> > queuing time is to increase the number of connection threads. 
> > If the bottleneck are slow sql-queries then this pooling stuff will 
> > not help. 
> > 
> > Right now, I do not believe sql queries are the culprit for the 
> > sacalability issues.  I have a better understanding on this now.  I 
> > think the only real issue from implementation stand point is getting the 
> > reverse proxy setup right. 
>
>
> Another thing to try out if you can distinguish static from dynamic by 
> the url pattern is to use [ns_pools] to set up the server so that all 
> static content is served from one threadpool and the slow dynamic pages 
> from a different pool.  These would still be ordinary conn threads (no 
> background delivery), but it would keep the static requests from one 
> user from queuing behind the dynamic pages from a different user.  I 
> haven't completely thought through exactly how this would work, but my 
> first impression is that it would mean longer queuing times for dynamic 
> requests, but more responsive servicing of static ones, so that pages 
> would be slower to start but faster once they started. 
>
> -J 
>
>
>
> --
>  
>
> Dive into the World of Parallel Programming The Go Parallel Website, 
> sponsored 
> by Intel and developed in partnership with Slashdot Media, is your hub for 
> all 
> things parallel software development, from weekly thought leadership blogs 
> to 
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/ 
> ___ 
> aolserver-talk mailing list 
> aolserv...@lists.sourceforge.net  
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk 
>
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] AOLserver questions

2015-03-20 Thread Sep Ng
Thank you very much for shedding a lot of light into this.

On Friday, March 20, 2015 at 3:58:19 PM UTC+8, Gustaf Neumann wrote:
>
>  > Am 20.03.15 um 07:48 schrieb Sep Ng:
>
>>  what is hurting you?
>>  
>  
> > We have instances where we'd get a high number of concurrent users that 
> the requests are getting queued, but when I look at the logs, there's a > 
> lot of static files being served for each login page, let alone other pages 
> being served in aolserver.  So, I'm theorizing that being able to get those 
> > static file requests pushed into a single thread and free up the 
> connection threads would help in scalability.
>
> yes, there is a certain hope, that removing this burden from the 
> connection threads will improve the situation. Another option to reduce 
> queuing time is to increase the number of connection threads. 
> If the bottleneck are slow sql-queries then this pooling stuff will not 
> help.
>
> Right now, I do not believe sql queries are the culprit for the 
sacalability issues.  I have a better understanding on this now.  I think 
the only real issue from implementation stand point is getting the reverse 
proxy setup right.
 

> Often the first task to determine, what the bottleneck is, can be already 
> be difficult.
> NaviServer has several introspection means for monitoring. The following  
> graph shows queuing times, filter and run times (you won't get
> these numbers from aolserver). The graph (from OpenACS.org) shows
> that queuing time is on that site typically around 0.1 ms, with peaks in 
> the range of 16 ms. This is for example quite useful for determining the 
> right number of running connection threads. naviserver allows to 
> change this number dynamically without restart
>
> [image: weekly graph]
>   
>
This chart is something that would benefit us very much.  NaviServer is 
looking like a target I should be working towards in the future.
 

>
>  > By the way, I've seen in previous posts of yours that the you did 
> switch from aolserver to naviserver.  How big was the change?  What things 
> did > you have to re-write/port to get them running in naviserver?
>
> We did the move of our main site 4 years ago (now we have around 50 
> naviserver sites),
> but i do not have a detailed writeup of the changes. Most of our changes 
> went into OpenACS (download OpenACS 5.8.1, search for NaviServer). 
>
> what comes to my mind is:
> - NaviServer dropped the useless "$conn" argument from several commands
>   (like old: "ns_return $conn 200 text/plain ..." -> "ns_return 200 
> text/plain ..."
> - different modules (e.g. for ssl), different config file
> - more functionality built-in which was as a module under aolserver
>   crypo functions (sha, md5), cache, base-64 encoding, gzip delivery
>   (actually, the "ns_cache" function in naviserver usues a single 
>   command style (ns_cache_eval) and in aolserver subcommand style, 
>   but we added already a compatibility layer to the naviserver source tree
>   which is sufficient for OpenACS
> - no ns_share (use nsv instead)
> - no "ns_set -persistent"
>
> We did not use the latter two, but this comes sometimes up in the mailing 
> lists.
> The move was quite easy for us, but ymmv.
>  
> There seems to be much work to be done and this can't be rolled out 
quickly.  I will have to spend more time on this when the time comes.

 

> -g
>  
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] AOLserver questions

2015-03-19 Thread Sep Ng
Thank you once again for your swift response!

On Friday, March 20, 2015 at 2:33:59 PM UTC+8, Gustaf Neumann wrote:
>
>  Am 20.03.15 um 05:47 schrieb Sep Ng:
>  
> Hi Gustaf!  Thank you for the informative response! 
>
>  I've been thinking of moving to NaviServer but I don't know enough about 
> the transition to make that call yet.  Right now, we're on aolserver and 
> so, I'm trying to see what I can do on this platform.  I do not understand 
> why the delivery doesn't work on https out of the box and requires a 
> reverse proxy. 
>  
> bgdelivery takes the socket (file descriptor) of the current connection, 
> but it has no knowledge about SSL. When it hands the file descriptor to the 
> background delivery thread, this can write back to the client just using 
> plain tcl i/o. So, background delivery can certainly write to the 
> file-descriptor, but that won't be accepted by the client trying to decrypt 
> the channel.
>
 
I think that is now making more sense now.  Thanks.  I may have to look 
into this  as well.

>  
>  I suspect the varied client connection is part of the problem and them 
> sitting on the connection threads is hurting us. 
>  
> what is hurting you?
>
 
We have instances where we'd get a high number of concurrent users that the 
requests are getting queued, but when I look at the logs, there's a lot of 
static files being served for each login page, let alone other pages being 
served in aolserver.  So, I'm theorizing that being able to get those 
static file requests pushed into a single thread and free up the connection 
threads would help in scalability.
 

>   However, we do not serve big files on our server so this has me 
> wondering about the benefits of this change.
>  
> whatever big means. connections can "hang" also when writing a few KBs.
>
Interesting. 

>  
>  I'm not certain if aolserver has any facilities for asynchronous file 
> writing and spooling. 
>  
> the writer threads are an extension of naviserver over aolserver
>
>   It seems that I will have to build everything by hand.  I had hoped 
> that simply transferring the thread and having it ns_returnfile would be 
> enough to get a simple form of background delivery going but it doesn't 
> look like that's the case.
>  
> if your site requires https, one cant use bgdelivery without a reverse 
> proxy. 
> otherwise, everything is pre-packaged.
>
> Oh.  We don't use OpenACS as everything here is custom built by me and 
others before me.  So, it's looking like I'm going to have to roll up my 
sleeves and get to work.

By the way, I've seen in previous posts of yours that the you did switch 
from aolserver to naviserver.  How big was the change?  What things did you 
have to re-write/port to get them running in naviserver?

Regards.

 

> -g
>
>  
>  Regards.
>
>
> On Friday, March 20, 2015 at 12:03:52 PM UTC+8, Gustaf Neumann wrote: 
>>
>> Dear Sep, 
>>
>> The question whether it is worth to use asynchronous delivery boils 
>> down to a question of usage pattern and desired scalability. 
>> The general problem with serving (large) resources via 
>> classical aolserver is that a connection thread is unable 
>> to handle other threads for the time span of the delivery. 
>> It is important to understand that the time span of the delivery is 
>> mostly 
>> determined by the client. A client with little processing power 
>> connection 
>> over e.g. a mobile phone can block a connection quite a long time. A 
>> special instance of this is the slow-read attack [2], which is 
>> a special denial-of-service attack. 
>>
>> To serve e.g. 60 concurrent files one would require 60 
>> connection threads. Note that this can happen quite soon when 
>> serving content with several included  resources (images, css, js) 
>> the first time to a client. When the server runs out of connection 
>> threads, the requests are queued, which means that the 
>> the user-perceived runtime of a request is actually queueing 
>> time plus execution time. 
>>
>> Background delivery (as described in [2]) is fully integrated in OpenACS 
>> addresses the problem by delegating output spooling (file deliveries) 
>> to a single thread, which can deliver easily several 100 concurrent 
>> downloads by using Tcl's asynchronous I/O operations. Note that 
>> this works not only for static resources, but as well dynamic 
>> requests (e.g. generating long HTML pages from e.g. a database). 
>> We used this approach with very good success since 2006 
>> in large OpenACS installations (with e.g. 2000 simultaneous 
>>

Re: [AOLSERVER] AOLserver questions

2015-03-19 Thread Sep Ng
ttp://openacs.org/xowiki/Boost_your_application_performance_to_serve_large_files!
>  
>
> [2] http://en.wikipedia.org/wiki/Denial-of-service_attack#Slow_Read_attack 
> [3] 
>
> http://openacs.org/api-doc/proc-view?proc=ad_returnfile_background&source_p=1 
> [3] http://www.qcode.co.uk/post/121 
> [4] http://openacs.org/forums/message-view?message_id=4111406 
> [5] 
>
> https://next-scripting.org/xowiki/docs/misc/naviserver-connthreadqueue/index1 
>
> Am 19.03.15 um 07:09 schrieb Sep Ng: 
> > Hi all, 
> > 
> > I've been reading up on aolserver background delivery tricks on 
> > OpenACS and I've seen that the patches for the static TCL channel is 
> > already in 4.5.1.  In the spirit of improving server performance, I've 
> > been wondering if such facility is worth building on the custom app to 
> > increase concurrency and scalability. 
> > 
> > Most of the time, our aolserver also has to handle incoming requests 
> > for multiple jpeg, javascript libraries, and a lot of other things. 
> >  Freeing up the connection thread sounds very useful in improving the 
> > server scalability so I wanted a little bit of help on getting this to 
> > work. 
> > 
> > It's been hard trying to wrap my head around using ns_conn channel and 
> > what I can actually do with this static TCL thread.  It seems that I 
> > should be redefining ns_returnfile to use background delivery.  Could 
> > I use it to push a TCL proc that generates given the parameters, the 
> > dynamic page to this TCL channel to free up my connections? 
> > 
> > Sep 
>
> --
>  
>
> Dive into the World of Parallel Programming The Go Parallel Website, 
> sponsored 
> by Intel and developed in partnership with Slashdot Media, is your hub for 
> all 
> things parallel software development, from weekly thought leadership blogs 
> to 
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/ 
> ___ 
> aolserver-talk mailing list 
> aolserv...@lists.sourceforge.net  
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk 
>
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] AOLserver questions

2015-03-19 Thread Sep Ng
Hi Alex!

Unfortunately, we do have some tcl code that goes on before the image file 
requests.  So, at the moment, I am thinking of getting those tasks 
offloaded ASAP from the connection threads to serve valuable requests 
instead of the static files.  Scalability has been a sticking point for 
years now and I hope to finally get something working to address this.

Regards.

On Friday, March 20, 2015 at 10:27:32 AM UTC+8, Alex Hisen wrote:
>
>  Hi, Sep. 
>
>  
>
> If you don’t need to run any tcl code when serving these requests and you 
> still want to serve them using AOLserver (as opposed to some other web 
> server or a CDN), you can take advantage of pools to segregate threads for 
> serving these static resources into their own pool. If those threads never 
> allocate a tcl interpreter, they will be an order of magnitude smaller in 
> footprint than your normal threads and so you can just have a lot of them.
>
>  
>
> We have a module that you might find useful that helps with this:
>
> http://aolserver.am.net/code/modules/ampools.adpx
>
>  
>
> -Alex Hisen
>
>  
>
> *From:* Sep Ng [mailto:thejack...@gmail.com ] 
> *Sent:* Thursday, March 19, 2015 5:52 PM
> *To:* aols...@googlegroups.com 
> *Cc:* aolserv...@lists.sourceforge.net 
> *Subject:* Re: [AOLSERVER] AOLserver questions
>
>  
>  
> Generally, what I hope to achieve is that all of these static files will 
> be offloaded into a single connection thread(?)  So, when a request for a 
> static file comes in, I can push it to this sleeping thread and then serve 
> another request while this sleeping thread will look up the image and do 
> ns_returnfile (I guess).  At least, this is how I'm envisioning it right 
> now.
>  
>  
>  
> I don't know if I'm looking at it right or not.  Judging from my readings 
> on Gustaf's work, this is how it would operate.  Feel free to correct me if 
> I'm looking at this totally wrong.
>  
>
> On Friday, March 20, 2015 at 8:42:04 AM UTC+8, Tony Bennett (Brown Paper 
> Tickets) wrote:
>
>  Scheduling isn't needed. I read your question again and I understand 
> what you're looking for.  You're asking for all the javascript and images 
> on a page to be sent in one request correct?  You'll need to find a way to 
> buffer the output and then parse and change the buffer before it's sent.  
> It would be nice to have this be part of ns_register_filter postauth.
>  
> On 3/19/15 5:12 PM, Sep Ng wrote:
>  
>  Thanks for the reply.  I am perhaps confused with all of this.  It seems 
> that if I use the scheduling proc, I can start a thread that runs 
> perpetually and does nothing.  Then, I can use tclthread API to transfer 
> control into this and issue some proc that would perform mutex and serve 
> the file to the current ns_conn details and quit.  Am I thinking this right 
> or am I being stupid? :-)
>  
>
> On Friday, March 20, 2015 at 5:09:20 AM UTC+8, Tony Bennett (Brown Paper 
> Tickets) wrote: 
>
>  Look at the scheduling commands at 
> http://panoptic.com/wiki/aolserver/Tcl_API.  You could make an image 
> processing queue that runs in it's own thread and it won't take up any 
> connections.
>
> Tony
>  
> On 3/18/15 11:09 PM, Sep Ng wrote:
>  
>  Hi all, 
>  
>  
>  
> I've been reading up on aolserver background delivery tricks on OpenACS 
> and I've seen that the patches for the static TCL channel is already in 
> 4.5.1.  In the spirit of improving server performance, I've been wondering 
> if such facility is worth building on the custom app to increase 
> concurrency and scalability.
>  
>  
>  
> Most of the time, our aolserver also has to handle incoming requests for 
> multiple jpeg, javascript libraries, and a lot of other things.  Freeing up 
> the connection thread sounds very useful in improving the server 
> scalability so I wanted a little bit of help on getting this to work.
>  
>  
>  
> It's been hard trying to wrap my head around using ns_conn channel and 
> what I can actually do with this static TCL thread.  It seems that I should 
> be redefining ns_returnfile to use background delivery.  Could I use it to 
> push a TCL proc that generates given the parameters, the dynamic page to 
> this TCL channel to free up my connections?
>  
>  
>  
> Sep
>  
>  
>
> --
>
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
>
> by Intel and developed in partnership with Slashdot Media, is your 

Re: [AOLSERVER] AOLserver questions

2015-03-19 Thread Sep Ng
Generally, what I hope to achieve is that all of these static files will be 
offloaded into a single connection thread(?)  So, when a request for a 
static file comes in, I can push it to this sleeping thread and then serve 
another request while this sleeping thread will look up the image and do 
ns_returnfile (I guess).  At least, this is how I'm envisioning it right 
now.

I don't know if I'm looking at it right or not.  Judging from my readings 
on Gustaf's work, this is how it would operate.  Feel free to correct me if 
I'm looking at this totally wrong.

On Friday, March 20, 2015 at 8:42:04 AM UTC+8, Tony Bennett (Brown Paper 
Tickets) wrote:
>
>  Scheduling isn't needed. I read your question again and I understand what 
> you're looking for.  You're asking for all the javascript and images on a 
> page to be sent in one request correct?  You'll need to find a way to 
> buffer the output and then parse and change the buffer before it's sent.  
> It would be nice to have this be part of ns_register_filter postauth.
>
> On 3/19/15 5:12 PM, Sep Ng wrote:
>  
>  Thanks for the reply.  I am perhaps confused with all of this.  It seems 
> that if I use the scheduling proc, I can start a thread that runs 
> perpetually and does nothing.  Then, I can use tclthread API to transfer 
> control into this and issue some proc that would perform mutex and serve 
> the file to the current ns_conn details and quit.  Am I thinking this right 
> or am I being stupid? :-)
>
> On Friday, March 20, 2015 at 5:09:20 AM UTC+8, Tony Bennett (Brown Paper 
> Tickets) wrote: 
>>
>>  Look at the scheduling commands at 
>> http://panoptic.com/wiki/aolserver/Tcl_API.  You could make an image 
>> processing queue that runs in it's own thread and it won't take up any 
>> connections.
>>
>> Tony
>>
>> On 3/18/15 11:09 PM, Sep Ng wrote:
>>  
>> Hi all, 
>>
>>  I've been reading up on aolserver background delivery tricks on OpenACS 
>> and I've seen that the patches for the static TCL channel is already in 
>> 4.5.1.  In the spirit of improving server performance, I've been wondering 
>> if such facility is worth building on the custom app to increase 
>> concurrency and scalability.
>>
>>  Most of the time, our aolserver also has to handle incoming requests 
>> for multiple jpeg, javascript libraries, and a lot of other things. 
>>  Freeing up the connection thread sounds very useful in improving the 
>> server scalability so I wanted a little bit of help on getting this to work.
>>
>>  It's been hard trying to wrap my head around using ns_conn channel and 
>> what I can actually do with this static TCL thread.  It seems that I should 
>> be redefining ns_returnfile to use background delivery.  Could I use it to 
>> push a TCL proc that generates given the parameters, the dynamic page to 
>> this TCL channel to free up my connections?
>>
>>  Sep
>>  
>>  
>> --
>> Dive into the World of Parallel Programming The Go Parallel Website, 
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for 
>> all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the 
>> conversation now. http://goparallel.sourceforge.net/
>>
>>
>>  
>> ___
>> aolserver-talk mailing 
>> listaolserv...@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/aolserver-talk
>>
>>  
>>   
>  --
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] AOLserver questions

2015-03-19 Thread Sep Ng
Thanks for the reply.  I am perhaps confused with all of this.  It seems 
that if I use the scheduling proc, I can start a thread that runs 
perpetually and does nothing.  Then, I can use tclthread API to transfer 
control into this and issue some proc that would perform mutex and serve 
the file to the current ns_conn details and quit.  Am I thinking this right 
or am I being stupid? :-)

On Friday, March 20, 2015 at 5:09:20 AM UTC+8, Tony Bennett (Brown Paper 
Tickets) wrote:
>
>  Look at the scheduling commands at 
> http://panoptic.com/wiki/aolserver/Tcl_API.  You could make an image 
> processing queue that runs in it's own thread and it won't take up any 
> connections.
>
> Tony
>
> On 3/18/15 11:09 PM, Sep Ng wrote:
>  
> Hi all, 
>
>  I've been reading up on aolserver background delivery tricks on OpenACS 
> and I've seen that the patches for the static TCL channel is already in 
> 4.5.1.  In the spirit of improving server performance, I've been wondering 
> if such facility is worth building on the custom app to increase 
> concurrency and scalability.
>
>  Most of the time, our aolserver also has to handle incoming requests for 
> multiple jpeg, javascript libraries, and a lot of other things.  Freeing up 
> the connection thread sounds very useful in improving the server 
> scalability so I wanted a little bit of help on getting this to work.
>
>  It's been hard trying to wrap my head around using ns_conn channel and 
> what I can actually do with this static TCL thread.  It seems that I should 
> be redefining ns_returnfile to use background delivery.  Could I use it to 
> push a TCL proc that generates given the parameters, the dynamic page to 
> this TCL channel to free up my connections?
>
>  Sep
>  
>  
> --
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/
>
>
>  
> ___
> aolserver-talk mailing listaolserv...@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk
>
>  
>  --
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


[AOLSERVER] AOLserver questions

2015-03-19 Thread Sep Ng
Hi all,

I've been reading up on aolserver background delivery tricks on OpenACS and 
I've seen that the patches for the static TCL channel is already in 4.5.1. 
 In the spirit of improving server performance, I've been wondering if such 
facility is worth building on the custom app to increase concurrency and 
scalability.

Most of the time, our aolserver also has to handle incoming requests for 
multiple jpeg, javascript libraries, and a lot of other things.  Freeing up 
the connection thread sounds very useful in improving the server 
scalability so I wanted a little bit of help on getting this to work.

It's been hard trying to wrap my head around using ns_conn channel and what 
I can actually do with this static TCL thread.  It seems that I should be 
redefining ns_returnfile to use background delivery.  Could I use it to 
push a TCL proc that generates given the parameters, the dynamic page to 
this TCL channel to free up my connections?

Sep
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] Question on ns_eval

2013-02-15 Thread Sep Ng
I think I figured out what's wrong.  Basically, I have a custom proc_doc 
that does its own things and remaps namespaces and apparently it was 
calling ns_eval on its own.  It looks like it was also confusing the braces 
because of the args on proc_docs.

I think I'm good now. :)

On Friday, February 15, 2013 6:48:58 AM UTC+8, Sep Ng wrote:
>
> Thank you for the responses.  I'll conduct some tests.  The code I use to 
> reload right now is:
>
> eval namespace eval :: source $file
>
> so on swtching to ns_eval, I thought to maybe skip the namespace eval. 
>  With or without don't seem to make a difference, but I'll
> continue to look into this.
>
>
> On Friday, February 15, 2013 2:59:28 AM UTC+8, William J. Webb wrote:
>>
>>
>>
>> On Thursday, February 14, 2013 12:33:26 PM UTC-6, William J. Webb wrote:
>>>
>>> At the core, we use a slightly different version of:
>>> proc eval_source { filename } {
>>> if { [file exists $filename] } {
>>> set err [catch { ns_eval [list source $filename] } result]
>>>  if { $err } {
>>> ns_log notice eval_source ERROR: $result
>>> }
>>> } else {
>>> error "file $filename does not exist."
>>> }
>>> }
>>> #}}}
>>>
>>>
>>> There are some wrappers around this to recurse through directories using 
>>> patterns, ignore certain types of files, etc.
>>>
>>> Note that "ns_eval is asynchronous and the script isn't immediately 
>>> evaluated in the other interpreters until their next atalloc event".  E.g.: 
>>> you run an ns_eval/source in one nscp, you won't see it reflected in a 
>>> second concurrent nscp session.
>>>
>>> Will
>>>
>>>
>>> On Thursday, February 14, 2013 3:21:30 AM UTC-6, Sep Ng wrote:
>>>>
>>>> Hello,
>>>>
>>>> I've been looking into improve my development environment by using 
>>>> ns_eval to update all the TCL interps everytime I do changes on it. First 
>>>> off, it looks like I have to escape all the special TCL characters on 
>>>> ns_eval.  Is this the intended behaviour because I've seen many examples 
>>>> of 
>>>> people using ns_eval to do something like this:
>>>> ns_eval {source /somewhere/out/there/file.tcl}
>>>> but this has never worked for me (source seems to get confused with the 
>>>> [ and the ].
>>>>
>>>> I did a test and ran:
>>>> ns_eval {ns_log notice {test me}}
>>>> which produced errors where there were too many ns_log arguments.  I 
>>>> was able to get it to work by doing this:
>>>> ns_eval {ns_log notice \{test me\}}
>>>>
>>>> This leads me to believe that I have to escape every character that I 
>>>> use for ns_eval.
>>>>
>>>> My second question is that some of my custom API calls don't seem to be 
>>>> recognized when running ns_eval.  I don't really have much of an 
>>>> explanation for what this could be.  If anyone has ideas and theories, I'm 
>>>> all ears.
>>>>
>>>> Thanks!
>>>>
>>>--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] Question on ns_eval

2013-02-14 Thread Sep Ng
Thank you for the responses.  I'll conduct some tests.  The code I use to 
reload right now is:

eval namespace eval :: source $file

so on swtching to ns_eval, I thought to maybe skip the namespace eval. 
 With or without don't seem to make a difference, but I'll
continue to look into this.


On Friday, February 15, 2013 2:59:28 AM UTC+8, William J. Webb wrote:
>
>
>
> On Thursday, February 14, 2013 12:33:26 PM UTC-6, William J. Webb wrote:
>>
>> At the core, we use a slightly different version of:
>> proc eval_source { filename } {
>> if { [file exists $filename] } {
>> set err [catch { ns_eval [list source $filename] } result]
>>  if { $err } {
>> ns_log notice eval_source ERROR: $result
>> }
>> } else {
>> error "file $filename does not exist."
>> }
>> }
>> #}}}
>>
>>
>> There are some wrappers around this to recurse through directories using 
>> patterns, ignore certain types of files, etc.
>>
>> Note that "ns_eval is asynchronous and the script isn't immediately 
>> evaluated in the other interpreters until their next atalloc event".  E.g.: 
>> you run an ns_eval/source in one nscp, you won't see it reflected in a 
>> second concurrent nscp session.
>>
>> Will
>>
>>
>> On Thursday, February 14, 2013 3:21:30 AM UTC-6, Sep Ng wrote:
>>>
>>> Hello,
>>>
>>> I've been looking into improve my development environment by using 
>>> ns_eval to update all the TCL interps everytime I do changes on it. First 
>>> off, it looks like I have to escape all the special TCL characters on 
>>> ns_eval.  Is this the intended behaviour because I've seen many examples of 
>>> people using ns_eval to do something like this:
>>> ns_eval {source /somewhere/out/there/file.tcl}
>>> but this has never worked for me (source seems to get confused with the 
>>> [ and the ].
>>>
>>> I did a test and ran:
>>> ns_eval {ns_log notice {test me}}
>>> which produced errors where there were too many ns_log arguments.  I was 
>>> able to get it to work by doing this:
>>> ns_eval {ns_log notice \{test me\}}
>>>
>>> This leads me to believe that I have to escape every character that I 
>>> use for ns_eval.
>>>
>>> My second question is that some of my custom API calls don't seem to be 
>>> recognized when running ns_eval.  I don't really have much of an 
>>> explanation for what this could be.  If anyone has ideas and theories, I'm 
>>> all ears.
>>>
>>> Thanks!
>>>
>>--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


[AOLSERVER] Question on ns_eval

2013-02-14 Thread Sep Ng
Hello,

I've been looking into improve my development environment by using ns_eval 
to update all the TCL interps everytime I do changes on it. First off, it 
looks like I have to escape all the special TCL characters on ns_eval.  Is 
this the intended behaviour because I've seen many examples of people using 
ns_eval to do something like this:
ns_eval {source /somewhere/out/there/file.tcl}
but this has never worked for me (source seems to get confused with the [ 
and the ].

I did a test and ran:
ns_eval {ns_log notice {test me}}
which produced errors where there were too many ns_log arguments.  I was 
able to get it to work by doing this:
ns_eval {ns_log notice \{test me\}}

This leads me to believe that I have to escape every character that I use 
for ns_eval.

My second question is that some of my custom API calls don't seem to be 
recognized when running ns_eval.  I don't really have much of an 
explanation for what this could be.  If anyone has ideas and theories, I'm 
all ears.

Thanks!
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] modload: could not find Ns_ModuleInit in /usr/local/aolserver451/bin/nssha1.so

2013-01-29 Thread Sep Ng
For archival purposes, I added this CFLAG to the Makefile.

-Wl,--no-as-needed which linked the .so files successfully.

Reference.
http://stackoverflow.com/questions/14329967/missing-a-library-in-ldd-after-using-gcc-l


On Wednesday, January 30, 2013 7:42:17 AM UTC+8, Sep Ng wrote:
>
> I just came across this particular issue right now while rebuilding 
> aolserver on ubuntu 12.10.  Curiously it's for a different module, 
> nscache.so.  I checked ldd and it doesn't look like libnscache.so is being 
> linked to it.  I'm not sure why that's the case, but perhaps I missed 
> something during the compile.
>
> On Monday, May 14, 2012 2:57:37 PM UTC+8, Jim wrote:
>>
>> Is your aolserver installation in a system-wide place? It's in 
>> /usr/local/aolserver451 which is not a system-wide known place... and 
>> as I like to maintain and build the web stack myself, I tend to like 
>> this approach. Having said this, both (in standard place versus 
>> anywhere else) can work if you use some of the things I'll describe 
>> now. 
>>
>> The libs created against aolserver and tcl are dynamic libs, so ld.so 
>> is used to load and use them. /etc/ld.so.conf should list the places 
>> that the machine owner feels should be considered the standard places. 
>> So, if /usr/local/aolserver451/lib is in this file, it's considered a 
>> system-wide place, and libs in that dir will be found without further 
>> ado. 
>>
>> If it's not, the best way is not to alter /etc/ld.so.conf, but to add 
>> the lib dir to the env var LD_LIBRARY_PATH. If you do this before 
>> trying to run nsd, the libs in /usr/local/aolserver451 will be pulled 
>> in exactly as if that dir were in /etc/ld.so.conf. 
>>
>> -Jim 
>>
>> On 5/13/12, Klaus Hofeditz ]project-open[ 
>>  wrote: 
>> > Hi all, 
>> > 
>> > I am trying to install AOLSERVER 4.5.1 on Ubuntu 12.04 (LTS). 
>> > While nslog loads ok, nssha1 fails: 
>> > 
>> > [13/May/2012:17:09:35][15372.3073791680][-main-] Notice: modload: 
>> > loading '/usr/local/aolserver451/bin/nssha1.so' 
>> > [13/May/2012:17:09:35][15372.3073791680][-main-] Warning: modload: 
>> could 
>> > not find Ns_ModuleInit in /usr/local/aolserver451/bin/nssha1.so 
>> > [13/May/2012:17:09:35][15372.3073791680][-main-] Fatal: modload: failed 
>> > to load module '/usr/local/aolserver451/bin/nssha1.so' 
>> > 
>> > Any ideas where to start digging? 
>> > Tx for your support! 
>> > 
>> > Klaus 
>> > 
>> > 
>> > root@abc:/usr/local/src/aolserver-4.5.1/nssha1# make install 
>> > NSHOME=/usr/local/aolserver451 
>> > 
>> > gcc  -O2 -Wall -Wno-implicit-int -fPIC  -pipe 
>> > -I/usr/local/aolserver451/include -I/usr/local/aolserver451/include 
>> > -DNO_CONST -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" 
>> > -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" 
>> > -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
>> > -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
>> > -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
>> > -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 
>> > -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 
>> > -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 
>> > -DHAVE_PTHREAD_GETATTR_NP=1 -DGETATTRNP_NOT_DECLARED=1 -DTCL_THREADS=1 
>> > -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ 
>> > __attribute__\(\(__visibility__\(\"hidden\"\)\)\) 
>> > -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 
>> > -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long 
>> > -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 
>> > -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 
>> > -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETPWUID_R_5=1 
>> > -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 
>> > -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 
>> > -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 
>> > -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DUSE_TERMIOS=1 
>> > -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 
>> > -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 
>> > -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 
>> -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 
>> > -DHAVE_ST_BLKSIZ

Re: [AOLSERVER] modload: could not find Ns_ModuleInit in /usr/local/aolserver451/bin/nssha1.so

2013-01-29 Thread Sep Ng
I just came across this particular issue right now while rebuilding 
aolserver on ubuntu 12.10.  Curiously it's for a different module, 
nscache.so.  I checked ldd and it doesn't look like libnscache.so is being 
linked to it.  I'm not sure why that's the case, but perhaps I missed 
something during the compile.

On Monday, May 14, 2012 2:57:37 PM UTC+8, Jim wrote:
>
> Is your aolserver installation in a system-wide place? It's in 
> /usr/local/aolserver451 which is not a system-wide known place... and 
> as I like to maintain and build the web stack myself, I tend to like 
> this approach. Having said this, both (in standard place versus 
> anywhere else) can work if you use some of the things I'll describe 
> now. 
>
> The libs created against aolserver and tcl are dynamic libs, so ld.so 
> is used to load and use them. /etc/ld.so.conf should list the places 
> that the machine owner feels should be considered the standard places. 
> So, if /usr/local/aolserver451/lib is in this file, it's considered a 
> system-wide place, and libs in that dir will be found without further 
> ado. 
>
> If it's not, the best way is not to alter /etc/ld.so.conf, but to add 
> the lib dir to the env var LD_LIBRARY_PATH. If you do this before 
> trying to run nsd, the libs in /usr/local/aolserver451 will be pulled 
> in exactly as if that dir were in /etc/ld.so.conf. 
>
> -Jim 
>
> On 5/13/12, Klaus Hofeditz ]project-open[ 
> > wrote: 
> > Hi all, 
> > 
> > I am trying to install AOLSERVER 4.5.1 on Ubuntu 12.04 (LTS). 
> > While nslog loads ok, nssha1 fails: 
> > 
> > [13/May/2012:17:09:35][15372.3073791680][-main-] Notice: modload: 
> > loading '/usr/local/aolserver451/bin/nssha1.so' 
> > [13/May/2012:17:09:35][15372.3073791680][-main-] Warning: modload: could 
> > not find Ns_ModuleInit in /usr/local/aolserver451/bin/nssha1.so 
> > [13/May/2012:17:09:35][15372.3073791680][-main-] Fatal: modload: failed 
> > to load module '/usr/local/aolserver451/bin/nssha1.so' 
> > 
> > Any ideas where to start digging? 
> > Tx for your support! 
> > 
> > Klaus 
> > 
> > 
> > root@abc:/usr/local/src/aolserver-4.5.1/nssha1# make install 
> > NSHOME=/usr/local/aolserver451 
> > 
> > gcc  -O2 -Wall -Wno-implicit-int -fPIC  -pipe 
> > -I/usr/local/aolserver451/include -I/usr/local/aolserver451/include 
> > -DNO_CONST -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" 
> > -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" 
> > -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
> > -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
> > -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
> > -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 
> > -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 
> > -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 
> > -DHAVE_PTHREAD_GETATTR_NP=1 -DGETATTRNP_NOT_DECLARED=1 -DTCL_THREADS=1 
> > -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ 
> > __attribute__\(\(__visibility__\(\"hidden\"\)\)\) 
> > -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 
> > -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long 
> > -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 
> > -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 
> > -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETPWUID_R_5=1 
> > -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 
> > -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 
> > -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 
> > -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DUSE_TERMIOS=1 
> > -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 
> > -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 
> > -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 
> > -DHAVE_ST_BLKSIZE=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 
> > -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 
> > -DTCL_UNLOAD_DLLS=1  -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
> > -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
> > -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DSTDC_HEADERS=1 
> > -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
> > -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> > -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
> > -DHAVE_INTTYPES_H=1 -DHAVE_TIMEGM=1 -DHAVE_DRAND48=1 -DHAVE_RANDOM=1 
> > -DHAVE_POLL=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1-c -o 
> > nssha1.o nssha1.c 
> > :0:0: warning: "PACKAGE_NAME" redefined [enabled by 
> default] 
> > :0:0: note: this is the location of the previous 
> definition 
> > :0:0: warning: "PACKAGE_TARNAME" redefined [enabled by 
> > default] 
> > :0:0: note: this is the location of the previous 
> definition 
> > :0:0: warning: "PACKAGE_VERSION" redefined [enabled by 
> > default] 
> > :0:0: note: this is the location of the previous 
> definition 
> > :0:0: warning: "PACKAGE_STRING" redefi

Re: [AOLSERVER] Roadmap - 4.6 and beyond

2012-09-25 Thread Sep Ng
I say this half in jest but if tuning Aolserver can become less like black 
magic, that would be a huge plus!

On Tuesday, September 25, 2012 4:29:47 PM UTC+8, Jeff Rogers wrote:
>
> Hi all, 
>
> There should be a 4.5.2 final release sometime soon, but what comes 
> next?  I've been organizing my wishlist of what I'd like to see in 
> future AOLserver releases and I'm throwing it out there for anyone else 
> to add to or comment on.  These are not in any particular order; some 
> are half-baked, some are straightforward, and some are little more than 
> speculation.  I know development hands are a bit short these days, but 
> maybe people will find something that interests them to work on. 
>
> Core features: 
> - support chunked postdata 
> - api for filter unregistration 
> - core async delivery 
>currently possible by transferring conn socket to tcl event loop. 
> Would be nice to make it work for everything, by default. 
> - re-queue api 
>extension of pre-queue filters and quewait api: allow a conn thread 
> to send a request back to quewait for network i/o. 
> - move encoding and compression to filters 
> - general-purpose worker-pool api 
> - external prebinding 
>allow an external program to bind ports and specify open file 
> descriptors on the command line;  would allow privileged port binding 
> with no root privileges for actual server.  Would also allow restarting 
> without closing listen socket. 
> - pre-start request service 
>have a micro server that responds to requests with "please wait" 
> while server is starting.  Helpful for long start-up sequences. 
>
> Core tcl: 
> - replace various c-coded file commands with tcl equivalents (e.g., 
> ns_mkdir, ns_unlink).  Main benefit is clean handling of utf8 filenames. 
> - Support a 2-phase interp initialization.  Phase 1 is defining procs / 
> loading packages, which is replicated in every new interp.  Phase 2 is 
> initializing persistent data, preloading caches, setting up filters and 
> handlers, etc; things that are not replicated in every new interp. 
>
> Nsdb: 
> - add variable binding to nsdb 
> - add lob handling to nsdb 
> - support runtime db pool configuration 
>
> Protocols: 
> - SPDY 
> - websockets 
> I have a vague notion of how both of these could work.  But it needs 
> somewhat more than that :) 
>
> Documentation: 
> - Yes, please. 
>
> Packaging: 
> - more config examples 
> - examples of various features 
> - configuration through web browser 
> - "batteries-included" distribution (binaries including perhaps sqlite, 
> zlib, openssl, a few simple web apps, maybe php, perl, ...?) 
> - single-file mountable packages, like tclkits 
>
> Community: 
> - dogfood website 
>It'd be really nice if aolserver.com actually ran on aolserver.  It's 
> hosted on sourceforge currently so probably not much chance of that as 
> it stands, but who knows. 
>
>
> Anything else to add? 
>
> -J 
>
> --
>  
>
> Live Security Virtual Conference 
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ 
> ___ 
> aolserver-talk mailing list 
> aolserv...@lists.sourceforge.net  
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk 
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] Race conditions with Ns Set Persist?

2012-09-24 Thread Sep Ng
As far as I can tell, the ns_sets are being used exclusively by specific 
threads, so the data shouldn't really be going from one ns_set to another, 
except that it does happen, so I'm thinking there might be something 
happening with the ns_set implementation.

I'll look into the possibility of using nsvs.

On Tuesday, September 25, 2012 1:23:44 PM UTC+8, Jeff Rogers wrote:
>
> ns_sets are not internally interlocked.  If you are using the same 
> shared set in multiple threads, you need to protect it with a mutex. 
>
> Do you specifically need the indexability of ns_sets? nsvs are easier to 
> use for most cases, and if you have more than a few keys probably faster 
> too. 
>
> -J 
>
> Sep Ng wrote: 
> > I have several ns_set objects in my aolserver with the persist flag on 
> > to manage several things but I'm noticing that some of the ns_set 
> > objects are losing keys for no apparent reason.  Also at one instance, 
> > the ns_set object retrieved belongs to a totally different one.  I'm not 
> > sure if there's a bug with ns_set or if there's something wrong with my 
> > code, but I thought I'd throw this one out there to see if you guys have 
> > experienced this issue before. 
> > 
> > Thanks in advance. 
>
>
> --
>  
>
> Live Security Virtual Conference 
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ 
> ___ 
> aolserver-talk mailing list 
> aolserv...@lists.sourceforge.net  
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk 
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


[AOLSERVER] Race conditions with Ns Set Persist?

2012-09-24 Thread Sep Ng
I have several ns_set objects in my aolserver with the persist flag on to 
manage several things but I'm noticing that some of the ns_set objects are 
losing keys for no apparent reason.  Also at one instance, the ns_set 
object retrieved belongs to a totally different one.  I'm not sure if 
there's a bug with ns_set or if there's something wrong with my code, but I 
thought I'd throw this one out there to see if you guys have experienced 
this issue before.

Thanks in advance.
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] Is it possible to query the state of a thread with the thread id?

2012-06-27 Thread Sep Ng
Thank you all for your thoughts on this.  I am using Linux, so I'm stuck 
with pthreads.  I like the idea of ns_info threads as well and will try to 
use nsv to have better status feedback.

Regards.


On Thursday, June 28, 2012 7:33:54 AM UTC+8, Jim Davidson wrote:
>
>
> Hi, 
>
> As Jeff mentions, [ns_info threads] can dump a list for you.  You can also 
> play with [ns_thread name newName] to set the name of the thread as a means 
> to indicate what it's doing, e.g., 
>
> ns_thread name "worker:waiting" 
>
> and then: 
>
> ns_thread name "worker:running" 
>
>
> However, the thread name and listing feature is more for debugging or 
> monitoring purposes with a single coarse-grained lock around a single list 
> so it may have trouble on a very busy server if threads are coming and 
> going quickly (admit-ably this is a low probability problem). 
>
>
> One criticism of pthreads is the lack of a non-blocking join which could 
> have allowed you to create non-detached threads and check if they've exited 
> with a wait like you could with ordinary Unix processes.  Solaris threads 
> had a "wait for any thread" which wouldn't be too useful either unless you 
> were 100% certain you were the creator of all detached threads.  It looks 
> like there is a non-standard extensions in Linux, i.e., pthread_tryjoin_np, 
> and you could fiddle around with creating a Tcl command for this modeled on 
> [ns_thread join] with non-detached threads. 
>
>
> But all that sounds hard.  And, perhaps you're on Windows?  So, maybe your 
> own data structure is better.  Just be careful to watch for race conditions 
> with proper mutex locks and/or relying on atomic-features of nsv, something 
> like this (caution: I just typed the below, not guaranteed to be correct or 
> useful): 
>
>
> # 
> # Use a myWorkers nsv to store start and stop time of detached worker 
> threads. 
> # 
>
> proc starterThinger {} { 
> set nextId [nsv_incr myWorkers nextId] 
> nsv_set myWorkers start,$nextId [ns_info time] 
> nsv_lappend myWorkers active $nextId 
> set tid [ns_thread begindetached [list workerProc $nextId]] 
> } 
>
>
> proc workerProc {myId} { 
> ... do something useful ... 
> nsv_set myWorkers done,$myId [ns_info time] 
> ... ok to die ... 
> } 
>
> proc checkerThinger {} { 
> set active {} 
> foreach id [nsv_get myWorkers active] { 
> if {[nsv_exists myWorkers done,$id]} { 
> nsv_unset myWorkers done,$id 
> nsv_unset myWorkers start,$id 
> ... do something with knowledge thread died, 
> perhaps the start and stop time are useful too ... 
> } else { 
> lappend active $id 
> } 
> } 
> nsv_set myWorkers active $active 
> } 
>
>
>
> The use of worker-pool specific id's instead of thread id's is a paranoia 
> that thread id's could be re-used, perhaps quickly, fuddling things up. 
>  However, the checkerThinger proc has a race condition of scanning the 
> active list and then reseting it -- the startThinger could have started a 
> thread during the check.  So, that at least is a known bug. 
>
> Anyway, all the above is likely overkill ... consider using [ns_info 
> threads] first instead :) 
>
> Cheers 
> -Jim 
>
>
>
>
>
>
>
>
>
> On Jun 27, 2012, at 6:53 PM, Jeff Rogers wrote: 
>
> > You can get a list of running threads with [ns_info threads], one of the 
> > items returned there is the threadid which should correspond to a value 
> > returned from [ns_thread id] 
> > 
> > Alternately, you could have your detached threads set some richer state 
> > info than running/not running in a nsv and use that to create a status 
> > display. 
> > 
> > -J 
> > 
> > Sep Ng wrote: 
> >> I have a few tasks that I launch with ns_thread begindetached and I'm 
> >> wondering if I am able to use threadids to monitor them with AOLserver. 
> >> Any ideas on how I can tell if the thread id is still active or if it 
> >> exited already? 
> >> 
> >> Thanks! 
> >> 
> >> 
> >> 
> >> 
> --
>  
>
> >> Live Security Virtual Conference 
> >> Exclusive live event will cover all the ways today's security and 
> >> threat landscape has changed and how IT managers can respond. 
> Discussions 
>

Re: [AOLSERVER] pthreads and AOLserver

2012-06-25 Thread Sep Ng
Thank you for your explanation, Jim!  I appreciate all the input on this. 
 I have a better understanding on this now.

Regards.

On Tuesday, June 26, 2012 6:17:48 AM UTC+8, Jim Davidson wrote:
>
>
> Howdy,
>
> It was my fault the "join" and "wait" both exist (along with "begin" and 
> "create").   The reason is backwards compatibility -- the very first 
> implementation of AolServer threads loosely followed Win32 ("wait" made 
> sense as in WaitForObject or something like that) but quickly shifted to 
> the pthread model as I learned more and came to the conclusion that the 
> pthread model was generally correct in many important and subtle ways and 
> the Win32 model was sadly incomplete and flawed.
>
> -Jim
>
>
>
> On Jun 25, 2012, at 2:43 AM, Gustaf Neumann wrote:
>
>  the subcommands "ns_thread wait" and "ns_thread join" are implemented 
> with the identical c-code
> (calling Ns_ThreadJoin(), which calls straigth pthread_join()). 
> aolserver has now own thread semantics.
>
> "insistence"? You mean, why there are 2 commands? I could only guess: A 
> few commands
> are there solely for backward compatibility.
>
> -gustaf neumann
>
> On 22.06.12 00:21, Sep Ng wrote: 
>
> Thanks Maurizio.  I will review the links you have posted.
>
> I wanted to raise this question to everyone.  It seems to me that 
> ns_thread wait and join have the same functionality.  If that is the case, 
> why the insistence of defining the 'wait' command?
>
>
>
> On Thursday, June 21, 2012 10:13:47 PM UTC+8, Maurizio Martignano wrote: 
>>
>>  Dear Sep Ng,
>>
>> Memory leaks do exist in the majority of Web Servers 
>> (Aolserver included). This is a sad fact. Instead of trying to fix these 
>> leaks a better and cheaper strategy could be to have a daily restart of 
>> your web/application server.
>>  
>>
>> In case you need continuous operation, you can set up a cluster of 
>> web/application servers where each one of them does a restart every now and 
>> then to cope with the memory leaks, in any case the cluster never stops 
>> being available.  
>>  
>>
>> I created several installations of this type, see for instance:
>>
>>
>> http://www.spazioit.com/pages_en/sol_inf_en/distributed-sandbox-for-application-servers_en/
>>  
>>
>> Another need, which now unfortunately emerged in my area is the 
>> requirement to have redundant installations, capable of resisting to 
>> catastrophic events. You can find something about this in here:
>>
>>
>> http://www.spazioit.com/pages_en/sol_inf_en/disaster_recovery_solutions_en/
>>  
>>
>> I hope you find this information useful.
>>  
>>
>> Ciao,
>>
>> Maurizio
>>  
>>  
>>
>> *From:* Sep Ng
>> *Sent:* 21 June 2012 03:10
>> *To:* aolser...@googlegroups.com
>> *Subject:* [AOLSERVER] pthreads and AOLserver
>>  
>>
>> I've been poking around with how AOLserver handles ns_threads and wanted 
>> to raise the questions pertaining to memory leaks.
>> From the pthread_create man page...
>>
>> A thread may either be *joinable* or *detached*.  If a thread is joinable, 
>> then
>>
>>another thread can call pthread_join(3) 
>> <http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_join.3.html> 
>> to wait for the thread to terminate
>>
>>and fetch its exit status.  *Only when a terminated joinable thread 
>> has been*
>>
>> *   joined are the last of its resources released back to the system.*
>>
>>
>> Does this mean that if I don't use ns_thread join, the resources and tcl 
>> interpreter of the thread spawned by ns_thread begin will not get released?
>>
>> If someone would kindly definitively answer this for me, that would be 
>> well appreciated.
>>
>> Regards.
>>  
>
>  
>  
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
> aolserver-talk mailing list
> aolserver-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk
>
>
>--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] pthreads and AOLserver

2012-06-25 Thread Sep Ng
Thank you all for your insight.  Yes, Gustav, that is what my understanding 
was of the code.  It seemed that wait and join are doing the same thing 
with no differentiation.  Your explanation of why the 2 commands exist also 
makes sense.

Thank you all for your time in answering my questions.



On Monday, June 25, 2012 2:43:21 PM UTC+8, Gustaf Neumann wrote:
>
>  the subcommands "ns_thread wait" and "ns_thread join" are implemented 
> with the identical c-code
> (calling Ns_ThreadJoin(), which calls straigth pthread_join()). 
> aolserver has now own thread semantics.
>
> "insistence"? You mean, why there are 2 commands? I could only guess: A 
> few commands
> are there solely for backward compatibility.
>
> -gustaf neumann
>
> On 22.06.12 00:21, Sep Ng wrote: 
>
> Thanks Maurizio.  I will review the links you have posted.
>
> I wanted to raise this question to everyone.  It seems to me that 
> ns_thread wait and join have the same functionality.  If that is the case, 
> why the insistence of defining the 'wait' command?
>
>
>
> On Thursday, June 21, 2012 10:13:47 PM UTC+8, Maurizio Martignano wrote: 
>>
>>  Dear Sep Ng,
>>
>> Memory leaks do exist in the majority of Web Servers 
>> (Aolserver included). This is a sad fact. Instead of trying to fix these 
>> leaks a better and cheaper strategy could be to have a daily restart of 
>> your web/application server.
>>
>>  
>>
>> In case you need continuous operation, you can set up a cluster of 
>> web/application servers where each one of them does a restart every now and 
>> then to cope with the memory leaks, in any case the cluster never stops 
>> being available.  
>>
>>  
>>
>> I created several installations of this type, see for instance:
>>
>>
>> http://www.spazioit.com/pages_en/sol_inf_en/distributed-sandbox-for-application-servers_en/
>>
>>  
>>
>> Another need, which now unfortunately emerged in my area is the 
>> requirement to have redundant installations, capable of resisting to 
>> catastrophic events. You can find something about this in here:
>>
>>
>> http://www.spazioit.com/pages_en/sol_inf_en/disaster_recovery_solutions_en/
>>
>>  
>>
>> I hope you find this information useful.
>>
>>  
>>
>> Ciao,
>>
>> Maurizio
>>
>>  
>>
>>  
>>
>> *From:* Sep Ng
>> *Sent:* 21 June 2012 03:10
>> *To:* aolser...@googlegroups.com
>> *Subject:* [AOLSERVER] pthreads and AOLserver
>>
>>  
>>
>> I've been poking around with how AOLserver handles ns_threads and wanted 
>> to raise the questions pertaining to memory leaks.
>> From the pthread_create man page...
>>
>> A thread may either be *joinable* or *detached*.  If a thread is joinable, 
>> then
>>
>>another thread can call pthread_join(3) 
>> <http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_join.3.html> 
>> to wait for the thread to terminate
>>
>>and fetch its exit status.  *Only when a terminated joinable thread 
>> has been*
>>
>> *   joined are the last of its resources released back to the system.*
>>
>>
>> Does this mean that if I don't use ns_thread join, the resources and tcl 
>> interpreter of the thread spawned by ns_thread begin will not get released?
>>
>> If someone would kindly definitively answer this for me, that would be 
>> well appreciated.
>>
>> Regards.
>>  
>
>  
>  
>  --
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] pthreads and AOLserver

2012-06-23 Thread Sep Ng
Thanks Maurizio.  I will review the links you have posted.

I wanted to raise this question to everyone.  It seems to me that ns_thread 
wait and join have the same functionality.  If that is the case, why the 
insistence of defining the 'wait' command?



On Thursday, June 21, 2012 10:13:47 PM UTC+8, Maurizio Martignano wrote:
>
> Dear Sep Ng,
>
> Memory leaks do exist in the majority of Web Servers 
> (Aolserver included). This is a sad fact. Instead of trying to fix these 
> leaks a better and cheaper strategy could be to have a daily restart of 
> your web/application server.
>
>  
>
> In case you need continuous operation, you can set up a cluster of 
> web/application servers where each one of them does a restart every now and 
> then to cope with the memory leaks, in any case the cluster never stops 
> being available.  
>
>  
>
> I created several installations of this type, see for instance:
>
>
> http://www.spazioit.com/pages_en/sol_inf_en/distributed-sandbox-for-application-servers_en/
>
>  
>
> Another need, which now unfortunately emerged in my area is the 
> requirement to have redundant installations, capable of resisting to 
> catastrophic events. You can find something about this in here:
>
> http://www.spazioit.com/pages_en/sol_inf_en/disaster_recovery_solutions_en/
>
>  
>
> I hope you find this information useful.
>
>  
>
> Ciao,
>
> Maurizio
>
>  
>
>  
>
> *From:* Sep Ng
> *Sent:* 21 June 2012 03:10
> *To:* aolser...@googlegroups.com
> *Subject:* [AOLSERVER] pthreads and AOLserver
>
>  
>
> I've been poking around with how AOLserver handles ns_threads and wanted 
> to raise the questions pertaining to memory leaks.
> From the pthread_create man page...
>
> A thread may either be *joinable* or *detached*.  If a thread is joinable, 
> then
>
>another thread can call pthread_join(3) 
> <http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_join.3.html> 
> to wait for the thread to terminate
>
>and fetch its exit status.  *Only when a terminated joinable thread 
> has been*
>
> *   joined are the last of its resources released back to the system.*
>
>
> Does this mean that if I don't use ns_thread join, the resources and tcl 
> interpreter of the thread spawned by ns_thread begin will not get released?
>
> If someone would kindly definitively answer this for me, that would be 
> well appreciated.
>
> Regards.
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


[AOLSERVER] pthreads and AOLserver

2012-06-21 Thread Sep Ng
I've been poking around with how AOLserver handles ns_threads and wanted to 
raise the questions pertaining to memory leaks.
>From the pthread_create man page...

A thread may either be *joinable* or *detached*.  If a thread is joinable, then
>another thread can call pthread_join(3) 
>  
> to wait for the thread to terminate
>and fetch its exit status.  *Only when a terminated joinable thread 
> has been
>joined are the last of its resources released back to the system.*
>
>
Does this mean that if I don't use ns_thread join, the resources and tcl 
interpreter of the thread spawned by ns_thread begin will not get released?

If someone would kindly definitively answer this for me, that would be well 
appreciated.

Regards.
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] SSL connection error

2012-06-20 Thread Sep Ng
I see that you have cnauto-cert.pem and cnauto-key.pem.  Can you look into 
the files and make sure that the contents are correctly tagged as 
certificate and key?

Maybe also try Protocols="All" for the sslcontext.

I'm not sure what's the problem, but hope that might help you.

On Monday, June 18, 2012 8:11:18 PM UTC+8, Iuri Sampaio wrote:
>
> Hi there,
>
> After setting up nsopenssl on aolserver I got the following error.
>
>
>
>  SSL connection error 
> Unable to make a secure connection to the server. This may be a problem 
> with the server, or it may be requiring a client authentication certificate 
> that you don't have.
>  Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.
>
>
>
> Though, 1) config.tcl is properly set 
> 2) paths and permissions are properly set
> 3) and logs show the libs and certs were loaded sucessfully
>
>
> [17/Jun/2012:20:20:45][30618.
> 3074823872][-main-] Notice: modload: loading 
> '/usr/lib/aolserver4/bin/nssha1.so'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: modload: loading 
> '/usr/lib/aolserver4/bin/nsopenssl-3.0/nsopenssl.so'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl: 
> generating 512-bit temporary RSA key ...
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl: 
> generating 1024-bit temporary RSA key ...
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): loading SSL context 'users'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' ciphers loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' using SSLv3 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' using TLSv1 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' certificate and key loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' CA file loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: users 
> (nsopenssl): session cache is turned on for sslcontext 'cnauto'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): loading SSL context 'client'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' ciphers loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv2 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv3 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' using TLSv1 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' certificate and key loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' CA file loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: client 
> (nsopenssl): session cache is turned on for sslcontext 'cnauto'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): default SSL context for server is users
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: default server 
> SSL context: users
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): default SSL context for client is client
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: default client 
> SSL context: client
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): loading 'users' SSL driver
> ...
> [17/Jun/2012:20:20:56][30618.3052837744][-nsopenssl:driver-] Notice: 
> starting
> [17/Jun/2012:20:20:56][30618.3052837744][-nsopenssl:driver-] Notice: 
> nsopenssl: listening on 127.0.0.1:8443
> ###
>
>
> I believe the error is related to the 'client'  certificate.  Before I got 
> the error:
>
>
> 
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): loading SSL context 'client'
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' ciphers loaded successfully
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv2 protocol
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv3 protocol
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' using TLSv1 protocol
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Error: nsopenssl 
> (cnauto): 'client' certificate file is not readable or does not exist
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Error: nsopenssl 
> (cnauto): SSL context 'client' left uninitialized
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): default SSL context for server is users
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notic

Re: [AOLSERVER] SSL connection error

2012-06-19 Thread Sep Ng
My guess is it has something to do with your keys and certificates, maybe.  
Maybe you should post relevant sections of your config.tcl.

On Monday, June 18, 2012 8:11:18 PM UTC+8, Iuri Sampaio wrote:
>
> Hi there,
>
> After setting up nsopenssl on aolserver I got the following error.
>
>
>
>  SSL connection error 
> Unable to make a secure connection to the server. This may be a problem 
> with the server, or it may be requiring a client authentication certificate 
> that you don't have.
>  Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.
>
>
>
> Though, 1) config.tcl is properly set 
> 2) paths and permissions are properly set
> 3) and logs show the libs and certs were loaded sucessfully
>
>
> [17/Jun/2012:20:20:45][30618.
> 3074823872][-main-] Notice: modload: loading 
> '/usr/lib/aolserver4/bin/nssha1.so'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: modload: loading 
> '/usr/lib/aolserver4/bin/nsopenssl-3.0/nsopenssl.so'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl: 
> generating 512-bit temporary RSA key ...
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl: 
> generating 1024-bit temporary RSA key ...
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): loading SSL context 'users'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' ciphers loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' using SSLv3 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' using TLSv1 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' certificate and key loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'users' CA file loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: users 
> (nsopenssl): session cache is turned on for sslcontext 'cnauto'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): loading SSL context 'client'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' ciphers loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv2 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv3 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' using TLSv1 protocol
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' certificate and key loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): 'client' CA file loaded successfully
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: client 
> (nsopenssl): session cache is turned on for sslcontext 'cnauto'
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): default SSL context for server is users
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: default server 
> SSL context: users
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): default SSL context for client is client
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: default client 
> SSL context: client
> [17/Jun/2012:20:20:45][30618.3074823872][-main-] Notice: nsopenssl 
> (cnauto): loading 'users' SSL driver
> ...
> [17/Jun/2012:20:20:56][30618.3052837744][-nsopenssl:driver-] Notice: 
> starting
> [17/Jun/2012:20:20:56][30618.3052837744][-nsopenssl:driver-] Notice: 
> nsopenssl: listening on 127.0.0.1:8443
> ###
>
>
> I believe the error is related to the 'client'  certificate.  Before I got 
> the error:
>
>
> 
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): loading SSL context 'client'
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' ciphers loaded successfully
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv2 protocol
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' using SSLv3 protocol
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): 'client' using TLSv1 protocol
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Error: nsopenssl 
> (cnauto): 'client' certificate file is not readable or does not exist
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Error: nsopenssl 
> (cnauto): SSL context 'client' left uninitialized
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): default SSL context for server is users
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: default server 
> SSL context: users
> [17/Jun/2012:20:00:42][30405.3074971328][-main-] Notice: nsopenssl 
> (cnauto): default SSL context f

[AOLSERVER] Is it possible to query the state of a thread with the thread id?

2012-06-15 Thread Sep Ng
I have a few tasks that I launch with ns_thread begindetached and I'm 
wondering if I am able to use threadids to monitor them with AOLserver.  
Any ideas on how I can tell if the thread id is still active or if it 
exited already?

Thanks!
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] modload: could not find Ns_ModuleInit in /usr/local/aolserver451/bin/nssha1.so

2012-05-13 Thread Sep Ng
Your aolserver is looking for nssha1.so in this specific location: 
/usr/local/aolserver451/bin/nssha1.so

Check your folder directory if the file exists.  Make sure that the 
libnssha1.so is in /usr/local/aolserver451/lib too.

On Monday, May 14, 2012 5:22:00 AM UTC+8, Klaus Hofeditz ]project-open[ 
wrote:
>
> Hi all, 
>
> I am trying to install AOLSERVER 4.5.1 on Ubuntu 12.04 (LTS). 
> While nslog loads ok, nssha1 fails:   
>
> [13/May/2012:17:09:35][15372.3073791680][-main-] Notice: modload: 
> loading '/usr/local/aolserver451/bin/nssha1.so' 
> [13/May/2012:17:09:35][15372.3073791680][-main-] Warning: modload: could 
> not find Ns_ModuleInit in /usr/local/aolserver451/bin/nssha1.so 
> [13/May/2012:17:09:35][15372.3073791680][-main-] Fatal: modload: failed 
> to load module '/usr/local/aolserver451/bin/nssha1.so' 
>
> Any ideas where to start digging? 
> Tx for your support! 
>
> Klaus 
>
>
> root@abc:/usr/local/src/aolserver-4.5.1/nssha1# make install 
> NSHOME=/usr/local/aolserver451 
>
> gcc  -O2 -Wall -Wno-implicit-int -fPIC  -pipe 
> -I/usr/local/aolserver451/include -I/usr/local/aolserver451/include 
> -DNO_CONST -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" 
> -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" 
> -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 
> -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 
> -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 
> -DHAVE_PTHREAD_GETATTR_NP=1 -DGETATTRNP_NOT_DECLARED=1 -DTCL_THREADS=1 
> -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ 
> __attribute__\(\(__visibility__\(\"hidden\"\)\)\) 
> -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 
> -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long 
> -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 
> -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 
> -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETPWUID_R_5=1 
> -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 
> -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 
> -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 
> -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DUSE_TERMIOS=1 
> -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 
> -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 
> -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 
> -DHAVE_ST_BLKSIZE=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 
> -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 
> -DTCL_UNLOAD_DLLS=1  -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
> -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
> -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DSTDC_HEADERS=1 
> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
> -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_TIMEGM=1 -DHAVE_DRAND48=1 -DHAVE_RANDOM=1 
> -DHAVE_POLL=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1-c -o 
> nssha1.o nssha1.c 
> :0:0: warning: "PACKAGE_NAME" redefined [enabled by default] 
> :0:0: note: this is the location of the previous definition 
> :0:0: warning: "PACKAGE_TARNAME" redefined [enabled by 
> default] 
> :0:0: note: this is the location of the previous definition 
> :0:0: warning: "PACKAGE_VERSION" redefined [enabled by 
> default] 
> :0:0: note: this is the location of the previous definition 
> :0:0: warning: "PACKAGE_STRING" redefined [enabled by 
> default] 
> :0:0: note: this is the location of the previous definition 
> nssha1.c: In function âSHA1Cmdâ: 
> nssha1.c:536:5: warning: pointer targets in passing argument 2 of 
> âSHAUpdateâ differ in signedness [-Wpointer-sign] 
> nssha1.c:398:1: note: expected âconst unsigned char *â but argument is 
> of type âchar *â 
> nssha1.c:537:5: warning: pointer targets in passing argument 1 of 
> âSHAFinalâ differ in signedness [-Wpointer-sign] 
> nssha1.c:451:1: note: expected âunsigned char *â but argument is of type 
> âchar *â 
> nssha1.c: At top level: 
> nssha1.c:57:20: warning: âRCSIDâ defined but not used [-Wunused-variable] 
> /usr/local/aolserver451/bin/tclsh8.5 
> /usr/local/aolserver451/bin/nsremove.tcl libnssha1.so 
> gcc -shared  -O2 -Wall -Wno-implicit-int -fPIC  -pipe 
> -I/usr/local/aolserver451/include -I/usr/local/aolserver451/include 
> -DNO_CONST -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" 
> -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" 
> -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 
> -DHAVE_SYS_PARAM_H=1 -DUSE_THREA

Re: [AOLSERVER] What does invalid database_id mean?

2012-05-04 Thread Sep Ng
Thank you for your explanation Jeff.  I will continue to look for where the 
handle was released.  It must have happened on the same thread, yes?  The 
same thread that handled the request, yes?

On Saturday, May 5, 2012 12:58:40 AM UTC+8, Jeff Rogers wrote:
>
> Sep Ng wrote: 
> > Every once in a while on my aolserver logs, I find this error and I'm 
> > not sure what it means. Typically, I see it when performing a database 
> > operation and then aolserver drops into an error like: 
> > invalid database_id: nsdb0 
>
> This means that there is no handle associated with the key "nsdb0".  I'd 
> guess this is because something called [ns_db releasehandle] when you 
> weren't expecting it, but it's also possible that the handle was passed 
> to a different interpreter (e.g., through a nsv) rather than acquired 
> with [ns_db gethandle], which won't work. 
>
> > Is this related to another log entry: max connections exceeded? Is the 
> > database handle not valid? 
> > 
>
> It's unrelated.  "max connections exceeded" happens when a conn thread 
> has served as many requests as it is configured to do and exits. 
>
> -J 
>
> > Hoping someone can shed some light on the nature of this error. 
> > 
> > Thanks! 
> > 
> > 
> > 
> > 
> --
>  
>
> > Live Security Virtual Conference 
> > Exclusive live event will cover all the ways today's security and 
> > threat landscape has changed and how IT managers can respond. 
> Discussions 
> > will include endpoint security, mobile security and the latest in 
> malware 
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ 
> > 
> > 
> > 
> > ___ 
> > aolserver-talk mailing list 
> > aolserver-talk@lists.sourceforge.net 
> > https://lists.sourceforge.net/lists/listinfo/aolserver-talk 
>
>
> --
>  
>
> Live Security Virtual Conference 
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ 
> ___ 
> aolserver-talk mailing list 
> aolserver-talk@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk 
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


Re: [AOLSERVER] Strange issue with nsopenssl

2012-05-01 Thread Sep Ng
I'll just go ahead and post the solution to this problem.  Apparently 
there's a library conflict between my Oracle install and OpenSSL.  I solved 
it by setting LD_PRELOAD=/usr/lib/libcrypto.so.0.9.8 before running 
aolserver.

On Tuesday, May 1, 2012 11:16:24 AM UTC+8, Sep Ng wrote:
>
> Hi,
>
> I've been looking at one aolserver install which seems to be crashing when 
> I run with SSL certificates.  The weird thing is that if I run it as root, 
> the startup goes fine, which leads me to believe it is possibly a 
> permission issue.  The crash happens right when nsd attempts to generate 
> 512-bit keys.  Has this happened to anybody before?
>
> Thanks!
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


[AOLSERVER] Strange issue with nsopenssl

2012-05-01 Thread Sep Ng
Hi,

I've been looking at one aolserver install which seems to be crashing when 
I run with SSL certificates.  The weird thing is that if I run it as root, 
the startup goes fine, which leads me to believe it is possibly a 
permission issue.  The crash happens right when nsd attempts to generate 
512-bit keys.  Has this happened to anybody before?

Thanks!
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk


[AOLSERVER] What does invalid database_id mean?

2012-05-01 Thread Sep Ng
Every once in a while on my aolserver logs, I find this error and I'm not 
sure what it means.  Typically, I see it when performing a database 
operation and then aolserver drops into an error like:
invalid database_id: nsdb0

Is this related to another log entry: max connections exceeded?  Is the 
database handle not valid?

Hoping someone can shed some light on the nature of this error.

Thanks!
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk