Re: [Zope] FTP Woes and no answer

2001-01-12 Thread Jon Prettyman

Try using PASSIVE mode for your FTP client.  Did someone perchance put
a firewall up between you and your server?

-jon

"J. Atwood" [EMAIL PROTECTED] writes:

 I have FTP'd into Zope before. No problems but all of a sudden it
 seems like neither I nor the people I am working with can FTP in with
 either a manager or superuser account. I have tried to change the port
 and all sorts of other things but on a few different installations
 with different clients from different machines and OSes it just does
 list any of the files in the directory.
 
 
 Has anyone experienced this? Know a work around?
 
 J
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Question: How to generate a core file in Solaris 2.6

2001-01-03 Thread Jon Prettyman

I had a similar problem quite some time ago.  I never could get a core
file to generate, but since the crash occured so often, I was able to
attach gdb (GNU debugger) to the process and was able to see the
segmentation violation that was occurring.  I never did figure out why
I couldn't get a core file generated.

-jjp

Michael Best [EMAIL PROTECTED] writes:

 I am running Zope 2.1.6 and 2.2.3 under Solaris, and we are having some
 stability problems.  With some previous posts from developers we seem to
 think that it might be a custom product that we are using that contains
 some c code.  We can't really be certain, although we are devising some
 tests to examine that possibility.
 
 However, since the Zope crashes every few hours, and no core file comes
 out we are at a loss at how to get one.
 
 We have tried increasing the ulimit in the startup script, but this
 doesn't appear to generate a core.
 
 Primarily Zope 2.2.3 and Solaris 2.6 (Patched to a couple of months
 ago).
 
 Help?
 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?

2000-12-30 Thread Jon Prettyman

If you are using ZSQLMethods and your database returns column names in
one case (UPPER) but you reference them with another (lower) it
appears that instances of SQLAlias get leaked.

Brian Lloyd has put Jim Fulton's fix in the 2.2.5b release that's up
on the site.

We were seeing thousands of leaked instances of SQLAlias causing our
memory usage to skyrocket.

-jon

[EMAIL PROTECTED] (Cees de Groot) writes:

 Jon Prettyman [EMAIL PROTECTED] said:
 Are you using ZSQLMethods by any chance?
 
 Yes, why? (I think I've fixed /this/ problem, but if ZSQLMethods will
 cause similar behaviour I'd like to be prepared :-))
 
 -- 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?

2000-12-29 Thread Jon Prettyman

Are you using ZSQLMethods by any chance?

-jon

[EMAIL PROTECTED] (Cees de Groot) writes:

 Our production Zope machine has developed a habit over Christmas where
 it starts eating CPU and RAM (one Python thread on 100% CPU time, and 
 I've seen kernel messages indicating that Zope was killed because it
 hit an out-of-memory condition which means it sat on ~500Mb RAM). 
 
 I'm completely in the dark about what causes this (probably some of
 my own code, I installed some new bits a couple of days ago), but what's
 worse: I really don't know how to set about finding the problematic
 code. Is there a way to find out what code a thread is running?
 
 -- 
 Cees de Groot   http://www.cdegroot.com [EMAIL PROTECTED]
 GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope-dev] SQLAlias Memory Leak?

2000-12-19 Thread Jon Prettyman

The leaking SQLAlias I see is coming from:
  Shared.DC.ZRDB.Results

I'm going to try the same type of fix in there and see what happens.

-jon

"Brian Lloyd" [EMAIL PROTECTED] writes:

 oops - I sent that before I had my coffee. I should 
 have attached the checkin version, not the broken 
 one :)
 
 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.371.6909  
 Digital Creations  http://www.digicool.com 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] SQLAlias Memory Leak?

2000-12-06 Thread Jon Prettyman

I've seen this as well under DCOracle.

-jon

Dyon Balding [EMAIL PROTECTED] writes:

 OK, I've had more of a hack at this, and I've narrowed the problem
 down a little.
 
 It appears that any access to an SQLAlias object causes it to not
 be correctly released.  The SQLAlias objects means that you can
 access column names using a different case to how they are stored
 in the database.
 
 For example, we store users in a users table in the database, with
 column names like USERNAME, but they are accessed with:
 dtml-var username, this causes the SQLAlias objects to stick around.
 
 One solution to our problem is to just do a dtml-var USERNAME
 instead.  However that doesn't solve the problem with this
 "feature" of being able to call it with a different case.
 
 This is a fairly easy bug to reproduce, on my setup at least :).
 I have tested it with ZSQLRelay and ZODBDA both talking to SQLServer,
 and with ZPyGreSQLDA talking to PostgreSQL.
 
 I would appreciate it if someone else can reproduce the bug,
 and I'll put it in the Collector I guess.
 
 thanks
 -d
 
 On Wed, Dec 06, 2000 at 09:06:47AM +1100, Dyon Balding wrote:
  Hi,
  
  I have an application that stores state data in a
  SQLServer database.  The Zope and database servers
  run on different windows machines, using the ZODBCDA
  product to connect Zope to the ODBC machinery.
  
  What I have been observing is that the Zope client's
  memory usage increases consistently when ZSQL methods
  are being called.  In the Debug screens, the
  culprit appears to be Shared.DC.ZRDB.RDB.SQLAlias.
  
  Here's a dump of the first few lines after hitting
  a ZSQL method a few hundred times using ab.  The
  SQLAlias figures never seem to go down.
  
  Class 
  December 5, 2000
  1:58 pm 
   December 5, 
2000
   2:01 pm 
 
  Delta 
  Shared.DC.ZRDB.RDB.SQLAlias 
  1048 
   4068 
 
  +3020 
  ZClasses.ZClass.ZClass 
  73 
   108 
 
  +35 
  OFS.DTMLMethod.DTMLMethod 
  63 
   94 
 
  +31 
  
  In fact most of our servers run out of memory and need
  to be restarted every couple of days when they get
  sufficient use.
  
  I've done a bit of a search of the mailing lists, and noone
  else appears to be having the same problem.  So does
  anyone have an idea of what we might be doing differently
  to everyone else?  We appear to have the latest versions
  installed.
  
  I've had a bit of a look through the code, and it appears
  that SQLAlias is used to case desensitize the column names
  of the returned data?
  
  Any pointers would be appreciated.
  
  thanks, d
  
  -- 
  |Dyon Balding [EMAIL PROTECTED] |
  
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists - 
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 
 -- 
 Dyon Balding [EMAIL PROTECTED]
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope] Help with general purpose ZSQL Method

2000-11-03 Thread Jon Prettyman

I want to write a generic table browser ZSQL method and am having
trouble getting the output that I want.

Given a ZSQLMethod that looks like this:
ID:browse_table
Arguments: table:string=""

Script:
SELECT * FROM dtml-var table

I'm trying to write a DTML method to display the results of this
method WITH COLUMN NAMES.  For the life of me, I can't figure out how
to do this.

Basically, I have:

dtml-in "browse_table(table='')" size=1

  dtml-in sequence-item
dtml-var sequence-item
  /dtml-in

/dtml-in

The inner sequence-item gives me the data, but how to I determine the
column name?

-jon

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Another Aiieee.....

2000-11-03 Thread Jon Prettyman

I am once again encountering the mysterious Aiieee error with core
dumps from Zope/Python on a Solaris boxen.

