I have GLASS configured on a Ubuntu 12.04 server. Independently of GLASS, a postfix SMTP server apparently works because a command like this does send out an email:
On the other hand, when I enter the following script in Topaz I immediatelly get an error message: doit | client | client := SendMail new. client user: 'glass'; mailhostName: 'myhost.com'; smtpPort: 25; from: '[hidden email]'; to: '[hidden email]'; text: 'Greetings from GLASS'; send. % the error message being:
ERROR 2010 , a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand #'isEmpty' (MessageNotUnderstood) Anyone got any ideas what may be wrong?
Thanks,
Alejandro
|
Alejandro.
It looks like you using the correct code, so I'm curious about the error itself. In topaz, before running the doit, use the following settings: level 3 display oops then run the doit and reply with the result of doing `where' .... the combination will give us a stack a couple of levels deep so I can see more information about the error. Dale From: "Alejandro Zuzek" <[hidden email]> To: [hidden email] Sent: Friday, May 10, 2013 8:47:47 PM Subject: [GS/SS Beta] How to send mail from Gemstone? I have GLASS configured on a Ubuntu 12.04 server. Independently of GLASS, a postfix SMTP server apparently works because a command like this does send out an email:
On the other hand, when I enter the following script in Topaz I immediatelly get an error message: doit | client | client := SendMail new. client user: 'glass'; mailhostName: 'myhost.com'; smtpPort: 25; from: '[hidden email]'; to: '[hidden email]'; text: 'Greetings from GLASS'; send. % the error message being:
ERROR 2010 , a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand #'isEmpty' (MessageNotUnderstood) Anyone got any ideas what may be wrong?
Thanks,
Alejandro
|
Hi Dale, I used the settings you suggested and run again the same piece of code and I get more information about the error, but I don't see a stack three levels deep:----------------------------------------------------- GemStone: Error Nonfatal a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand #'isEmpty' Error Category: 231169 [GemStone] Number: 2010 Arg Count: 4 Context : 106066689 exception : 106063873 Arg 1: [3261441 sz:7 cls: 110849 Symbol] isEmpty Arg 2: [2 sz:0 cls: 74241 SmallInteger] 0 == 0x0 Arg 3: [20 sz:0 cls: 76289 UndefinedObject] nil Arg 4: [106063617 sz:0 cls: 66817 Array] a Array doit | client | client := SendMail new. client user: 'glass'; mailhostName: 'myhost.com'; smtpPort: 25; from: '[hidden email]'; to: '[hidden email]'; text: 'Greetings from GLASS'; send. % Host names are not the real ones. On Mon, May 13, 2013 at 1:59 PM, Dale K Henrichs <[hidden email]> wrote:
|
Alejandro,
I want to see the full stack from the `where` command ... I would like to know the context of the #isEmpty message send... Dale From: "Alejandro Zuzek" <[hidden email]> |
Thanks Dale, you are dealing with a novice GLASS user here and I didn't get the 'where' reference initialy. Here goes the stack trace: topaz 1> where ==> 1 MessageNotUnderstood >> defaultAction (envId 0) @3 line 3 [methId 4809473] 2 AbstractException >> _signalWith: (envId 0) @5 line 25 [methId 4395521]
3 AbstractException >> signal (envId 0) @2 line 47 [methId 4394241] 4 Object >> doesNotUnderstand: (envId 0) @9 line 10 [methId 3544321] 5 Object >> _doesNotUnderstand:args:envId:reason: (envId 0) @7 line 12 [methId 3535105]
6 SendMail >> readSmtpResult (envId 0) @8 line 6 [methId 51749377] 7 SendMail >> send (envId 0) @10 line 9 [methId 51754241] 8 Executed Code @10 line 10 [methId 107650049]
9 GsNMethod class >> _gsReturnToC (envId 0) @1 line 1 [methId 4509441] [GsProcess 107943681]
On Thu, May 16, 2013 at 3:53 PM, Dale K. Henrichs <[hidden email]> wrote:
|
Alejandro,
No worries ... I assumed you were a bit more familiar with topaz:) From the stack I can tell that GsSocket>>readString: is returning a nil result, which means that an error has occurred while reading the socket. If you change the code in SendMail>>readSmtpResult to: result := self readString: 500. result ifNil: [ self error: self lastErrorString ]. result isEmpty an Error will be signaled with a message that should shed more light on what is happening and we'll move on from there ... Something like this code probably ought to be added to SendMail code ... I'll submit a bug so we don't forget... Dale From: "Alejandro Zuzek" <[hidden email]> |
Hi Dale, I changed SendMail>>readSmtpResult as instructed with the following result after running same piece of code:----------------------------------------------------- GemStone: Error Nonfatal a UserDefinedError occurred (error 2318), reason:halt, recv(13,0x7f5e03d60408,50 0,0) failed with errno=107,ENOTCONN, Socket is not connected Error Category: 231169 [GemStone] Number: 2318 Arg Count: 1 Context : 174402817 exception : 174401281 Arg 1: [20 sz:0 cls: 76289 UndefinedObject] nil topaz 1> where ==> 1 AbstractException >> _signalWith: (envId 0) @6 line 25 [methId 4395521] 2 AbstractException >> signal (envId 0) @2 line 47 [methId 4394241] 3 Object >> error: (envId 0) @6 line 7 [methId 3420673] 4 SendMail >> readSmtpResult (envId 0) @10 line 6 [methId 174420225] 5 SendMail >> send (envId 0) @10 line 9 [methId 51754241] 6 Executed Code @10 line 20 [methId 174395137] 7 GsNMethod class >> _gsReturnToC (envId 0) @1 line 1 [methId 4509441] [GsProcess 174402817] Alejandro On Fri, May 17, 2013 at 8:58 PM, Dale K. Henrichs <[hidden email]> wrote:
|
This is just to say I am having the EXACT same issue. Tried everything and nothing worked. Alejandro, did you finally find a way? Thanks in advance, On Sat, May 18, 2013 at 5:52 PM, Alejandro Zuzek <[hidden email]> wrote:
|
I've seen ENOTCONN pop up when using ZincEasy(?) on a heavily
loaded server and I "fixed" that by adding client-side retries.
Here's some info on ENOTCONN from stack overflow[1] that I found "helpful": > ENOTCONN , as others have pointed out, simply
means that the socket is not connected. > This doesn't necessarily mean that connect
failed. The socket may well have been > connected previously, it just wasn't at the time of the call that resulted in ENOTCONN .So perhaps, retries on an ENOTCONN would work? Dale [1] http://stackoverflow.com/questions/900042/what-causes-the-enotconn-error On 08/11/2015 01:01 PM, Mariano
Martinez Peck wrote:
|
We also experienced issues sending mails using SendMail in Gemstone 3.1
What we did is replace the SendMail>>connectTo:on: methode override with the following implementation. That works for us.
Can you check if that works? I think we never actually recorded this an issue on the issue tracker, but first let us know if the above works. cheers Johan
|
Also see http://forum.world.st/Issue-358-in-glassdb-Socket-error-during-SendMail-gt-gt-readSmtpResult-leads-to-isEmpty-MNU-td4688306.html
|
Hi everyone, I never found the solution to the problem I had sending mail from Gemstone, so I ended up developing an ugly workaround. I am still using Gemstone 3.1 and I will try the solutions outlined above by others. Thanks, Alejandro On Wed, Aug 12, 2015 at 6:16 AM, Johan Brichau <[hidden email]> wrote:
|
In reply to this post by Johan Brichau-3
On Wed, Aug 12, 2015 at 6:14 AM, Johan Brichau <[hidden email]> wrote:
Thanks Johan, you nailed it. Yes, it works perfectly. I have a couple of other questions but i need to investigate more before asking :) Shall we open an issue? Thanks!
|
Hi, It didn't work for me. I am running Gemstone 3.1.0.4 and after implementing that override of conectTo:on: I get does not understand for connectTo:on:timeoutMs:. I've checked and there are no implementors of that method on my system. Mariano and Johan, can you share which versions of GS you have where this solution worked? Also where in your systems is connectTo:on:timeoutMs: implemented? Thanks, Alejandro On Wed, Aug 12, 2015 at 1:41 PM, Mariano Martinez Peck <[hidden email]> wrote:
|
Hi Alejandro,
This is implemented on the GsSocket class, which is the superclass of SendMail I check this on a GS 3.1.0.6 running a recent version of GLASS1 but I recall this issue existed already in GS 3.1.0.4 running GLASS 1.0-beta-9 Johan
|
In reply to this post by Mariano Martinez Peck
I recorded it here: https://github.com/GsDevKit/GsDevKit/issues/72 I would like to hear someone’s more informed opinion about this “fix” because it was a bit trial and error for us… Johan
|
In reply to this post by Johan Brichau-3
Hi Johan, In GS 3.1.0.4 there is no implementation for connectTo:on:timeoutMs: in GsSocket. In fact, looking for implementors across the whole systems returns nothing. I am planning to jump to 3.2.7 soon, so I hope this issue is either solved in that version or at least there exists GsSocket>>connectTo:on:timeoutMs: on which base the override of connectTo:on: in SendMail. By the way, I've seen the SendMail issue as early as in 3.1.0.1, although until I can get the override to work, I am really not sure if I am experiencing the same issue as you guys or if there is any other problem in my system. Sincerely, Alejandro On Thu, Aug 13, 2015 at 4:13 AM, Johan Brichau <[hidden email]> wrote:
|
The method #connectTo:on:timeoutMs: comes from any of those GLASS packages? If true, you may want to try to use GsUpgrader. Which version of Seaside are you using? I wonder if getting the last Grease could break it... Johan? Anyway, first, make a full backup of your stone. Then, run something like: MCPlatformSupport commitOnAlmostOutOfMemoryDuring: [ Gofer new package: 'GsUpgrader-Core'; load. (Smalltalk at: #GsUpgrader) upgradeGLASS; upgradeGLASS1; upgradeMetacello; upgradeGrease. ]. I think that should bring #connectTo:on:timeoutMs: if this guy was from GLASS package. On Thu, Aug 13, 2015 at 9:43 AM, Alejandro Zuzek <[hidden email]> wrote:
|
I’m pretty sure this is a method that comes with the standard image you get when downloading the 3.1.0.6 web edition.
We had this issue on day 1 we started working with a 3.1.0.2 (we had no issue in 2.4.x) and fixed it like that. So… either this is not a GLASS image at all, or something else is going on... Johan ps: upgrading Grease works fine even if you use Seaside 3.0.x (instead of 3.1). We are currently running that configuration in production as well.
|
I'm inclined to thing that GsSocket>>connectTo:on:timeoutMs: comes with the standard GS image. GsSocket>>connectTo:on: is in the 'Client Operations' category and the same is probably true for connectTo:on:timeoutMs: . If it was a method added by GLASS, I'd expect a category starting with *. Anyway, I don't have access to my system right now, but as soon as I can, I will see if just by upgrading GLASS I can get the GsSocket>>connectTo:on:timeoutMs: method. If that doesn't work, I'll upgrade to 3.2.7. On Thu, Aug 13, 2015 at 9:58 AM, Johan Brichau <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |