Re: [AOLSERVER] Control Port on AOLserver 4.5

2008-06-10 Thread Vlad Seryakov

I assume you are running new Tcl, in nscp.c line 366
replace

res = interp-result;

with

res = Tcl_GetStringResult(interp);


Bernhard van Woerden wrote:
I'm trying out AOLserver4.5 on FreeBSD7 and can't get the control port 
to echo back the results of a command


e.g.

Welcome to nsd running at /usr/local/aolserver/bin/nsd (pid 1522)
AOLserver/4.5.0 (aolserver4_5) for freebsd built on May 23 2008 at 17:06:51
CVS Tag: $Name: aolserver_v45_r0 $
tlc:nscp 1 expr 2+2
tlc:nscp 2


Has anyone else seen this or know how to fix it ?
I'm not sure of this is FreeBSD specific but AOLserver 4.10 worked fine.


Many thanks
Bernhard

-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
[EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the 
email message. You can leave the Subject: field of your email blank.





--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Getting a handle on memory usage

2008-05-01 Thread Vlad Seryakov
Let me add my 2 cents as well as i have spent a lot of time trying to 
deal with ever-growing nsd process.


Currently i have nsd process (Naviserver) with size about 500Mb running 
without restart for 15 days.


Tcl compiled without Zippy, with standard malloc-family. I tried it with 
vtmalloc as well, the difference is not big, it gets shrinked faster but 
overall size-wise it is similar to just standard Linux malloc.


The only bug change i had to make to Naviserver is to intriduces timeout 
and max number of jobs to execute to the Tcl job facility and to 
scheduling thread. Conn threads are controlled by maxconn and etc, DB 
handles have idle and config parameters when to close connections. the 
only missing part was to let sched and tcljob cleanup their resources.


For example i use a lot ns_job and sch_schedXXX, that measn all Tcl 
interps allocted by sched and job threads stay forever and grow 
unconditionally.


But with limits and config parameters that tell those threads when to 
exit work perfectly. Hope those changes may be useful for aolserver code 
as well.


Maurizio Martignano wrote:

Dear all,
Sometime ago I made some tests on the memory leaks of
aolserver+tcs+openacs.

I'd like to share my two cents worth of what I believe I found, hoping it
might help.

Aolserver uses TCL, and TCL's got three different memory managers:

1. Standard: using the malloc, free, etc... primitives of the OS (not so
fast and not using a lot of memory)
2. Zippy: multithreaded primitives specially developed for TCL (very fast
but using plenty of memory - this is the default mechanism)
3. VTMalloc: another multithreaded implementation, developed by third
parties, and somehow in between Standard and Zippy for what concerns
efficiency and memory occupation. 


When using Zippy I noticed that the memory occupied by Aolserver (nsd)
always grows, without being released.

On the contrary when using the Standard memory allocator every now and then
memory gets released when not used. The total memory occupied by Aolserver
keeps growing but at a slower pace that in the previous case.

How to enable TCL Standard memory allocator?

Just call the following configure command:

configure -enable-threads

Then edit the Makefile, look for AC_FLAGS and remove from it the
-DUSE_THREAD_ALLOC=1 define (i.e. delete the string -DUSE_THREAD_ALLOC=1).

Compile everything, and see how it goes

With this change in place, I've seen some saving on the memory occupied by
nsd (around 30%).

Another point to look at very carefully is the overall system configuration
(config.tcl):
Parameters like

maxconnections
maxdropped
maxthreads
minthreads
threadtimeout

and

maxidle
maxopen
connections1 


have quite an effect on the total occupied memory.

Here there's no general recipe. My suggestion would be try to use the
smallest possible values that still allow the system to work.

Hope it helps,
Maurizio


-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED] On Behalf Of
Fenton, Brian
Sent: 01 May 2008 19:30
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Getting a handle on memory usage

Hi Titi,

I know Gustaf Neumann had a script to find application level leaks. If he
doesn't respond I can post it.

Brian

-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED] On Behalf Of
Titi Alailima
Sent: 01 May 2008 17:31
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Getting a handle on memory usage

This isn't a very helpful response.  I'm not even asking about ongoing
memory growth and overhead, at least not yet.  I want to know what are the
parts that we (or at least some of us) _do_ understand and how can we at
least calculate those things so that:
1. we even have a sense of how much memory is being eaten up by things we
don't know
2. we know at least roughly what sort of impact we can make by adjusting the
parts we do know

As for these test workloads, can someone enlighten me more as to what they
might look like and how they would be used?  Depending on what is involved,
I or someone I know may be able to figure something out to get us started in
the right direction.

Titi Ala'ilima
Lead Architect
MedTouch LLC
1100 Massachusetts Avenue
Cambridge, MA 02138
617.621.8670 x309



-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED] On
Behalf Of Dossy Shiobara
Sent: Wednesday, April 30, 2008 3:10 PM
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Getting a handle on memory usage

On 2008.04.30, Titi Alailima [EMAIL PROTECTED] wrote:

What are the best ways of figuring out how the memory usage in
AOLserver is broken down?  [...]

There's lots of overheads all over the place.  Each Tcl_Obj structure,
every Tcl_DString buffer ... the AOLserver driver thread and all its
structures used to manage state ...

All these little things should (in theory) be inconsequential compared
to the larger picture of the application's memory usage, but 

Re: [AOLSERVER] [naviserver-devel] nsdbi database driver interface 0.1

2008-04-17 Thread Vlad Seryakov

This is very cool,

Can you commit it into primary Naviserver CVS?

Stephen Deasey wrote:

nsdbi is a database driver interface for naviserver. It provides
native bind variable support, transparent prepared queries and handle
management, runtime configuration, statistics, and a few other things.

There are drivers for postgres, mysql and sqlite. There's also a stub
driver included for testing, fault injection etc.

It relies on a few utility routines in naviserver, but it wouldn't be
too hard to port those to aolserver, should anyone want to.


Here's a snapshot of the man page:

  http://www.groks.org/nsdbi.n.html

Tarballs:

  http://www.groks.org/nsdbi-0.1.tgz
  http://www.groks.org/nsdbipg-0.1.tgz
  http://www.groks.org/nsdbimy-0.1.tgz
  http://www.groks.org/nsdbilite-0.1.tgz

Mercurial repositories:

  http://freehg.org/u/groks/nsdbi/
  http://freehg.org/u/groks/nsdbipg/
  http://freehg.org/u/groks/nsdbimy/
  http://freehg.org/u/groks/nsdbilite/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

___
naviserver-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] [naviserver-devel] nsdbi database driver interface 0.1

2008-04-17 Thread Vlad Seryakov

Oops, sent to wrong list.

Is it ready for use or ready to switch to from old ns_db?

Would be cool to have in in the CVS

Stephen Deasey wrote:

nsdbi is a database driver interface for naviserver. It provides
native bind variable support, transparent prepared queries and handle
management, runtime configuration, statistics, and a few other things.

There are drivers for postgres, mysql and sqlite. There's also a stub
driver included for testing, fault injection etc.

It relies on a few utility routines in naviserver, but it wouldn't be
too hard to port those to aolserver, should anyone want to.


Here's a snapshot of the man page:

  http://www.groks.org/nsdbi.n.html

Tarballs:

  http://www.groks.org/nsdbi-0.1.tgz
  http://www.groks.org/nsdbipg-0.1.tgz
  http://www.groks.org/nsdbimy-0.1.tgz
  http://www.groks.org/nsdbilite-0.1.tgz

Mercurial repositories:

  http://freehg.org/u/groks/nsdbi/
  http://freehg.org/u/groks/nsdbipg/
  http://freehg.org/u/groks/nsdbimy/
  http://freehg.org/u/groks/nsdbilite/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

___
naviserver-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-26 Thread Vlad Seryakov

Thank you, i was experimenting yesterday and i think i got it working
right, but with 0.64+ version.
With versions 0.63+ DB_Cancel should call
tds_process_simple_query to clear pending results, tds_freeall_resulst
does not do this.

Ian Harding wrote:

Sorry, that was not really right.

The severity level of an error message provides an indication of the
type of problem that Microsoft(r) SQL Server 2000 has encountered.

 Severity level 10 messages are informational  and indicate problems
caused by mistakes in the information you have entered. Severity
levels from 11 through 16 are generated by the user, and can be
corrected by the user.

I remember experimenting and finding that it was safe to consider
error levels 1 - 10 Notice information and  10 always indicating a
real Error that should be returned to the caller.

On 5/25/05, Ian Harding [EMAIL PROTECTED] wrote:


10 indicates a critical error.


On 5/25/05, Vlad Seryakov [EMAIL PROTECTED] wrote:


Why msg_level  10, why 10, and not 0?

Ian Harding wrote:


Vlad,

I installed 0.63 and compiled and installed your module.

It seems to work fine, but has a glitch I ran into as well which is
that it doesn't return error codes when something went wrong with the
query itself.  For example, with my hack I get this

SQL:

   SELECT cast('foo' as int)

Results:

   error: Database operation exec failed (exception NSDB, Syntax
error converting the varchar value 'foo' to a column of data type
int.)

Rows affected: -1

With your version I get

SQL:

   SELECT cast('foo' as int)

Results:

Rows affected: -1

While the log indicates
[25/May/2005:12:46:20][17746.1090534320][-conn:server1::0] Notice:
Db_Msg_Handler(fundware): Syntax error converting the varchar value
'foo' to a column of data type int.

This has to do with a fundamental change in error handling where
non-network communication errors are not errors to freetds anymore.
They are simply passed back to the application for it to handle.

Here is my hack which seems to work but may be terribly wrong for other reasons.

int
Ns_FreeTDS_Msg_Handler(TDSCONTEXT *ctx, TDSSOCKET *tds, TDSMESSAGE *msg)
{
   Ns_DbHandle *handle = (Ns_DbHandle *) tds-parent;

   Ns_Log(Notice, nsfreetds: Ns_FreeTDS_Msg_Handler(%s): %s,
   handle-datasource, msg-message);

// Begin hack
   if ( msg-msg_level  10 )
   Ns_DbSetException(handle, NSDB, msg-message);
// End hack

   return 0;
}




On 5/25/05, Vlad Seryakov [EMAIL PROTECTED] wrote:



Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  ns/db/pool/cbill
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
   host = cbill
   port = 1433
   tds version = 7.0

Cory Grimster wrote:



Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the could not allocate a handle from database pool pool4
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
  ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
  ns_parampool4  FreeTDS Pool

ns_section ns/db/pool/pool4
  ns_parammaxidle10
  ns_parammaxopen10
  ns_paramconnections5
  ns_paramverbose$debug
  ns_paramextendedtableinfo  true
  ns_paramlogsqlerrors   $debug

  ns_paramdriver freetds
  ns_paramdatasource fooserver [also tried fooserver:bardb]
  ns_paramuser   sa
  ns_parampassword   bazpassword

ns_section ns/server/${server}/db
  ns_parampools  *
  ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc

Re: [AOLSERVER] nsfreetds

2005-05-26 Thread Vlad Seryakov

real sybase driver is external driver working via db proxy, much
slower and spawns separate process for every new DB connection.

Bas Scheffers wrote:

Just out of curiosity, what is the advantage of using nsfreetds for Sybase
over the real sybase driver?

Cheers,
Bas.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-26 Thread Vlad Seryakov

We used to run native sybase driver using proxy a while ago then
switched to nsfreetds. It used to run fine, but it did not support MS
SQL servers, so nsfreetds was the only choice. Now we've been using
nsfreetds for several years with MS SQL 2000.

Bas Scheffers wrote:

And drawbacks? Like compatibility, reliability?

Vlad Seryakov said:


real sybase driver is external driver working via db proxy, much
slower and spawns separate process for every new DB connection.

Bas Scheffers wrote:


Just out of curiosity, what is the advantage of using nsfreetds for
Sybase
over the real sybase driver?

Cheers,
Bas.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.





--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  ns/db/pool/cbill
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:

Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the could not allocate a handle from database pool pool4
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  FreeTDS Pool

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  *
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

It is a fork, see ChangeLog for more info, no website or any formal info
at this point yet.

Xavier Beaudouin wrote:

Humm

What is the difference between naviserver and aolserver... ?

/Xavier
Le 25 mai 05 à 20:25, Vlad Seryakov a écrit :


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  ns/db/pool/cbill
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several
people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of
FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft
SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the could not allocate a handle from database pool pool4
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give
me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now
and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the
nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  FreeTDS Pool

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  *
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc,
which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.



--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Do you have any errors at the server startup associated with nsfreetds?
Also, every time i open nsdb with freetds, i issue use database to
open appropriate
SQL server database to use.

Cory Grimster wrote:

I've tried FreeTDS 0.63 with Vlad's modified version of nsfreetds and am
still getting a database configuration error page, this time telling me
that ACS could not determine the RDBMS type associated with pool
pool4..

FreeTDS itself is configured correctly; after following Ian's advice
(thanks!) about typing go; after each SQL command at the tsql prompt,
I can select a database and run simple queries.

I appreciate the advice and am happy to have tsql returning results :)
If anyone has any further ideas on what might be keeping nsfreetds from
working I'd love to hear them :)

Thanks for all the help so far,

-Cory


Vlad Seryakov wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  ns/db/pool/cbill
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the could not allocate a handle from database pool pool4
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  FreeTDS Pool

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  *
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.




--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Why msg_level  10, why 10, and not 0?

Ian Harding wrote:

Vlad,

I installed 0.63 and compiled and installed your module.

It seems to work fine, but has a glitch I ran into as well which is
that it doesn't return error codes when something went wrong with the
query itself.  For example, with my hack I get this

SQL:

SELECT cast('foo' as int)

Results:

error: Database operation exec failed (exception NSDB, Syntax
error converting the varchar value 'foo' to a column of data type
int.)

Rows affected: -1

With your version I get

SQL:

SELECT cast('foo' as int)

Results:

Rows affected: -1

While the log indicates
[25/May/2005:12:46:20][17746.1090534320][-conn:server1::0] Notice:
Db_Msg_Handler(fundware): Syntax error converting the varchar value
'foo' to a column of data type int.

This has to do with a fundamental change in error handling where
non-network communication errors are not errors to freetds anymore.
They are simply passed back to the application for it to handle.

Here is my hack which seems to work but may be terribly wrong for other reasons.

int
Ns_FreeTDS_Msg_Handler(TDSCONTEXT *ctx, TDSSOCKET *tds, TDSMESSAGE *msg)
{
Ns_DbHandle *handle = (Ns_DbHandle *) tds-parent;

Ns_Log(Notice, nsfreetds: Ns_FreeTDS_Msg_Handler(%s): %s,
handle-datasource, msg-message);

// Begin hack
if ( msg-msg_level  10 )
Ns_DbSetException(handle, NSDB, msg-message);
// End hack

return 0;
}




On 5/25/05, Vlad Seryakov [EMAIL PROTECTED] wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  ns/db/pool/cbill
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the could not allocate a handle from database pool pool4
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
   ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
   ns_parampool4  FreeTDS Pool

ns_section ns/db/pool/pool4
   ns_parammaxidle10
   ns_parammaxopen10
   ns_paramconnections5
   ns_paramverbose$debug
   ns_paramextendedtableinfo  true
   ns_paramlogsqlerrors   $debug

   ns_paramdriver freetds
   ns_paramdatasource fooserver [also tried fooserver:bardb]
   ns_paramuser   sa
   ns_parampassword   bazpassword

ns_section ns/server/${server}/db
   ns_parampools  *
   ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
   query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave

Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Who is logging this message, i could not find it in FReeTDS and AS?
Is this your application?
Notice: Database API: couldn't determine RDBMS type of database pool
pool4.

Cory Grimster wrote:

ndsfreetds.so seems to load fine:

Notice: Db_DriverInit(freetds):  Loaded FreeTDS Driver v0.5, freetds v0.63

It looks like the server is able to connect to the database, but
something goes wrong after that:

Notice: dbdrv: opening database 'freetds:fooserver'
Notice: Db_Msg_Handler(osaka): Changed database context to bardb'.
Notice: Db_Msg_Handler(osaka): Changed language setting to us_english.
Notice: Database API: couldn't determine RDBMS type of database pool
pool4.


Vlad Seryakov wrote:


Do you have any errors at the server startup associated with nsfreetds?
Also, every time i open nsdb with freetds, i issue use database to
open appropriate
SQL server database to use.

Cory Grimster wrote:


I've tried FreeTDS 0.63 with Vlad's modified version of nsfreetds and am
still getting a database configuration error page, this time telling me
that ACS could not determine the RDBMS type associated with pool
pool4..

FreeTDS itself is configured correctly; after following Ian's advice
(thanks!) about typing go; after each SQL command at the tsql prompt,
I can select a database and run simple queries.

I appreciate the advice and am happy to have tsql returning results :)
If anyone has any further ideas on what might be keeping nsfreetds from
working I'd love to hear them :)

Thanks for all the help so far,

-Cory


Vlad Seryakov wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  ns/db/pool/cbill
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several
people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of
FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft
SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the could not allocate a handle from database pool pool4
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me
any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now
and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds
FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  FreeTDS Pool

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  *
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.






--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body

Re: [AOLSERVER] Asterisk and AOLserver

2005-02-09 Thread Vlad Seryakov
While reading the previous postings I stumbled upon multiple mentioning of
multi protocol support and asterisk, therefore I assume people on this list
are knowledgeable about this topic.
Here is what we need:
We run a CRM system on top of AOLserver. The CRM system contains the phone
numbers of the clients. I want my PBX connected phone to make a connection
to the client if I click on a link in the CRM System. Once the phone call is
finished, the CRM system should be notified about this, so it can add a new
entry in the call history.
Same goes the other way round, if the client calls me, the CRM systems
starts logging and once finished, an entry is added.
Any clues, hints, offers, suggestions, RTFM advises on how to achieve this ?
I did not reach that point yet, i just implemented UDP support and SIP
module and perform SIP redirects
using flexible rules where to forward the call.
The functionality you are looking for will depend on your PBX, how you
can place or receive calls.
In case of VoIP you have more options than with traditional PSDN PBX,
you can use softphone
to initiate and receive calls, and using SIP you can easily forward
calls to next available CSR.
But this is a lot of work, i did not see anything yet in the open source.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] AOLserver facelift.

2005-02-07 Thread Vlad Seryakov
So, for a moment, ignore the existance of AOL.  What does the rest of
the AOLserver Community think about your patches?  I don't mean people
just saying oh, we think Vlad's patches are great -- I mean, who else
has written code that needs to run on a version of AOLserver built with
your patches?  (This is my actions speak louder than words principle.)
If no code nobody will use it, it needs to be developed first and then
other people will notice it and may try it.
For example, i made binder to support all kinds of sockets, not just TCP,
UDP/UNIX/RAW. Before if you need UDP server you will have to write module or
separate process, now you can use AS API. This give opportunities for
others
to develop different applications, not Web apps but server apps.
Please explain what the difference is between being just a webserver
and being a full-blown application server.  Isn't a web server that
serves web applications, by definition, a kind of application server?
By virtue of its name, at minimum a web application server?
By application server i mean you can built not only web applications,
more exactly, the server does not necessary accepts only HTTP requests.
This is, of course, the benefit of having a very flexible, easily
extendable and highly modular architecture.  Only stuff that needs to be
part of the core in order to function should go there.  And, as time
goes on, you may likely see even more and more functionality come out of
the AOLserver core into their own independent modules.
It's been 5 years and we still have same AOLserver distirbution since 3.3.1,
same functionality, it took how long to accept aD patches into mainline?
A list of contributed AOLserver modules (for lack of a better name)
has been up on the wiki for a while:
http://panoptic.com/wiki/aolserver/Modules
Many of the modules listed were not developed by AOL!  That's a
significant contribution from outside of AOL, for a project that so many
people criticize as not being friendly to non-AOL contributions.  Is
the argument here that those modules should be integrated into the core?
Do you really think that makes sense?  I'm all in favor for an even more
lightweight core, but maybe others aren't?
I contributed myself 12 modules (i have more in my repository) and they
are active,
but that's my point exactly, if you have to implement something not
simple or different as
AS module, AOLServer architecture does not allow you to do this without
changing the core.
On ther hand, not everybody needs it, maybe only 1% from all users will
need from AS non-web only functionality,
so, may be keeping core as is would be the best thing and having only
one version in the SF.
Maybe completley different version/fork with its own plans and not
associated with AOLserver
is the only way?
I was not trying to break AOLServer community, that was my personall
opinion and actually i do not expect anything from
AOL or Core developers, i am sorry if i offended somebody.
I will continue to use AOLserver, extend it, keep my patches and
contributing new modules.
I just gave up participating in SF tracker thing.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] AOLserver facelift.

2005-02-06 Thread Vlad Seryakov
Oh yes! See, our app is written entirely arround it and the web-part is
about 20% of the total (the web-based config GUI). All other is
combination of C/Tcl modules. It is well suited for what we're
doing because of the speed of C and ease of development in Tcl.
We considered writing our own app-server way back in 1999 but then AS got
open-sourced. This saved us lots of time and trouble. Since then
I'm trying to help with the project to give something in return.
I would also love to see this project evolves since we're betting our
company on it. I also think (we have proved it) that AS can be a very
powerful application server. It would be the pitty to neglect this
potential. Sure would be a huge problem for us.
Same here, our system is based on AOLServer platform and Web gui is only
top of the iceberg, the core does all stuf like network/device
provisioning, various background tasks. It is all different C/Tcl
modules and having them developed under one platform, using same C and
Tcl languages is a big susccess. Administration of such system is a
breeze, very stable and fast.
The only missing part is reentrant expect, for this external expect
process should be called. For big complex systems it is natural to
extend aolserver from its web-only roots, in many cases it is just
extending API, the big modification is driver change, making it more
flexible and not HTTP-only will open doors for aolserver to get to
application server market.
May be having two different versions is a solution, but keeping it as
simple webserver and constantly talking how to make it more popular is
useless, apache is there already, installation and configuration is much
simpler, documentation is complete. Webserver which is more complicated
in everything serving Web pages does not have any chances even among
developers, i am not talking about people who wants just to try it
before starting development.
What are AOL's direction and plans for AOLServer?
If AOL will say that it wants to keep it as is, just stable webserver,
AOL is not interested in extending it, then others who think it should
be extended will decide how to proceed. At least it would be fair, i've
been hoping that aolserver may be extended for the last 2 years but it
never happened, AOL rewrites HTTP driver with every version, squeezing
from it another 0.009 miliseconds to serve web pages and making it more
and more HTTP specific. AOL web farms are unique, i do not think there
will be sites something like it ever, and those sites will not need that
kind of performance, but keeping aolserver in this way prevents others
to use it more widely and what is more important adding new features.
So, what is the answer?
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] AOLserver facelift.

2005-02-05 Thread Vlad Seryakov
Spend some time thinking about it, and when you have a better idea of
what that something actually is, tell us all about it.  We're all
listening.
In my case something is: i feel that contributing into AOLServer
project feels like asking permission from AOL, is AOL willing to accept
or even consider whatever additions i am offering. In most case they
will be rejected because of stability, direction, code style or pure
messed up code. I understand that AOL pays core developers but i think
this is what makes me feel this is not open-source project, this is AOL
project with open sources. It is not bad and AOL benefits from this
greatly, so many free QA/testers but still, AOLserver goes in the
direction at least i do not agree with.
I think AOLServer should not be pure webserver, just another webserver
even running by AOL, still just another webserver, it has potential to
be full-blown application server.
I support my patches and develop different version of aolserver,
allowing differnet protocols, for example HTTP or SIP over UDP, but i am
sure AOL will not accept them, so i keep them to myself. There are many
small improvements can be done and i 've done a lot of them, binder for
example, many modules. They are public but still, core is what AOL provides.
I am not saying the word fork, but it may happen.

If you're being intentionally vague about what something is, and
something refers to me and my leadership of this project, then please
just say so.
You are great project leader, no doubt, you just work for AOL, it is
very noticable.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] core server design docs

2005-02-05 Thread Vlad Seryakov
I believe you are talking about the iovec scatter/gather method, which
reads/writes from multiple buffers in a single call. It should be much faster
for a lot of applications, especially UDP. Likely you have to change one line
of code to change nssock into a UDP module (of course it might be nice to do
that from a config file setting, which is probably what Vlad did if he has
written a SIP server).
Change in the nssock driver is minimal, because UDP is much simpler,
just one packet, more changes are in the driver itself, i introduced
socket type and some buffers.
I can publish the patches, they work fine with asterisk and ser and sipura.
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Monitoring setups

2004-09-09 Thread Vlad Seryakov
I wrote and use OSSMON, http://www.crystalballinc.com/vlad/software/ossmon/
Live demo is available.
Sorry for advertisement, but i answering the question:-)))
Alfred Werner wrote:
General Query -
What are people using to monitor running AOLserver instances? I am
currently setting up an RRDtool/Cacti setup for a Peoplesoft/Oracle
environment and wondered if people were running similar (or better :)
configs for AOLserver.
Alfred Werner
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-17 Thread Vlad Seryakov
This is what i 've done with my first version of SMTP driver, i wrote it
in pure Tcl. Performance was terrible, the site was serving
thousands of incoming SMTP connections and it was very slow. Second
version was doing pretty same stuff but in C, i registered TCP callback
and create new thread for each new connection. Not much a difference.
Only after i started using AOLServer's thread pools and
connection manager, performance issues disappear. So if new protocol
does not serve thousands of connections, Tcl/TCP callback
solution works just fine.
Dossy Shiobara wrote:
On 2004.08.17, Zoran Vasiljevic [EMAIL PROTECTED] wrote:
So, all of you interested in extending AS to handle non-http
protocols, please go, have a look and give some feedback.

Just the other night, I had the need to implement a non-HTTP server in
AOLserver in order to implement the TiVo beacon connection for the
Home Media Option (MHO) feature of the Series2 TiVo.  I thought about
both Vlad's and Stephen's approaches, and decided I'd rather stay
pure-Tcl instead.  Here's what I came up with:
proc tivo.init {} {
# ...some setting of nsv config vars here...
ns_thread begindetached tivo.beaconThread
}
proc tivo.beaconThread {} {
set address [nsv_get tivo address]
set beaconport [nsv_get tivo beaconport]
ns_log notice TiVo beacon listening on $address:$beaconport
set master [ns_socklisten $address $beaconport]
while {![nsv_get tivo shutdown]} {
foreach {rfd wfd} [ns_sockaccept $master] break
ns_chan create $rfd $rfd
ns_chan create $wfd $wfd
ns_thread begindetached [list tivo.beacon $rfd $wfd]
}
close $master
}
tivo.beacon {rfd wfd} {
ns_chan get $rfd
ns_chan get $wfd
# ... do actual beacon exchange ...
# connection must remain open, so we just poll until the remote
# side disconnects.
while {![nsv_get tivo shutdown]} {
set sel [ns_sockselect -timeout 2 $rfd {} {}]
if {[llength [lindex $sel 0]]} {
read $rfd 1
if {[fblocked $rfd] || [eof $rfd]} {
ns_log notice TiVo: Beacon disconnected.
break
}
}
}
close $rfd
close $wfd
}
The gist of this is that:
1. Can't use [ns_socklistencallback] since our connection handler keeps
   the connection open, and that would block the thread that executes
   the callback handler.
2. At server start-up, we create a thread to just accept connections
   which creates new threads to process those connections.
3. We use [ns_chan] to detach/attach Tcl channels to the socket fd's in
   order to pass them from the master thread to the slave threads.
So far, this has been working really well for me.  No modification to
the core involved, and it's implemented in very few LOC overall.  Using
the same pattern, I could easily implement an SMTP, IMAP, etc., server
in pure Tcl.  I'm not sure what the real performance difference there
would be compared to the two proposals that require C code changes in
the core: as long as the actual functionality is implemented in a Tcl
callback that gets invoked from the C code, the performance difference
is probably negligible.
On a side note: if you have a Series2 TiVo with Home Media Option, and
want to serve content to it from AOLserver ... I've got a module that
works (but is far from complete) that does it.  :-)
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-17 Thread Vlad Seryakov
It is not thread pools by itself but more reusing existing thread pools.
If you have AOLServer thread pools and Tcl thread pools and if you have
100 connections always connected to the server and using SMTP and HTTP
(this is my case) both AOLServer pools and Tcl pools would
compete for the same resources.
I do not have Tcl implementation, it was more than 1 year ago and i did
not save old experimental code.
Dossy Shiobara wrote:
On 2004.08.17, Vlad Seryakov [EMAIL PROTECTED] wrote:
Only after i started using AOLServer's thread pools and
connection manager, performance issues disappear.

Perhaps I should share code to implement thread pools in pure Tcl?
Do you still have your pure Tcl implementation of your SMTP server?
Would you be interested in hooking a thread pool implementation up to it
and see how it performs?
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-17 Thread Vlad Seryakov
Time and energy have been already spent by implementing/testing those
patches, why are we circling around that somebody need
to spend efforts to make AOLServer worse HTTP server and better non-HTTP
server. Nobody needs to do anything, AOLServer
still remains http server, those patches do not even change HTTP
processing a bit, they only add additional functionality
which co-exists with existing infrastructure making AOLserver more
versatile environment.
Regarding sendmail list:
We use AOLserver with SMTP in front of sendmail and postfix, as MX
server,  and same aolserver provides us with nice Web interface which
simplifies administration to just one server and even that
administration goes through Web interface. It is a lot of man-hours for
sendmail
administrators to achive same level functionality with
sendmail/apache-or-another-web-server.
I do not vote but regardless of the decision i will maintain my
multi-protocol version of AOLServer4 (i have many production servers).
Dossy Shiobara wrote:
On 2004.08.17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  IMO, this is all BS. I don't mean any disrespect, but if I wanted
a mail server, I'd install a mail server. I don't go on the sendmail
list screaming for it to support http :)

Let me rephrase what I think Donald was trying to say, but without the
edgy-ness:
If we could focus our energies on making AOLserver a better HTTP
server, that would be really cool.
It's the needs of the many vs needs of the few issue -- yes, making
AOLserver a better non-HTTP server serves the needs of the few, but if
we're going to spend time and energy, why can't we do it to make
AOLserver a better HTTP server than it already is?  That would benefit
far more people who already use AOLserver ...
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-17 Thread Vlad Seryakov
] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] AOLSERVER Digest - 10 Aug 2004 to 11 Aug 2004 (#2004-171)

2004-08-13 Thread Vlad Seryakov
I think everyone would benefit if AOLserver includes some kind
templating solution without installing whole OpenACS system.
Strip down templating with several usefull tags like if include
multirow list and etc would put AOLServer on the same level
as PHP/Perl with Apache systems regarding templating. I can provide
small version of my templating system which is kind of
similar to OpenACS, it can work without any external dependencies. No
documentation but good examples will be a good start.
Robert Seeger wrote:
Comments below:
Bas Scheffers wrote on 8/13/2004, 3:45 AM:
  IRA said:
   It's just this sort of problem that makes me wonder if the people
  building aolserver ever actually USE aolserver to build web
   applications.  It seems like not that big of a deal . . . until you
  realize that we do this ALL THE TIME.
  I could get as nasty and you and wonder why you are writing AOLserver
  apps
  when you don't actualy know Tcl.
People get grumpy when something is a continuous hassle to them. I'd
rather work with the assumption that it was grumpy humour, rather than
nastiness. :)
 
  ns_puts a href=\$link\link/a
  Can be written without the quotes simply by doing this:
  ns_puts [subst {a href=$linklink/a}];# No escapes required!
True, but subst does still require an amount of escaping in various
situations. For example:
# Lets output some financial data
# We need to escape the $ for the monetary units
ns_puts [subst {
 tr
 tda ref=link[set $i]Item $i/a/td
 td\$$amount($i)/td
 /tr
}
# We need to escape the [ and ] for negative amounts
ns_puts [subst {
 tr
 tda ref=link[set $i]Item $i/a/td
 td\$\[$amount($i)\]\$/td
 /tr
}
# {} need to be escaped too, if they come up
So, its not as simple as not needing to escape things. There's just less
to escape.
 
  Secondly:
 
  %
  if ($condition) {
  %
  This html
  %
  } else {
  %
  This other html
  %
  }
  %
 
  Makes for the most hideous, unreadable and unmaintainable code ever
  concieved and should be avoided at all cost if you have any interest in
  writing quality code.
For that type of output, yes its not the best choice. However, there are
situations where doing it inside an ns_adp_puts is the more hideous of
the choices. For example:
table
%
foreach row $rows {
foreach {
item1 item2 item3 item4 item5 item6 item7
} $row {break}
### Output a lot of html for each row of data
%
tr
   !-- 30 lines of html here that output the items
 -- and the form elements involved with them
 --
/tr
%
### Done with row
}
%
/table
 
  Tcl is called a procedural language, best to use it that way and create
  loads of nice little procedure to create html. Surely,
 
  set table_list [list 1 [link http://aol.com AOL]]
  lappend table_list 2 [link http://genie.com Genie]
  lappend table_list 3 [link http://msn.com MSN]
  ns_puts [create_table -cols 2 -style linktable $table_list]
 
  is a lot more elegant and maintainable than writing all the tags
  yourself?
  (let alone using ASP style tags)
Very much so, at least for links. Do we actually have a nice, robust
library of procedures that can produce complex html with a simple
syntax? If so, thats great and I'd be happy to hear about it. If not,
then every single person who uses the server to create pages making
their own helper procs is just a source of server bloat.
Even with a good library, there are still some things that are better
written in plain html. Its all about making the resulting page easily
readable and maintainable, in my opinion.
Rob Seeger
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] AOLSERVER Digest - 10 Aug 2004 to 11 Aug 2004 (#2004-171)

2004-08-13 Thread Vlad Seryakov
Here is the list of general purpose tags that do not need additional Tcl
procs/packages:
master
slave
include
list
return
continue
exit
if
else
All db related tags (multirow,multipage,group) are very usefull but they
will need db procs to be included as well.
Dossy Shiobara wrote:
On 2004.08.13, Vlad Seryakov [EMAIL PROTECTED] wrote:
I think everyone would benefit if AOLserver includes some kind
templating solution without installing whole OpenACS system.
Strip down templating with several usefull tags like if include
multirow list and etc would put AOLServer on the same level
as PHP/Perl with Apache systems regarding templating. I can provide
small version of my templating system which is kind of
similar to OpenACS, it can work without any external dependencies. No
documentation but good examples will be a good start.

I think just an off-the-shelf taglib via ns_adp_registertag would be
great, like you suggest.
Can we come up with a list of tags and what they should do, then we can
discuss the pro's and con's of the behaviors, then once we're agreed on
a sane set of tags, folks can implement them.
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Anyone using C++ in TCL callbacks?

2004-08-10 Thread Vlad Seryakov
I use C++ in my modules nssnmp and nschartdir without any problems. I
just changed LD to g++ and
it compiled and runs okay.
Dossy Shiobara wrote:
On 2004.08.10, David Pautler [EMAIL PROTECTED] wrote:
  We have been trying to find a way to use C++ instead of C in our TCL
  callbacks, but these all fail to load in the server:
[09/Aug/2004:09:52:10][2080.1][-main-] Error: tcl: source
  /export/home/foo/aolserver4.0.5_tcl8.4.4_opt/modules/tcl
  This happens even when the files are pure C within a C++ skin using
  extern C, with no reference to any C++ objects...they contain only
  function names and return's.
  We're not sure if this is a problem with g++ or cmbuild.  It happens
  on both Solaris and Linux.
  Has anyone had success?

I know the Mapquest folks have written a C++ module for AOLserver and
they've had their fair share of issues to overcome.  I'll mail you
off-list and put you in contact with the person I know who worked on it.
Particularly, there's issues with throwing C++ exceptions from within
a multithreaded application as well as g++ and libgcc.so issues.
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Generating .pdf Files on the Fly

2004-07-14 Thread Vlad Seryakov
We are doing it using AwareReports http://www.awaresw.com, but we bought
their product, it is comercial.
We are calling external program now, but they have C++ API and we
started writing aolserver module for it, just never finished.
It is very fast and supports Excel, PDF, PS formats.
Nathan Folkman wrote:
Is anyone doing this? More importantly, is anyone doing this via Tcl?
Any pointers would be appreciated. Thanks!
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] Fun: Fortune module

2004-07-14 Thread Vlad Seryakov
Can be used for fun :-))
I uploaded fortune module, similar to Unix fortune command, uses same
files and returns random epigrams.
http://www.crystallballinc.com/vlad/software/
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Windows Services for UNIX

2004-07-13 Thread Vlad Seryakov
I'been running 4.0b5 for more than a year in the production under very
high load without any problem.
Andrew Piskorski wrote:
On Tue, Jul 13, 2004 at 06:13:05PM +0200, Wojciech Kocjan wrote:

I thought native Windows isn't supported starting with 4.0?

That hasn't been true for a long while now.  Back sometime before the
official 4.0 release, all the Windows support was taken out for a
while (I assume in order to simplify making other changes), then it
was later put back in.  AOLserver 4.0.5 itself (not sure about most of
the modules) compiles and run just fine on Windows - barring of course
a few open bugs.
I think I was told some time ago that 4.0.5 actually supports Windows
better than the 3.x series.  Someone who knows more (e.g., Jamie,
Dossy, or Vlad) correct me if that's wrong...
--
Andrew Piskorski [EMAIL PROTECTED]
http://www.piskorski.com/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] listen on both port 80 and 443

2004-07-01 Thread Vlad Seryakov
Did you try ?
nsd -t nsd.tcl -b 0.0.0.0:443,0.0.0.0:80
sgs wrote:
Hi,
I like to start aolserver using port 80 and nsopenssl using port 443.
I've configured the nsopenssl section properly.  When I run nsd I use
the following command line:
*
nsd -t nsd.tcl -b 0.0.0.0:80
*With this, I get an error message saying I don't have permission to run
on port 443.  So, I tried the following to see what happens:
*nsd -t nsd.tcl -b 0.0.0.0:443
*Now, https works fine, but port 80 give me permission problems.
How can I run or configure aolserver such that I can listen to 80 and
443?  When I changed the https port to 8443, it works fine.  That is, I
can connect to port 80 and 8443 (provided I run nsd with -b 0.0.0.0:80).
I also tried the following:
*nsd -t nsd.tcl -b 0.0.0.0:443 **-b 0.0.0.0:80
*That only bound to port 80.
Any suggestions please?
thanks,
sgs.
-- AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the
email message. You can leave the Subject: field of your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] ANN: aspell interface module

2004-07-01 Thread Vlad Seryakov
Hello,
For those who is interested, i released new module nsaspell, interface
to aspell for AOLserver.
Download it from http://www.crystalballinc.com/vlad/software/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Intermittent hangs without a message

2004-06-30 Thread Vlad Seryakov
We are running aolserver on Redhat 7.3, 8.0 and Mandrake 10 and never
got this problem.
RH machines uses older glibc with LinuxThreads and Mandrake uses NPTL.
Might be specific to that particular glibc versions, they used to have
many bugs in early versions.
What does your patch do to fix that problem? Just curious.
Dossy wrote:
On 2004.05.21, Fen Tamanaha [EMAIL PROTECTED] wrote:
   We're seeing the dead thread problem under SuSE 7.3 (Linux
2.4.10-64GB-SMP) and 8.1 (2.4.19-64GB-SMP), but not under 9.0
(2.4.21-99-smp4G) or Solaris.

Recent research of mine might have identified what the issue is.  What
version of glibc is installed on those three versions of SuSE?  I'm
betting 9.0 uses glibc 2.3, and the others use an earlier glibc.
glibc 2.3 uses NPTL unless LD_ASSUME_KERNEL is set.  Earlier glibc uses
LinuxThreads, which exhibits this dead thread problem.
I believe I have a fix for this on Linux with LinuxThreads -- if you
can still reproduce this problem on the older non-NPTL SuSE Linux
machines, I'd like to send you a patch to test.
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] [AOLSERVER-COMMITS] aolserver Makefile,1.45,1.46

2004-06-29 Thread Vlad Seryakov
Oops, sorry, an accident.
Dossy wrote:
On 2004.06.29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
! dirs   = nsthread nsd nssock nsssl nscgi nscp nslog nsperm nsdb nsext nspd nscache nssha1 nspostgres

Please don't add non-core modules (i.e., nscache, nssha1, nspostgres) to
the core Makefile as build targets.

 all:
   @for i in $(dirs); do \
!   ( cd $$i  $(MAKE) all NSBUILD=1) || exit 1; \
   done

Also, don't pass NSBUILD.  Modules should use include/Makefile.build
(which defines NSBUILD=1 before including include/Makefile.module).
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] shutdown failure on Windows

2004-06-24 Thread Vlad Seryakov
See bug report
http://sourceforge.net/tracker/index.php?func=detailaid=772649group_id=3152atid=103152
about similar problem i had with Windows. After that fix i've never had
any problem with shutdown and i
do shutdown of Aolserevr on Win2000 every night for more than a year
because of other buggy DLL.
Andrew Piskorski wrote:
With the stock AOLserver 4.0.5 on Windows XP (running inside VMware on
Linux), I'm seeing a problem where sometimes AOLserver will not shut
down.  It gets this far in the log:
[24/Jun/2004:16:16:28][3636.1652][-main-] Notice: nsmain: AOLserver/4.0.5 stopping
but then keeps running indefinitely, and must be kill -9'd (well, the
Windows Terminate Process equivalent) in order to get rid of it.
The problem seems to be triggered by running ns_sendmail.  If I've run
ns_sendmail at least once, AOLserver won't shut down.  If I have never
run ns_sendmail, it shuts down fine.  In this case, I have AOLserver
configured to use a Linux box across the net as its mailhost, and the
email does get delivered just fine.  I do NOT see this problem on
Solaris.  I didn't try it on Linux.
This sounds superficially similar to the Bug #667651 where AOLserver
wouldn't shutdown after running scheduled procs.  The fact that it
only seems to happen on Windows is suspicious, though.  Anyone have
suggestions of what the problem might be or where I should start
looking for it?
--
Andrew Piskorski [EMAIL PROTECTED]
http://www.piskorski.com/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] [ aolserver-Patches-973010 ] Support for non-HTTP drivers for AOLserver 4

2004-06-15 Thread Vlad Seryakov
I have commit access, at least to modules parts, but i never tried to
commit anything to main AS source.
In the past it was allowed only by Core developers, so most of the
patches are used/kept locally or laying around
in SF forums.
Andrew Piskorski wrote:
On Tue, Jun 15, 2004 at 12:48:47AM -0700, SourceForge.net wrote:

Comment By: Zoran Vasiljevic (vasiljevic)
Date: 2004-06-15 09:48
user_id=95086
As far as I'm concerned, there is no problem.
I would be happy to integrate this patch into CVS.
The real problem I see is the responsibility. As far as I can
follow, changes to AS code done from AOL are just happening whereas
changes from the community are always obstructed by lengtly
fruitless discussions on the list, yielding mostly to a dead-end. I
think this is the point which needs to be resolved first. We have to
setup some kind of framework for this.

I see that AOLserver has ** 50 ** people listed as members of the
project.  That suggests much more interest and involvement than most
projects on SourceForge.
How many of those people have CVS commit?  Only 3 or 4 people, all
working for AOL?  Or 10 or 20, from all areas of the community?  Does
Zoran have commit?  What about Jeff Davis and Jamie Rasmussen?
ANY developer with CVS commit is, by definition, able to review
patches and commit changes.  (HOW he does so is a matter of policy,
but by definition, if he has commit, he is CAN do so.)
So, what's the problem here?  Are there just plain not enough people
with both CVS commit and the time to use it?  Or are there plenty of
developers with commit available, who just don't use it because of
perceived political or procedural problems, or just plain lack of time
or interest?
--
Andrew Piskorski [EMAIL PROTECTED]
http://www.piskorski.com/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Suggestions for nsd/cache.c in 4.0.5

2004-06-09 Thread Vlad Seryakov
I have modified cache.c which does 3), it is very important because our
caches used many entries and all that un-accounted
memory (sizeof(Entry)+ sizeof(Tcl_HashEntry)) ate up all memory.
Also i added cache limit by max number of entries in the cache:
static Ns_Cache * CacheCreate(char *name, int keys, time_t
timeout,size_t maxSize, size_t maxCount, Ns_Callback *freeProc);
never submitted it.
As for 2), Ns_CacheFlushEntry updates currentSize
David Pautler wrote:
I will probably submit a patch for this, but in case someone else wants to get to it 
first...
1) Shouldn't Ns_CacheFindEntry and Ns_CacheSetValueSz start by doing Delink() and 
Push() to update the LRU (least-recently-used) status of the entry?
This is especially important when recovering entries, since only entries with greater 
LRU can be deallocated to make space, if we are up against the maxSize.  In fact, I 
think Ns_CacheSetValueSz should fail if it can't recover enough space.
2) Shouldn't Ns_CacheMalloc first check that (currentSize  maxSize)?  And shouldn't 
it and Ns_CacheFree update currentSize?
3) Shouldn't the size of each Entry, each Tcl_HashEntry, Tcl_HashTable, and the Cache 
itself be added to currentSize?
These 3 issues together would allow a cache to far exceed the size limit requested in 
Ns_CacheCreateSz, it seems.
-dp-
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] Modified nslog module

2004-05-28 Thread Vlad Seryakov
Modified version of nslog is available on
http://www.crystalballinc.com/vlad/software.
It supports X-Forwarded-For as original module but allows to
enable/disable it on the fly as long as other config
options including file name, flags, rollftm.
Documentation file nslog.html also is updated.
The reason was that i noticed in my logs X-Forwarded-For: unknown and
log file contained those unknowns without any IP addresses which is not
good for log analyzer.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] encoding of ns_sockopen

2004-05-28 Thread Vlad Seryakov
I have patch that convert aolserver into generic threaded server
platform. I had to write
SMTP proxy server and it required just a small patch to change default
HTTP-aware behaiviour
of server thread. Now it supports generic drivers and uses same thread
pools/connection driver as for http
communications.
It is possible to write generic C-module that will register Tcl
callbacks and call them at some points and
aolserver connection thread will handle the rest.
Tom Jackson wrote:
Brandy,
Thanks for the info. That is very good to know. One thing that is
'busted' in AOLserver is the ability to provide threaded generic
servers. I would like to build this in for various reasons, so it looks
like the socket/fileevent method might be the way to go, and just forget
about threads.
For those who don't know, ns_socklistencallback runs in a single thread,
no matter how many times you call it with different ip/port
combinations. If any client connection blocks, everyone else stacks up
waiting.
Last week I started working on a shared 'Network Variable' server. Not
wanting to write any more C level code, I had to use
ns_socklistencallback to receive an ip/port number to dial back to, and
start a new thread on the listen server to dial back the client, which
had setup a server using ns_socklisten. While this worked great, I ran
into another issue: when a connection thread finishes with a connection
it forgets about any open fds, so the connection is only available for
the first connection. :(   So it looks like another project will be to
setup a module which allows persistent tcp connections, probably similar
to nsdb, but working with arrays instead of ns_sets.
tom jackson
On Fri, 2004-05-28 at 09:00, Brady Wetherington wrote:
Note that tclhttpd uses fileevent to implement a full-fledged single-process 
select-based web
server - I don't know how good it actually is in practice, but it should make for a 
very high-
performance, low-overhead server.
On Thu, 27 May 2004 12:45:09 -0700, Tom Jackson [EMAIL PROTECTED] wrote:

Right, you use something like 'fileevent'.
I'm going to be playing around with this a little to see how it compares
to a server I just wrote using ns_socklistencallback.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] encoding of ns_sockopen

2004-05-28 Thread Vlad Seryakov
I submitted it ot SF
http://sourceforge.net/tracker/index.php?func=detailaid=726288group_id=3152atid=303152
but it is quite old already, i have newer version but did not submit it.
The idea is same just little improvements.
We use this proxy module for 1 year already in th eproduction, no
problems at all, it co-exists with normal http driver
in the same aolserver process, they both reuse same connection pool.
i am working on generic TCP server using new patch, hope to release it soon.
Basically new driver will look like this, just need to export socket
interface to Tcl, so i can read/write
to socket from scripts. All Ns_Conn fields are available and C API i
used same way as for HTTP connections.
typedef struct {
char *server;
char *initproc;
char *dataproc;
Ns_Driver *driver;
} TcpServer;
NS_EXPORT int
Ns_ModuleInit(char *server, char *module)
{
TcpServer *serverPtr;
Ns_DriverInitData init;
serverPtr = ns_calloc(1,sizeof(TcpServer));
serverPtr-server = server;
serverPtr-initproc = Ns_ConfigGet(path,initproc);
serverPtr-heloproc = Ns_ConfigGet(path,dataproc);
init.version = NS_DRIVER_VERSION_1;
init.name = tcpserver;
init.proc = TcpServerProc;
init.opts = NS_DRIVER_RAW;
init.arg = serverPtr;
init.path = NULL;
if(Ns_DriverInit(server, module, init) != NS_OK) {
  Ns_Log(Error, nstcpserver: driver init failed.);
  return NS_ERROR;
}
return NS_OK
}
static int
TcpServerProc(Ns_DriverCmd cmd, Ns_Sock *sock, struct iovec *bufs, int
nbufs)
{
TcpServer *server = sock-driver-arg;
switch(cmd) {
 case DriverStart:
 server-driver = sock-driver;
 if(server-initproc)
Ns_TclEval(0,server-server,server-initproc);
 return NS_OK;
 case DriverError:
 sleep(3);
 exit(0);
 break;
 case DriverProc:
 TcpServerThread(server,sock);
 return NS_FILTER_BREAK;
 case DriverRecv:
 case DriverSend:
 case DriverKeep:
 case DriverClose:
 break;
}
return NS_ERROR;
}
static void
TcpServerThread(TcpServer *server,Ns_Sock *sock)
{
Ns_Conn *nsconn = Ns_GetConn();
TclInterp *interp = Ns_GetConnInterp(nsconn);
 if(interp  server-dataproc)
Ns_TclEval(0,server-server,server-dataproc);
}
Andrew Piskorski wrote:
On Fri, May 28, 2004 at 12:58:36PM -0400, Vlad Seryakov wrote:

I have patch that convert aolserver into generic threaded server
platform. I had to write SMTP proxy server and it required just a
small patch to change default HTTP-aware behaiviour of server
thread. Now it supports generic drivers and uses same thread
pools/connection driver as for http communications.

That sounds quite useful.  Vlad, where is this patch available?  Dossy
or others, can it go into the standard AOLserver sources?
--
Andrew Piskorski [EMAIL PROTECTED]
http://www.piskorski.com/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] AOLserver 4.0 Documentation update

2004-05-26 Thread Vlad Seryakov
Would it be easier to automatically upload existing man pages to Wiki
and then go and update them or add new docs?
There are a lot of man pages that can be used.
Dossy wrote:
A quick update -- with the tremendous help of our anonymous prolific
wiki updater, the AOLserver 4.0 Documentation effort is underway.  The
starting point is on the wiki, here:
http://panoptic.com/wiki/aolserver/Documentation
For the 6/25 milestone, the goal is to have the Tcl API docs complete on
the wiki, and the roff format updated in CVS.  Here's a link to the Tcl
API docs:
http://panoptic.com/wiki/aolserver/TclAPI
I've only done a four or five commands so far, but it's a start and it
should hopefully give a clear idea of the format that I think the
documentation should take.  Here's a link to an example, for the
ns_addrbyhost command:
http://panoptic.com/wiki/aolserver/ns_addrbyhost
My approach to writing the documentation is to take what we currently
have written (in roff format from CVS, from the various documentation
efforts that have gone on in the past, etc.), then actually look at the
AOLserver source to fill the gaps (undocumented subcommands, behaviors,
where the docs and code disagree, etc.) -- this should at least provide
us accurate documentation, again.
I'm currently working off the aolserver_v40_bp branch source (which is
currently 4.0.3).
Comments?  Feedback?  Criticisms?  Either respond on the list, on the
wiki or directly to me in private email or IM.  Thanks!
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] AOLserver 4.0 Documentation update

2004-05-26 Thread Vlad Seryakov
Makes sense
Dossy wrote:
On 2004.05.26, Vlad Seryakov [EMAIL PROTECTED] wrote:
Would it be easier to automatically upload existing man pages to Wiki
and then go and update them or add new docs?  There are a lot of man
pages that can be used.

Having the proc and function names on the wiki as placeholders is a
great way of seeding it.  Automatically uploading the existing man
pages into the wiki is more work than it's worth.  Having to do it
manually forces me to look at each and every man page and go oh god,
no, that's wrong and correct it before I move on.
It's also an easy way to see progress: docs that are not done yet show
up as uncreated wiki links which are visually easy to distinguish from
ones that are already created.  This way, you can see what docs still
need to be done, rather than having to go into a page, look and see if
it's accurate, decide you want to edit it, and then actually make your
edits.
-- Dossy
--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] nsopenssl: permission denied

2004-05-04 Thread Vlad Seryakov
What does netstat -anp tell?
or just netstat -an if it does not support -p options
Bart Teeuwisse wrote:
Adding NsWaitDriversStartup() didn't help. The strang thing is that port 80
works fine, just 443 doesn't get permission:
[04/May/2004:12:43:33][1377.1024][-main-] Error: nsopenssl: failed to listen
on 192.168.1.2:443: Permission denied
[04/May/2004:12:43:33][1377.1024][-main-] Notice: nssock: listening on
192.168.1.2:80
/Bart
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] nsopenssl: permission denied

2004-05-04 Thread Vlad Seryakov
Can you as an experiment change 443 binding to 127.0.0.1:443 everywhere,
in the command line -b 127.0.0.1:443
and in nsd.tcl
ns_param address 127.0.0.1
ns_param port 443
Bart Teeuwisse wrote:
Vlad,
netstat -anp produces:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address   Foreign Address State
PID/Program name
tcp0  0 127.0.0.1:  0.0.0.0:*   LISTEN
1377/nsd
tcp0  0 0.0.0.0:139 0.0.0.0:*   LISTEN
736/smbd
tcp0  0 0.0.0.0:111 0.0.0.0:*   LISTEN
484/portmap
tcp0  0 192.168.1.2:80  0.0.0.0:*   LISTEN
1377/nsd
tcp0  0 0.0.0.0:113 0.0.0.0:*   LISTEN
629/identd
tcp0  0 0.0.0.0:21  0.0.0.0:*   LISTEN
681/xinetd
tcp0  0 0.0.0.0:22  0.0.0.0:*   LISTEN
660/sshd
tcp0  0 0.0.0.0:54320.0.0.0:*   LISTEN
813/postmaster
tcp0  0 192.168.1.2:139 192.168.0.3:1282
ESTABLISHED 15634/smbd
tcp0  0 192.168.1.2:22  192.168.0.3:1239
ESTABLISHED 15417/sshd
tcp0288 192.168.1.2:22  67.123.163.17:64527
ESTABLISHED 23521/sshd
udp0  0 127.0.0.1:1025  127.0.0.1:1025
ESTABLISHED 813/postmaster
udp0  0 192.168.1.2:137 0.0.0.0:*
741/nmbd
udp0  0 0.0.0.0:137 0.0.0.0:*
741/nmbd
udp0  0 192.168.1.2:138 0.0.0.0:*
741/nmbd
udp0  0 0.0.0.0:138 0.0.0.0:*
741/nmbd
udp0  0 127.0.0.1:4562  0.0.0.0:*
15634/smbd
udp0  0 0.0.0.0:111 0.0.0.0:*
484/portmap
udp0  0 192.168.1.2:123 0.0.0.0:*
10049/ntpd
udp0  0 127.0.0.1:123   0.0.0.0:*
10049/ntpd
udp0  0 0.0.0.0:123 0.0.0.0:*
10049/ntpd
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags   Type   State I-Node PID/Program name
 Path
unix  2  [ ACC ] STREAM LISTENING 1261   813/postmaster
 /tmp/.s.PGSQL.5432
unix  2  [ ACC ] STREAM LISTENING 545668 15417/sshd
 /tmp/ssh-XXzfIdML/agent.15417
unix  8  [ ] DGRAM805465/syslogd
 /dev/log
unix  3  [ ] STREAM CONNECTED 625670 1396/postgres: nsad
/tmp/.s.PGSQL.5432
unix  3  [ ] STREAM CONNECTED 625669 1377/nsd
unix  3  [ ] STREAM CONNECTED 625638 1377/nsd
unix  3  [ ] STREAM CONNECTED 625637 1377/nsd
unix  3  [ ] STREAM CONNECTED 625620 1384/postgres: nsad
/tmp/.s.PGSQL.5432
unix  3  [ ] STREAM CONNECTED 625619 1377/nsd
unix  3  [ ] STREAM CONNECTED 625618 1383/postgres: nsad
/tmp/.s.PGSQL.5432
unix  3  [ ] STREAM CONNECTED 625617 1377/nsd
unix  3  [ ] STREAM CONNECTED 625616 1382/postgres: nsad
/tmp/.s.PGSQL.5432
unix  3  [ ] STREAM CONNECTED 625615 1377/nsd
unix  3  [ ] STREAM CONNECTED 625612 1377/nsd
unix  3  [ ] STREAM CONNECTED 625611 1377/nsd
unix  2  [ ] DGRAM85087  10049/ntpd
unix  2  [ ] DGRAM1105   711/crond
unix  2  [ ] DGRAM1047   681/xinetd
unix  2  [ ] DGRAM975629/identd
unix  2  [ ] DGRAM962617/automount
unix  2  [ ] DGRAM817470/klogd
unix  2  [ ] STREAM CONNECTED 5131/init [3]
As you can see port 443 is still available.
/Bart
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] ANN: ns_gdc: new charting module

2004-04-27 Thread Vlad Seryakov
 sets to the chart
Example:
  ns_gdc setdata $gdc Q1 Prices { 0.5 0.09 0.6 0.85 0.0 0.90 }
  ns_gdc #c setcolors colorlist
assigns colors for data sets, each color per set
Example:
  ns_gdc setcolors $gdc { 0x008080 0x8080FF }
  ns_gdc save #c imagefile
saves chart in the specified image file
To run examples in test.tcl connect to aolserver via nscp module and
type source path_to_distrib/test.tcl or put the test.tcl script somewhere
under pageroot and call it via browser as http://yourhost/path/test.tcl
It will generate images in the/tmp directory.
--
Vlad Seryakov
703 488-2173 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] ns_logctl expansion?

2004-03-08 Thread Vlad Seryakov
There is Tcl syslog extension, i use it in my Tcl scripts but it is fo
rUnix only.
If Windows is one of the platforms syslog may not be portable solution,
but if only Unix,
collecting nsd.logs over syslog makes life much easier than re-inventing
Tcl version of syslog
itself.
Zoran Vasiljevic wrote:
On Sunday 07 March 2004 20:14, you wrote:

Why not to use syslog?
What is the advantage of using Tcl channels over syslog for collecting
multiple logs?


Great difference. Everything is under Tcl control and you have
no OS issues (would/should work on Win too). Configuration
pains are avoided and, lastly, there is no syslog interface in AS.
Zoran

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] ns_logctl expansion?

2004-03-08 Thread Vlad Seryakov
No problem at all, i had to write some kind of nslog module to do custom
logging myself for another project,
i might've misunderstood your intensions.
Zoran Vasiljevic wrote:
On Monday 08 March 2004 17:27, you wrote:

There is Tcl syslog extension, i use it in my Tcl scripts but it is fo
rUnix only.
If Windows is one of the platforms syslog may not be portable solution,
but if only Unix,
collecting nsd.logs over syslog makes life much easier than re-inventing
Tcl version of syslog
itself.


Please note that I'm not *reinventing* anything. I just want to
make *existing* ns_log facility be able to use alternative channels
apart from the one file-channel hard-wired at the server start.
Also, collecting nsd logs over syslog is not much easier. It is,
at least in our case, out of the question. The only viable
solution for us is to manage our own socket connection to other
AS instances and set them to use alternative log sinks.
I do believe that this might open interesting possibilities to
other AS users, not necessarily familiar with syslog and its
configuration.
Zoran

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] ns_logctl expansion?

2004-03-08 Thread Vlad Seryakov
What about making logging facility pool based like db system, define
different pools, eventually those logging pools may
be not just files but syslog, custom socket etc.
Then in your app you just use those log pools, something like
ns_log setpool logfile1
ns_log Debug 
ns_log setpool syslog1
ns_log Debug 
Just throwing an idea

Tom Jackson wrote:
On Sun, 2004-03-07 at 23:37, Zoran Vasiljevic wrote:


Oh, it is not the work that I'm afraid of :)
Your idea seems pretty good. The only thing here would be: how
to treat non-connection threads? Those are not aware of any URLs.
We have usually a dozen of those performing all sorts of non-page-serving
tasks. How would you distribute the log info from those threads?
Nevertheless, it is a good idea. I will play with this mentally
and see if it can be extended to cope with all thread logging.
Thanks for the hint.


Shoot, I was hoping you wouldn't notice that point! ... Actually my idea
only addresses one way of registering a way of selecting then setting
the channel, all the work you were going to do would still be required,
but my idea might interfere with yours... unless you had a separate
command ns_log_tochannel, for instance that would be the underlying
command???
Or maybe a better idea is to come up with a way of establishing a
ierarchy of commands/script files and log based on that criteria
instead. If procs were namespaced, a message from a certain namespace
could trigger the desired action. Or while loading, library commands
could be associated with the files where they were stored...
Dunno, but your idea of logging to separate channels sounds very good.
tom jackson

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] ns_logctl expansion?

2004-03-07 Thread Vlad Seryakov
Why not to use syslog?
What is the advantage of using Tcl channels over syslog for collecting
multiple logs?
Zoran Vasiljevic wrote:
On Sunday 07 March 2004 07:41 pm, you wrote:

On Sun, 2004-03-07 at 04:03, Zoran Vasiljevic wrote:

Like, for example:

  set chan [open /some/file.log w]
  ns_logctl pushchan $chan
  ns_log notice This goes to chan $chan
  set chan [ns_logctl popchan]
  close $chan
Interesting idea, but it this a per-thread stack? I'm guessing the
motivation is for performance, what if you could register log files like
you register Registered Procedures, use the trie structure to store
nearest match logging. Then on restart you could easily add/remove a log
file for debugging purposes, or long term high performance logging.


Oh, misunderstanding...

I was talking about the *server* log not the access log.
The motivation is not the performance. The motivation
is to be able to collect (even over the network) logs
produced by many AS instances running all arround the net
at one central place.
Oh, the stack is thread-wide of course. The ns_log itself
is a thread-wide stuff, therefore.
We use ns_log facility extensively and need it for
various debugging purposes. It proved very clumsy
to handle all those logs dispersed on different
machines arround the net, so we thought about creating
a Tcl channel and sending all the output to one
central handling place.
Now, one could employ the same principle to access
logs as well. The only thing is: I don't know wether
there is Tcl access to access logs (I think not).
The ns_logctl functionality appearing in 4.0 was a
good step towards better server log management.
It could be extened even further, as explained
in my proposal.
The good thing here is: there is no backward-compat
to take care of, no users would be affected by this
change so there is nothing to fear about. It merely
adds new functionality. For some people this may be
interesting, for some not. Therefore I wanted to probe
wether anybody could benefit from this.
We would, definitely.
Cheers,
Zoran
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] PHP4 with AOLserver 4

2004-02-02 Thread Vlad Seryakov
I have production-quality webmail solution but it is written on my own
framework using nsimap module.
http://www.crystalballinc.com/vlad/software/oss2/index.oss

Also there is simple webmail written for OpenACS using the same module,
it is possible to find it in
the OpenACS forums.

Roberto Mello wrote:
 Anyone knows if PHP4 compiles with AOLserver 4? Or does anyone know of a
 Free webmail solution that will run under AOLserver 4?

 -Roberto

 --
 +|Roberto Mello   -http://www.brasileiro.net/  |--+
 +   Computer Science Graduate Student, Utah State University  +
 +   USU Free Software  GNU/Linux Club - http://fslc.usu.edu/ +



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] SNMP support

2004-01-27 Thread Vlad Seryakov
Sure you can, i used scotty first but after that wrote my own
snmpmodule. It is in the aolserver sourceforge files.
Kulcsar Ferenc wrote:
Hello All,

I'll manage a large network with SNMP in real time. Can I integrate Tkined
or scotty with Aolserver?
TIA
Feri
__
Ne feledjk:
A CRAY csak egy olyan szmtgp, amelyik 4 ra alatt lefuttat egy vgtelen
ciklust...
__
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email b


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Generating Dynamic PDF's from AOLs

2003-12-11 Thread Vlad Seryakov
We are using AwareReports from www.awaresw.com, can generate PDF, PS, Excel,
currently as cgi but they have C++ API as a shared library, we are still
testing the module

David Walker wrote:

 We use html2pdf (create an html file, convert using html2pdf, offer the
 outputted pdf for download)

 On Tuesday 09 December 2003 05:49 am, Steve Manning wrote:


Hi People

I want to create a PDF version of a database report for downloading.
Does anyone know of a way to dynamically generate PDF's within
AOLserver?

Thanks

Steve

--
Steve Manning [EMAIL PROTECTED]


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the
email message. You can leave the Subject: field of your email blank.




 --
 AOLserver - http://www.aolserver.com/

 To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with 
 the
 body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field 
 of your email blank.