SunOS sparky 5.7 Generic_106541-08 sun4m sparc SUNW,SPARCstation-20
Python 1.5.2 (#1, Oct 24 2000, 11:56:43)  [GCC 2.8.1] on sunos5
Zope-2.2.2
DCOracle 1.3.2
448M ram

I get the following in my STUPID_LOG
2000-11-03T20:42:10 ERROR(200) zdaemon zdaemon: Fri Nov  3 14:42:10 2000: Aiieee! 
17537 exited with error code: 139

/usr/include/sys/errno.h looks like this:
#define ECONNABORTED130 /* Software caused connection abort */
#define ECONNRESET  131 /* Connection reset by peer */
#define ENOBUFS 132 /* No buffer space available */
#define EISCONN 133 /* Socket is already connected */
#define ENOTCONN134 /* Socket is not connected */
/* XENIX has 135 - 142 */
#define ESHUTDOWN   143 /* Can't send after socket shutdown */
#define ETOOMANYREFS144 /* Too many references: can't splice */
#define ETIMEDOUT   145 /* Connection timed out */
#define ECONNREFUSED146 /* Connection refused */
#define EHOSTDOWN   147 /* Host is down */
#define EHOSTUNREACH148 /* No route to host */

What is a 139 error code?  Is it an errno?  I do get core dumps but
for some reason I can't get gdb to read it.  Arghhh.

Crashes appear random.  The box has at most two people accessing
Zope.  It appears ``manage'' related, but I can't be sure.

There is an identical instance of this Zope application running on a
Linux box that does not have this problem.  It is very stable.  We'd
like to use this Solaris boxen for our development work.
-jon

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Want to access ZClass Instance from external program

2000-10-19 Thread Jon Prettyman

This works like a charm.  Thanks much for the help.

-jon

Ender [EMAIL PROTECTED] writes:

 Sorry Jon, i've lead you down a slippery slope...
 
 unlike ttw dtml-methods and the rest of zope which relies on the
 security context soley, for a filesys python method to be exposed
 through the web via xml-rpc it must have a doc string as well as have
 proper credentials.
 
 looking through propertysheets there is no 'proper' way to do this...
 but i lead you down the path, so here is a way back out... 
 
 there are a couple of options.
 
 the easiest is to have dtml_method for this zclass that functions as a
 helper method, 
 like
 
 dtml method -- external_helper
 
 dtml-var "propertysheets.propertyMap()"
 
 and in the client
 
 x = root.subfolder.zclass.external_helper()
 meta_info=eval(x)
 print meta_info
 ({'id': 'vvv', 'type': 'int', 'meta': {}, 'mode': 'w'}, {'id': 'aaa',
 'type': 'lines', 'meta': {}, 'mode': 'w'}, {'id': '', 'type':
 'tokens', 'meta': {}, 'mode': 'w'}, {'id': '122', 'type': 'date',
 'meta': {}, 'mode': 'w'}, {'id': 'ff', 'type': 'float', 'meta': {},
 'mode': 'w'}, {'id': '', 'type': 'text', 'meta': {}, 'mode': 'w'})
 
 or if external_helper returned propertyItems()
 
 [('vvv', 1), ('aaa', ['']), ('', ['ss', 'aa1113', '3', '4']),
 ('122', DateTime('1900/01/01')), ('ff', 455.0), ('', '')]
 
 
 if you're working with DateTime values in your propertysheets this will
 be trickier as you'll need to either retrieve the property you want
 independently or import Zope's DateTime module. also remember to set the
 security on the helper method so its not helping somebody hack your
 site.
 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Want to access ZClass Instance from external program

2000-10-18 Thread Jon Prettyman

Well, I've gotten xmlprclib and fixed it up so I can talk to my
server.  So far I can retrieve objectIds and retrieve objects via an
objectid, but I can't figure out how to get to the property sheets.

Here's what I've got:

server = Server( "http://jonprettyman.com" )

print server

for k,v in
server.EBQ.id_company_apply_html.propertysheets.common.propertyItems():
print "%-15s: %s" % (k, v)

My ZClass has a propertysheet named ``common''

The error I get is:
  -2 Unexpected Zope Error Value
  
and a bunch of HTML which boils down to:

   Resource not found

-jon


Kapil Thangavelu [EMAIL PROTECTED] writes:

 its easiest to it with (IMO)
 
 xml-rpc 
 
 and find your zclasses with calls to objectids and query the
 propertysheets directly for property info.
 
 
 check out 
 
 http://www.zope.org/Members/Amos/xmlrpclib.py
 you'll need to fix a base class and an import.
 
 www.xml-rpc.com
 
 www.xml.com search for amos
 
 and zope.org for howtos on xmlrpc
 
 Cheers
 
 Kapil
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Want to access ZClass Instance from external program

2000-10-18 Thread Jon Prettyman

Adding:
try:
for k in
server.EBQ.id_company_apply_html.propertysheets.propertyIds():
print "%-15s:" % (k)
except Error, v:
print server
print "ERROR", v

Gives me output, although I'm pretty shure it's not the right thing.  
Output:
   title
   base

Both of these are properties of server.EBQ.

-jon

Ender [EMAIL PROTECTED] writes:

 Jon Prettyman wrote:
  
  Well, I've gotten xmlprclib and fixed it up so I can talk to my
  server.  So far I can retrieve objectIds and retrieve objects via an
  objectid, but I can't figure out how to get to the property sheets.
  
  Here's what I've got:
  
  server = Server( "http://jonprettyman.com" )
  
  print server
  
  for k,v in
  server.EBQ.id_company_apply_html.propertysheets.common.propertyItems():
  print "%-15s: %s" % (k, v)
  -jon
 
 hmmm...
 
 try and take it a step back and query the propertysheet container for
  names of propertysheets it contains. you'll need to check out the ZQR 
 for the syntax, i think its propertyIds().
 
 
 you might also want to check that your authenticating with a user
 that has the proper security roles to query this info. 
 
 
 if you're still having problems tell me and i'll play with it once i get
 back from work.
 
 Cheers
 
 Kapil
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZSQL Method AUTHENTICATED_USER

2000-10-18 Thread Jon Prettyman

I'm pretty sure that all variables have to be passed in explicitly
with SQLMethods.  Namespaces are not passed in.

Try specifying username as an argument in the ZSQLMethods edit form
and pass it in like this:
   dtml-in expr=
"lookup_by_username(username=REQUEST.AUTHENTICATED_USER.getUserName()"

(Untested)

-jon

Aaron Straup Cope [EMAIL PROTECTED] writes:

 Hi,
 
 I'm trying to perform a simple MySQL lookup based on the
 AUTHENTICATED_USER. When I test the ZSQL method from the management
 interface, everything works fine. However, when I try to call the method
 from a DTML document, [it] returns nothing.
 
 Is this a namespace issue? I'm stumped and hoping that I'm not staring
 right past the problem. Can anyone point out what it is I am doing
 wrong? Thanks,
 
 a) DTML Document : foo
 
 dtml-with people
  dtml-in lookup_by_username
   dtml-var "username"
  /dtml-in
 /dtml-with
 
 b) ZSQL Method : people.lookup_by_username
 
 select * from people where username = "dtml-var 
 "REQUEST.AUTHENTICATED_USER.getUserName()""
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Want to access ZClass Instance from external program

2000-10-17 Thread Jon Prettyman

I have a folder containing a bunch of ZClass instances that I want to
access from an external (non-web) python application.

I need to be able to read the values of the instance properties.

Is there a way to do this with the ZClient stuff?  If not, what can I
use.  If yes, any pointers?

-jon

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )