Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib wrote at 2005-7-25 15:19 -0400: > ... >socket.gethostname() is not >returning the full canonical name of the machine. "gethostname" is not required to return the FQDN (Fully Qualified Domain Name). This is not your problem. But "gethostbyname(gethostname())" should be able to resolve whatever "gethostname()" returns into an IP address. If you already told us the platform you are using, then I missed this information (or forgot it). If you work under *nix, you may add an entry to "/etc/hosts" that assigns an IP address to the value "gethostname()" returns. I cannot help you much when you work under some variety of Windows. But, I know, Windows knows a "hosts" file as well. Maybe, the same approach works there, too. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Thanks Dieter. You hit the nail on the head. socket.gethostname() is not returning the full canonical name of the machine. But how do I correct this? Any idea? - Asad On Mon, 25 Jul 2005, Dieter Maurer wrote: > Asad Habib wrote at 2005-7-25 09:24 -0400: > >Well, nothing has changed in the mail server setup so I don't know why > >this error is being thrown. > > I have been wrong. The message does not originate from your > mail server. > > >Where can I access smtplib (I cannot locate > >this Python library in my Zope hierarchy)? > > "smtplib" is part of the Python runtime library. > > >Someone else also reported > >receiving this error as I discovered on Google but the issue was not > >resolved. Any help would be appreciated. > > Looking at the "smtplib" source and your traceback reveals: > > "smtplib.SMTP.__init__" is trying to determine the > local hostname. The code looks like this: > > if local_hostname is not None: > self.local_hostname = local_hostname > else: > # RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and > # if that can't be calculated, that we should use a domain literal > # instead (essentially an encoded IP address like [A.B.C.D]). > fqdn = socket.getfqdn() > if '.' in fqdn: > self.local_hostname = fqdn > else: > # We can't find an fqdn hostname, so use a domain literal > addr = socket.gethostbyname(socket.gethostname()) > # your exception is raised in the line above > self.local_hostname = '[%s]' % addr > > > This means that you local system is in a strange state. > Probably, it is unable to determine its hostname. > > Try (in an interactive Python interpreter): > > import socket > socket.gethostname() > socket.gethostbyname(socket.gethostname()) > > > -- > Dieter > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib wrote at 2005-7-25 09:24 -0400: >Well, nothing has changed in the mail server setup so I don't know why >this error is being thrown. I have been wrong. The message does not originate from your mail server. >Where can I access smtplib (I cannot locate >this Python library in my Zope hierarchy)? "smtplib" is part of the Python runtime library. >Someone else also reported >receiving this error as I discovered on Google but the issue was not >resolved. Any help would be appreciated. Looking at the "smtplib" source and your traceback reveals: "smtplib.SMTP.__init__" is trying to determine the local hostname. The code looks like this: if local_hostname is not None: self.local_hostname = local_hostname else: # RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and # if that can't be calculated, that we should use a domain literal # instead (essentially an encoded IP address like [A.B.C.D]). fqdn = socket.getfqdn() if '.' in fqdn: self.local_hostname = fqdn else: # We can't find an fqdn hostname, so use a domain literal addr = socket.gethostbyname(socket.gethostname()) # your exception is raised in the line above self.local_hostname = '[%s]' % addr This means that you local system is in a strange state. Probably, it is unable to determine its hostname. Try (in an interactive Python interpreter): import socket socket.gethostname() socket.gethostbyname(socket.gethostname()) -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Please stay on the list. I meant a real tcp trace, like ethereal. On 25 Jul 2005, at 16:22, Asad Habib wrote: Hello. I used traceroute and it did not return any errors. - Asad On Mon, 25 Jul 2005, Florent Guillaume wrote: Asad Habib <[EMAIL PROTECTED]> wrote: Maurer, I am certain that this is a Zope issue that has not been figured out as yet. I was even able to connect to my SMTP server via the Terminal application on a Mac. Do I have any other options? You should do a network trace to see what makes the SMTP server puke. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib <[EMAIL PROTECTED]> wrote: > Maurer, I am certain that this is a Zope issue that has not been figured > out as yet. I was even able to connect to my SMTP server via the Terminal > application on a Mac. Do I have any other options? You should do a network trace to see what makes the SMTP server puke. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Maurer, I am certain that this is a Zope issue that has not been figured out as yet. I was even able to connect to my SMTP server via the Terminal application on a Mac. Do I have any other options? - Asad ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Well, nothing has changed in the mail server setup so I don't know why this error is being thrown. Where can I access smtplib (I cannot locate this Python library in my Zope hierarchy)? Someone else also reported receiving this error as I discovered on Google but the issue was not resolved. Any help would be appreciated. Thanks. - Asad On Sun, 24 Jul 2005, Dieter Maurer wrote: > Asad Habib wrote at 2005-7-22 09:19 -0400: > >If it helps, the last lines in the traceback are as follows: > > > >Module DocumentTemplate.DT_String, line 474, in __call__ > >Module Products.MailHost.SendMailTag, line 116, in render > >Module Products.MailHost.MailHost, line 125, in send > >Module Products.MailHost.MailHost, line 144, in _send > >Module smtplib, line 254, in __init__ > >gaierror: (7, 'No address associated with nodename') > > This error comes from your mail server. > Checks its (the mail server's) documentation to make sense of it. > > > -- > Dieter > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib wrote at 2005-7-22 09:19 -0400: >If it helps, the last lines in the traceback are as follows: > >Module DocumentTemplate.DT_String, line 474, in __call__ >Module Products.MailHost.SendMailTag, line 116, in render >Module Products.MailHost.MailHost, line 125, in send >Module Products.MailHost.MailHost, line 144, in _send >Module smtplib, line 254, in __init__ >gaierror: (7, 'No address associated with nodename') This error comes from your mail server. Checks its (the mail server's) documentation to make sense of it. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback?
On Mon, May 29, 2000 at 05:33:20AM -0400, Patrick J.M. Keane wrote: > I would like to ultimately remove the python traceback error code > display from messages (printed after standard_html_error fires off). > However, I'm not sure how to disable this? By default Zope is installed to run in debug mode. One of the effects of running in debug mode is that tracebacks are displayed in error messages as visible HTML. If you switch debug mode off, tracebacks will be included in error messages as HTML comments, thus rendering them invisible from the unsuspecting site visitor. To switch debug mode off, you should start Zope without the -D command line switch. In a stock Zope install, this means editing 'start' (or 'start.bat' on win32) and removing the flag there. -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ 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] Traceback? Codechange!
On Mon, May 29, 2000 at 04:14:19PM +0100, Chris Withers wrote: > Martijn Pieters wrote: > > > > Do I have to copy this message to the collector and wait for > > > > a couple of months or can we do it instantly? ;-) > > > > Do you still experience the Collector as black hole? Could you report this to > > Tres Seaver, the person currently monitoring the COllector and cleaning it > > out? Thanks! > > It HAS got a lot better since Tres started, but there's still a load of > cruft in there; stuff that's not completed but is so old that it's now > irrelevant. > > A small point, could all searches/browsing/etc all be sorted in reverse > date order? I don't think we are going to make any changes to the collector anymore, see below. > That way I wouldn't have to trudge through a lot of Zope 1.x problems > just to get to the stuff that's relevant. > > On a more radical thought, there was talk a while back of ditching the > collector in favour of a Tracker, whatever happened to that plan? This is on Ethan's To-Do list at: http://www.zope.org/Tracker/9 and because it is on his list, there is no use in maintaining the old Collector's behaviour. -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ 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] Traceback? Codechange!
Martijn Pieters wrote: > > > Do I have to copy this message to the collector and wait for > > > a couple of months or can we do it instantly? ;-) > > Do you still experience the Collector as black hole? Could you report this to > Tres Seaver, the person currently monitoring the COllector and cleaning it > out? Thanks! It HAS got a lot better since Tres started, but there's still a load of cruft in there; stuff that's not completed but is so old that it's now irrelevant. A small point, could all searches/browsing/etc all be sorted in reverse date order? That way I wouldn't have to trudge through a lot of Zope 1.x problems just to get to the stuff that's relevant. On a more radical thought, there was talk a while back of ditching the collector in favour of a Tracker, whatever happened to that plan? cheers, Chris ___ 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] Traceback? Codechange!
On Mon, May 29, 2000 at 04:08:59PM +0200, Marcus Collins wrote: > > This is very ugly imho. It schould be sufficient, if one includes the > > traceback-variable into the standard-error where its appropriate. > > In the current implementation it will break the HTML-standard with > > code outside and additionally makes it impossible to get > > error-messages to picky browsers, such as WAP-devices. > > I second this -- despite the traceback being sometimes crucial to debug > errors, its inclusion after the closing HTML tag goes against the standard. > Furthermore, the traceback *could* sometimes be considered to pose a > security risk, since it exposes the names of methods in the call stack, some > of which should not necessarily be callable through the web. Or am I just > being paranoid? > > > Is it ok if we remove these lines? > > I think there should be a knob to turn it off... and not for the whole site, > but for a subtree (perhaps even on a folder-by-folder basis). That way, the > folks who develop and deploy on a single Zope server (does anyone do this?) > can keep their tracebacks on sites under development, but get rid of them on > live sites. We should probably switch to error_tb in the default standard_error_message, including detecting if Zope is running in debug mode and using and when appropriate. You can then redefine standard_error_message to exclude the traceback completely if you want to, or only in certain parts of the site. Seeing object names in a traceback doesn't necessarily mean that a site visitor has access to those objects, nor does completely not giving a traceback protect those objects from being called diectly. Only properly configured security settings on those objects themselves gives proper security, and then it doesn't matter wether or not their names are publicly visible. > > Do I have to copy this message to the collector and wait for > > a couple of months or can we do it instantly? ;-) Do you still experience the Collector as black hole? Could you report this to Tres Savier, the person currently monitoring the COllector and cleaning it out? Thanks! In the meantime, please do report this there, this would be a useful change, if only to let more people understand how to switch tracebacks off.. -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ 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] Traceback? Codechange!
> -Original Message- > From: Tino Wildenhain [mailto:[EMAIL PROTECTED]] > Sent: 29 May 2000 15:44 > To: Marcus Collins > Cc: 'Chris Withers'; Martijn Pieters; Patrick J.M. Keane; > [EMAIL PROTECTED] > Subject: Re: [Zope] Traceback? Codechange! > > Hi, [...] > This is very ugly imho. It schould be sufficient, if one includes the > traceback-variable into the standard-error where its appropriate. > In the current implementation it will break the HTML-standard with > code outside and additionally makes it impossible to get > error-messages to picky browsers, such as WAP-devices. I second this -- despite the traceback being sometimes crucial to debug errors, its inclusion after the closing HTML tag goes against the standard. Furthermore, the traceback *could* sometimes be considered to pose a security risk, since it exposes the names of methods in the call stack, some of which should not necessarily be callable through the web. Or am I just being paranoid? > Is it ok if we remove these lines? I think there should be a knob to turn it off... and not for the whole site, but for a subtree (perhaps even on a folder-by-folder basis). That way, the folks who develop and deploy on a single Zope server (does anyone do this?) can keep their tracebacks on sites under development, but get rid of them on live sites. > Do I have to copy this message to the collector and wait for > a couple of months or can we do it instantly? ;-) *grin* > Regards > Tino Wildenhain -- Marcus ___ 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] Traceback? Codechange!
Tino Wildenhain wrote: > Do I have to copy this message to the collector and wait for > a couple of months or can we do it instantly? ;-) Do both, that way, hopefully the change will make it into 2.2 and you get your problem fixed now. I always thought the line was included in the standard_error_message and I'm a bit surprised that it's actually such a nasty hack that doesn't produce correct HTML :( cheers, Chris ___ 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] Traceback? Codechange!
Hi, Marcus Collins wrote: > > > -Original Message- > > From: Chris Withers [mailto:[EMAIL PROTECTED]] > > Sent: 29 May 2000 14:01 > > To: Martijn Pieters > > Cc: Patrick J.M. Keane; [EMAIL PROTECTED] > > Subject: Re: [Zope] Traceback? > > > > Martijn Pieters wrote: > > > If you switch debug mode off, tracebacks will be included > > > in error messages as HTML comments, thus rendering them > > > invisible from the unsuspecting site visitor. > > > > Is that true even if you override standard_error_message? > > I believe so, and empiracally this appears to be the case. From > HTTPResponse.py: > > def _traceback(self,t,v,tb): > tb=self.format_exception(t,v,tb,200) > tb=join(tb,'\n') > tb=self.quoteHTML(tb) > if self.debug_mode: _tbopen, _tbclose = '', '' > else: _tbopen, _tbclose = '' > return "\n%s\n%s\n%s" % (_tbopen, tb, _tbclose) > > which is appended to the body of the error message when an exception occurs. This is very ugly imho. It schould be sufficient, if one includes the traceback-variable into the standard-error where its appropriate. In the current implementation it will break the HTML-standard with code outside and additionally makes it impossible to get error-messages to picky browsers, such as WAP-devices. Is it ok if we remove these lines? Do I have to copy this message to the collector and wait for a couple of months or can we do it instantly? ;-) Regards Tino Wildenhain ___ 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] Traceback?
On Mon, May 29, 2000 at 01:00:55PM +0100, Chris Withers wrote: > Martijn Pieters wrote: > > If you switch debug mode off, tracebacks will be included in error messages as > > HTML comments, thus rendering them invisible from the unsuspecting site > > visitor. > > Is that true even if you override standard_error_message? Yes, the stacktrace is appended to whatever standard_error_message returns, IIRC. -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ 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] Traceback?
> -Original Message- > From: Chris Withers [mailto:[EMAIL PROTECTED]] > Sent: 29 May 2000 14:01 > To: Martijn Pieters > Cc: Patrick J.M. Keane; [EMAIL PROTECTED] > Subject: Re: [Zope] Traceback? > > Martijn Pieters wrote: > > If you switch debug mode off, tracebacks will be included > > in error messages as HTML comments, thus rendering them > > invisible from the unsuspecting site visitor. > > Is that true even if you override standard_error_message? I believe so, and empiracally this appears to be the case. From HTTPResponse.py: def _traceback(self,t,v,tb): tb=self.format_exception(t,v,tb,200) tb=join(tb,'\n') tb=self.quoteHTML(tb) if self.debug_mode: _tbopen, _tbclose = '', '' else: _tbopen, _tbclose = '' return "\n%s\n%s\n%s" % (_tbopen, tb, _tbclose) which is appended to the body of the error message when an exception occurs. hth, -- Marcus ___ 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] Traceback?
Martijn Pieters wrote: > If you switch debug mode off, tracebacks will be included in error messages as > HTML comments, thus rendering them invisible from the unsuspecting site > visitor. Is that true even if you override standard_error_message? cheers, Chris ___ 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] Traceback?
Take off the -D switch in your zope start script. will let you show traceback programmatically. Believe me, you will miss them once you turn it off. Chien-pin On Mon, 29 May 2000, Patrick J.M. Keane wrote: > > I would like to ultimately remove the python traceback error code > display from messages (printed after standard_html_error fires off). > However, I'm not sure how to disable this? > > Thanks > PK > > > > ___ > 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 )