--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] Initialization crashes in 4.0

2003-11-18 Thread Vlad Seryakov
i just encountered situation when aolserver crashes on startup, it is
rare but...
As trace below shows on startup the server could not resolve it own
name(experimenting with DNS) and used log facility to log this but
InitLog was not called yet. In init.c  routine NsdInit should call
NsInitLog(); before calling other initialization functions.
That way if something happens at least they can log it.
Loaded symbols for /lib/libresolv.so.2
#0  0x4017e801 in __kill () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4017e801 in __kill () from /lib/i686/libc.so.6
#1  0x4012161b in raise (sig=6) at signals.c:65
#2  0x4017fd82 in abort () at ../sysdeps/generic/abort.c:88
#3  0x400d7b0b in Tcl_PanicVA () at ./../generic/tclPanic.c:106
#4  0x400d7b2e in Tcl_Panic (
arg1=0x4006cd60 Ns_Tls: invalid key: %d: should be between 1 and %d)
at ./../generic/tclPanic.c:134
#5  0x4006b11f in Ns_TlsGet (keyPtr=0x40065560) at tls.c:142
#6  0x40039630 in LogGetCache () at log.c:782
#7  0x40039105 in Log (severity=Error, fmt=0x40058351 dns: %s failed:
%s%s, ap=0xb74c)
at log.c:489
#8  0x40038c41 in Ns_Log (severity=Error, fmt=0x40058351 dns: %s
failed: %s%s) at log.c:179
#9  0x40031ad9 in LogError (func=0x400582cf gethostbyname) at dns.c:325
#10 0x400319d2 in GetAddr (dsPtr=0xb854, host=0x400668e4 ernie) at
dns.c:257
#11 0x400316f3 in DnsGet (getProc=0x40031988 GetAddr,
dsPtr=0xb854, cachePtr=0x400653ac,
key=0x400668e4 ernie) at dns.c:132
#12 0x40031690 in Ns_GetAddrByHost (dsPtr=0xb854, host=0x400668e4
ernie) at dns.c:106
#13 0x40039ff2 in NsInitConf () at nsconf.c:92
#14 0x40038219 in _init () at init.c:69
#15 0x4000df57 in _dl_init () at eval.c:41
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] aolserver 4.0 shutdown hangs

2003-11-17 Thread Vlad Seryakov
Hello all,

i was trying to upgrade to aolserver 4.0 but noticed that every time i
do ns_shutdown from nscp the server
just hangs. It appeares that the problem is call to
NsWaitDriversShutdown(timeout); during server shutdown.
Last version i used without any problem beta10 did not have this call.
While debugging i found that it hangs in Ns_ThreadJoin call, looks like
DriverThread exited already and pthread_join just hangs.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] Zlib module

2003-10-31 Thread Vlad Seryakov
Hello,
If somebody interested, i wrote simple zlib module for aolserver,
supports compressing/uncompressing Tcl strings, gzip files support.
Can be downloaded from http://www.crystalballinc.com/vlad/software

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] loading nschartdir

2003-09-09 Thread Vlad Seryakov
Yes, CharDir library compiled with gcc2.96, so you cannot use it on
recent versions
of Linux which uses gcc3.  I asled them about version for gcc3, but at
that time
they did not provide it, may now they have more recent version compiled
with gcc3.
On Redhat you can compile the whole aolserver using gcc2.96.

Bjoern Kiesbye wrote:
Hi,
I've some problems loading the nschartdir.so into the aolserver,
after compiling and linking wich worked, aolserver couldn't find the symbol
__gxx_personality_v0 , after linking nschartdir.o wich g++ (or explicitly
link against stdc++) this problem is solved, but now  aolserver can't find
the symbol _ZN7XYChart6createE , it is not a function of the libchartdir.so
Does anyone have a idea.

Thanks for your help

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Graphing

2003-08-14 Thread Vlad Seryakov
check out my chart module nschartdir, i use ChartDirector graphic library

http://www.crystalballinc.com/vlad/software

Ross Simpson wrote:
Hello,

I was curious if anyone is doing any graphing with aolserver.
I've been looking at the various options, and so far am not
encouraged..  These are the packages I've looked at:
plplot
emu_graph
Gdtcl
Plplot looks good, but I get lots of core dumps while using it.
Emu_graph seems to be meant for a browser tcl plugin only, and while gd
seems to work, it's intended for drawing -- graphing would take a lot of
work.
Does anyone have a working graphing setup?

Thanks ;)
Ross
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] Graphing

2003-08-10 Thread Vlad Seryakov
That is something with C++, i just typed make in nschartdir directory
and module was compiled fine.
my makefile resues aolserver makefile settings, it is standard makefile
for aolserver modules
what version of gcc do use use?
Ross Simpson wrote:
Hi Vlad,

I'm having a little trouble compiling your module on a RedHat AS2.1 server:

$ make
/usr/bin/g++ -I/data/advantage/aolserver/include
-I/tmp/ChartDirector//include -g -Wall -Wconversion -Wno-implicit-int
-fPIC  -I/data/advantage/aolserver/include
/data/advantage/aolserver/include -DNO_CONST  -DHAVE_UNISTD_H=1
-DHAVE_LIMITS_H=1 -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1
-D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_READDIR_R=1
-D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long
-DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1
-DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1
-DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1
-DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1
-DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1
-DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1
-DHAVE_LANGINFO=1 -DPEEK_XCLOSEIM=1 -DHAVE_SYS_IOCTL_H=1
-DHAVE_TIMEGM=1 -DHAVE_POLL=1 -DHAVE_DRAND48=1 -DHAVE_RANDOM=1
-DHAVE_CMMSG=1-c -o nschartdir.o nschartdir.c
g++: cannot specify -o with -c or -S and multiple compilations
make: *** [nschartdir.o] Error 1
I'll admit to not knowing enough about compiling and linking to figure
this one out..  Do you have any ideas?
Thanks,
Ross


Vlad Seryakov wrote:

  check out my chart module nschartdir, i use ChartDirector graphic library
 
  http://www.crystalballinc.com/vlad/software
 
  Ross Simpson wrote:
   Hello,
  
   I was curious if anyone is doing any graphing with aolserver.
   I've been looking at the various options, and so far am not
   encouraged..  These are the packages I've looked at:
   plplot
   emu_graph
   Gdtcl
  
   Plplot looks good, but I get lots of core dumps while using it.
   Emu_graph seems to be meant for a browser tcl plugin only, and while gd
   seems to work, it's intended for drawing -- graphing would take a
  lot of
   work.
  
   Does anyone have a working graphing setup?
  
  
   Thanks ;)
   Ross
  
  
   --
   AOLserver - http://www.aolserver.com/
  
   To Remove yourself from this list, simply send an email to
  [EMAIL PROTECTED] with the
   body of SIGNOFF AOLSERVER in the email message. You can leave the
  Subject: field of your email blank.
 
  --
  Vlad Seryakov
  703 961-5433 office
  [EMAIL PROTECTED]
  http://www.crystalballinc.com/vlad/
 
 
  --
  AOLserver - http://www.aolserver.com/
 
  To Remove yourself from this list, simply send an email to
  [EMAIL PROTECTED] with the
  body of SIGNOFF AOLSERVER in the email message. You can leave the
  Subject: field of your email blank.
 
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] AOLServer 4 Architecture

2003-08-04 Thread Vlad Seryakov
I created that patch to enable non-HTTP communication drivers like
SMTP/POP3/IMAP.
I never checked it againsts nsunix
C. R. Oldham wrote:
So I guess what I'm asking is if the core team has reviewed
and considered Vlad's patch at all?


And I many have been premature in this post, because I just discovered
that Vlad's patch doesn't enable nsunix to build.  I'll try nsvhr in
combination with nssock instead of nsunix now.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] nsimap error

2003-08-04 Thread Vlad Seryakov
Add -lcrypt to the MODLIBS in the Makefile

MODLIBS  = $(IMAPLIBS) $(SSLLIBS) -lcrypt

William Scott Jordan wrote:
I've compiled nsimap without any trouble, but when I try to load it with
AOLserver, I get the error:
Warning: modload: failed to load '/usr/local/aolserver/bin/nsimap.so':
'/usr/local/aolserver/bin/nsimap.so: undefined symbol: crypt'
Does anyone have any idea of what's going on or how I can fix it?  Any help
would be greatly appreciated.
Sincerely,

Scott

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
[EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the
Subject: field of your email blank.
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] aolserver4 bad file descriptor errors

2003-07-10 Thread Vlad Seryakov
But Ns_ConnClose is called from within connection thread and is using
mutex for
firstClosePtr but at the same time single threaded driver.c is using the
same pointer without
any mutexes. After i put mutex there i started receiving much less Bad
file descriptor errors and
crashes which may be unrelated completely but on my fast dual-CPU
machine with many concurrent
connections that might be the case.
Jim Davidson wrote:
Hi,

I'm not sure this is the case.  Code in driver.c is single-threaded by
design, i.e., there's a single driver thread which accepts new
connections, does the read-ahead, dispatches the sockets with pre-read
content to the thread pools for service, receives the sockets back for
keep-alive or graceful close.  This is why the various lists and
counters don't have locks around them.  The design assumption is this
single thread can spin fast enough to keep a reasonable thread pool
filled with incoming requests.
For NsSockClose, note there is a lock around the firstClosePtr list
which is the list to return sockets to the driver thread.  Sockets are
put there and a trigger is sent for driver to pull them off.
Anyway, that's the plan -- I could have missed something and allowed
these lists to be fiddled by other threads by accident.


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] aolserver4 bad file descriptor errors

2003-07-10 Thread Vlad Seryakov
But what about SockAccept and SockRelease, they do not use lock mutex
but update firstClosePtr.
I have small communication driver so those errors may not be related to
firstClosePtr.
Jim Davidson wrote:
Hi,

Seems like firstClosePtr at least is protected -- there's an
informatively named Ns_Mutex defined:
static Ns_Mutex lock; /* Lock around close list and shutdown flag. */

and then in NsSockClose:

void
NsSockClose(Sock *sockPtr, int keep)
{
  ...
Ns_MutexLock(lock);
if (firstClosePtr == NULL) {
 trigger = 1;
}
sockPtr-keep = keep;
sockPtr-nextPtr = firstClosePtr;
firstClosePtr = sockPtr;
Ns_MutexUnlock(lock);
if (trigger) {
 SockTrigger();
}
}
and in DriverThread:

static void
DriverThread(void *ignored)
{
 ...
  /*
  * Check for shutdown and get the list of any closing or
  * keepalive sockets.
  */
 Ns_MutexLock(lock);
 sockPtr = firstClosePtr;
 firstClosePtr = NULL;
 stopping = shutdownPending;
 Ns_MutexUnlock(lock);
I've debugged a similar problem before -- turned out to be a misbehaved
module closing sockets twice or something.  Are you getting these bad
file errors with simple nsd/nssock only configs?
-Jim



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


[AOLSERVER] Aolserver4 and Dual-Xeon 2.4Ghz

2003-06-30 Thread Vlad Seryakov
Does anybody have or had problems running Linux and aolserver4 on Xeon
2.4Ghz.
It crashes or freezes occasionally, drops tcp connections.

Same code running with 3.5.5 works fine.

--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of 
your email blank.


Re: [AOLSERVER] BIG problem with Tcl8.4.(1|2)

2003-03-26 Thread Vlad Seryakov
Yes, i am currently fighting with the same problem, under big load
when i do many calles to Tcl [file] command aolserver crashes
consistently in
static void FreeFsPathInternalRep(pathObjPtr),
but i do not do [cd], just [file mtime,stat,file]
When i do not do Tcl [file] command everything is working fine.

Zoran Vasiljevic wrote:
Hi !

After some days... (yes, it is *always* very costly and difficult)
I've pinpointed a large hole in Tcl8.4.(1|2) which effectively
generates bogus OS paths, corrupts memory and otherwise impairs
the AOLserver (or any other MT-enabled application).
The problem is in Tcl generic/tclIOUtil.c and naive handling
of static Tcl_Obj *cwdPathPtr.  The pointer to this Tcl object
gets shuffled arround threads by simple reference, it is
read (referenced) without proper locks, etc.
The implementor obviously protected the most obvious write
operations, but neglected any others. Also, the Rule#1 in
Tcl Do not pass Tcl_Obj's between threads is grossly violated.
I must see how we can solve this. I'm afraid that we'd need
to rewrite some parts of the above file and bump to Tcl8.4.3
or such.
How come nobody has noticed this so far?
Well, the problem starts displaying itself if you ever change
the current directory of the process *after* the Tcl has been
initialized. You need not do [cd] explicitly; some internal
Tcl code does that on your behalf as well.
As for AOLserver 4.0; we do need at least Tcl8.4 or higher.
So, I'm afraid we will not be able to go to production
before fixing this ugly thing.
Cheers,
Zoran
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Help with nsimap

2003-03-19 Thread Vlad Seryakov
=262144)
at ./../generic/tclBasic.c:2580
#51 0x080ec1ce in Tcl_UplevelObjCmd (dummy=0x0, interp=0x87f2030,
objc=1, objv=0x87f2948)
at ./../generic/tclProc.c:604
#52 0x080be049 in TclExecuteByteCode (interp=0x87f2030, codePtr=0x89db1c0)
at ./../generic/tclExecute.c:845
#53 0x0809a87c in Tcl_EvalObjEx (interp=0x87f2030, objPtr=0x88f2220,
flags=0)
at ./../generic/tclBasic.c:2733
#54 0x080ec92a in TclObjInterpProc (clientData=0x8932250,
interp=0x87f2030, objc=11,
objv=0x87f2918) at ./../generic/tclProc.c:1001
#55 0x080be049 in TclExecuteByteCode (interp=0x87f2030, codePtr=0x88343d0)
at ./../generic/tclExecute.c:845
#56 0x0809a87c in Tcl_EvalObjEx (interp=0x87f2030, objPtr=0x895af38,
flags=0)
at ./../generic/tclBasic.c:2733
#57 0x080ec92a in TclObjInterpProc (clientData=0x89f9d50,
interp=0x87f2030, objc=1,
objv=0xbf3ff44c) at ./../generic/tclProc.c:1001
#58 0x080e2e8c in EvalObjv (interp=0x87f2030, objc=1, objv=0xbf3ff44c,
command=0xbf3ff6c8 rp_handler, length=10, flags=0) at
./../generic/tclParse.c:932
#59 0x080e37e2 in Tcl_EvalEx (interp=0x87f2030, script=0xbf3ff6c8
rp_handler, numBytes=10,
flags=0) at ./../generic/tclParse.c:1393
#60 0x080e3ae1 in Tcl_Eval (interp=0x87f2030, string=0xbf3ff6c8
rp_handler)
at ./../generic/tclParse.c:1512
#61 0x0809c5c1 in Tcl_GlobalEval (interp=0x87f2030,
command=0xbf3ff6c8 rp_handler)
at ./../generic/tclBasic.c:4149
#62 0x08089f05 in TclDoOp (arg=0x85a46e0, conn=0x87ea458) at tclop.c:588
#63 0x080787a7 in Ns_ConnRunRequest (conn=0x87ea458) at op.c:196
#64 0x0807f002 in ConnRun (connPtr=0x87ea458) at serv.c:880
#65 0x0807e950 in NsConnThread (arg=0x87a5698) at serv.c:669
#66 0x08119f7b in NsThreadMain (arg=0x8156018) at thread.c:228
#67 0x40027f87 in pthread_start_thread (arg=0xbf3ffc00) at manager.c:284
Unfortunately I don't know enough to make much sense of this but any
help would be greatly appreciated.
Thanks

Matthew


Matthew Walker wrote:

I am having trouble with nsimap on a redhat 7.2 box. The nsimap.so
loads at startup OK and installs its garbage collector but when I try
to open a session from a tcl page using ns_imap open I get (with
debug logging turned on):
[18/Mar/2003:17:34:34][15182.5126][-conn2-] Debug: ns_imap: open:
0x8ca8f50: 1: {127.0.0.1}: [EMAIL PROTECTED]
Killed


snipped

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] URGENT: outputting binary in aolsever..

2003-03-07 Thread Vlad Seryakov
ns_chartdir has return command which send binary image directly to the
connection, but this is only
image.
daddy wrote:
hi,
  i have a page that stores the data of an image to a variable... using
ns_chartdir or tgdchart. how can i output it in the page... i tried using
ns_writebinary on an adp page... but it only output the image but it didnt
include the html texts and form...
TIA



I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/
--
Vlad Seryakov
703 961-5433 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


[AOLSERVER] ANNOUNCE: DNS Module

2003-03-05 Thread Vlad Seryakov
Some time ago somebody mentioned(sorry i did not save the message, do not
remember the name) about DNS module for AOLserver,
it happened i implemented DNS server before for another project so i figured
i can quickly write simple DNS server module.
Actually it was fun for the last couple days after writing mostly Web
applications to do something low-level in C.
So, the first version of nsdns module is released.
Briefly it is simple server and DNS proxy in one, it serves it own records
and forwards everything else to remote DNs server. All replies are cached
locally.
That's basically it.

To download: ftp://ftp.crystalballinc.com/pub/vlad/nsdns.tar.gz



I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:

signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


Re: [AOLSERVER] ANNOUNCE: ns_chartdir charting module available

2002-10-15 Thread Vlad Seryakov


 And what's the license for such library? I couldn't find it on their
 website.

It is free for Linux

 In fact their website seemed comflicting to me, for in one page
 it said download free version (but didn't say what it meant by free)
 and in another it had a developer license ($99 for 1-4 developers) saying
 License for using ChartDirector on one computer/server running Windows,
 Linux or FreeBSD, for development, production or any other purpose.

  No documentation is available yet, but i am implementing
  all their demo scripts which are very informative.

 The tGDChart Tcl module did everything I could see that the ChartDirector
 does.

i tried tgdcgart but it was crashing aolserver for me



Re: [AOLSERVER] ANNOUNCE: ns_chartdir charting module available

2002-10-15 Thread Vlad Seryakov

CharDirector supports this,
i did not implement it yet in my module but i will in the next couple of days.

On Tue, Oct 15, 2002 at 08:39:16PM +, Oscar Bonilla wrote:
 Is there a way to write the generated image directly to the
 AOLServer connection without having to write it to a file first?

 nsgd has this feature and it's very useful for dynamically generated
 images...

 Regards,

 -Oscar

 On Sunday, October 13, 2002, at 07:37  PM, Vlad Seryakov wrote:

  Hello,
 
  Here it is my first public release of charting module,
  it is pure interface to ChartDirector from www.advsofteng.com,
  very sophisticated charting library for C++.
 
  No documentation is available yet, but i am implementing
  all their demo scripts which are very informative.
 
  Download it from
  ftp://ftp.crystalballinc.com/pub/vlad/nschartdir.tar.gz
 
 --
 pgp fingerprint: BC64 2E7A CAEF 39E1 9544  80CA F7D5 784D FB46 16C1



[AOLSERVER] Two modules for AOLServer available

2002-09-28 Thread Vlad Seryakov

Hello,

I have two modules for Aolserver:

nsmain - IMAP interface, can be used as IMAP client

nssnmp - SNMP interface, can be used AS SNMP client, supports ICMP as well

I use them in production for a while they seem to be stable.

Download from:

ftp://ftp.crystalballinc.com/pub/vlad/



Re: [AOLSERVER] The Next Module -- nscache

2002-09-28 Thread Vlad Seryakov

I talked with Rob and he told me that i can take control for nscache module,
i made some modification and submitted them to Rob, but he is not maintaining
this module anymore.
I just added ns_cache incr function similar to nsv_incr.

The module is available at ftp://ftp.crystalballinc.com/pub/vlad


On Sun, Sep 29, 2002 at 12:09:08AM +, Scott Goodwin wrote:
 I'm going to import Rob's nscache module into SourceForge tonight or
 tomorrow.

 Anyone out there who knows of any changes/improvements that have been
 made to the module that Rob has on his website, or any other
 information, test code and so on, please send them to me.

 His module is still located at
 http://dqd.com/~mayoff/aolserver/#nscache

 thanks,

 /s.
 --
   Scott Goodwin
   [EMAIL PROTECTED]
   http://scottg.net



Re: [AOLSERVER] Help with Dotted IP conversion

2002-02-25 Thread Vlad Seryakov

You can try these functions:

proc inet_addr { ipaddr } {

set addr [binary format c4 [split $ipaddr .]]
binary scan $addr i bin
return $bin
}

proc inet_ntoa { ipaddr } {

set bin [binary format i $ipaddr]
binary scan $bin  a b c d
set a [expr { ($a + 0x100) % 0x100 }]
set b [expr { ($b + 0x100) % 0x100 }]
set c [expr { ($c + 0x100) % 0x100 }]
set d [expr { ($d + 0x100) % 0x100 }]
return $a.$b.$c.$d
}

On Mon, Feb 25, 2002 at 02:09:51PM -0500, [EMAIL PROTECTED] wrote:
 I am working on a back-end logging system and am having a bit of difficulty
 with a number conversion. The resource that provides the IP address to log
 can only give it in Long format. I have come up with a function to convert
 the Long IP into Dotted Quad format, but the first division returns a
 negative value whenever the Long IP provided is greater than 2147483647.  Can
 anyone help figure out why expr will not accept any values bigger than that,
 and what my options are? I have looked through the AOLServer functions to see
 if there was anything built-in that would work but nothing caught my eye.

 Thanks!



 proc dotted_ip_from_long { long_ip } {

 set n 1
 set ip_parts [list]

 while { $n  5 } {

  set denom [expr int(pow(256,(4 - $n)))]
  set ip_part [expr int(floor($long_ip / $denom ))]
  set long_ip [expr $long_ip % $denom ]
  lappend ip_parts $ip_part
  incr n
  }

 return [join $ip_parts .]

 }