• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Once in a while I get a report of "Invalid Activation Code" when users try to activate their account on twiki.org. We have 30 regs a day in average, the error happens only once a week or so (I think.)

The user's reg file is missing in the data/RegistrationApprovals/ directory, hence he can't activate the registration. However, he got the how to activate e-mail (user forwarded it to me, and me as admin got it as well.)

Here is the TWiki log: (user name obfuscated as FirstnameLastname)

| 08 Aug 2006 - 12:46 | TWikiGuest | view | TWiki.TWikiRegistration |  Mozilla | 200.195.147.135 |
| 08 Aug 2006 - 12:46 | RobertoRitter | regstart | Main.FirstnameLastname| xxxxxx@gmail.com | 200.195.147.135 |
| 08 Aug 2006 - 13:03 | TWikiGuest | view | TWiki04.TWikiRegistration |  Mozilla | 200.195.147.135 |
| 08 Aug 2006 - 13:03 | TWikiGuest | view | TWiki.TWikiRegistration |  Mozilla | 200.195.147.135 |

Apache error_log: (use name and path obfuscated)

[Tue Aug 08 12:48:07 2006] [error] [client 130.118.24.138] File does not exist: /path/to/htdocs/', referer: http://twiki.org/
********************************
ERROR: Can't send mail using Net::SMTP. Can't connect to '127.0.0.1' at /path/to/share/perl/5.8.8/CGI/Carp.pm line 314.
 at /path/to/share/perl/5.8.8/CGI/Carp.pm line 314
        CGI::Carp::realdie('ERROR: Can\'t send mail using Net::SMTP. Can\'t connect to \'...') called at /path/to/share/perl/5.8.8/CGI/Carp.pm line 385
        CGI::Carp::die('ERROR: Can\'t send mail using Net::SMTP. Can\'t connect to \'...') called at /path/to/twiki/lib/TWiki/Net.pm line 297
        TWiki::Net::_sendEmailByNetSMTP('TWiki::Net=HASH(0x840784)', 'Date: Tue, 08 Aug 2006 19:48:18 GMT\x{a}From: Peter Thoeny <peter...') called at /path/to/twiki/lib/TWiki/Net.pm line 191
        TWiki::Net::__ANON__() called at /path/to/twiki/lib/CPAN/lib/Error.pm line 387
        eval {...} called at /path/to/twiki/lib/CPAN/lib/Error.pm line 379
        Error::subs::try('CODE(0x739270)', 'HASH(0xd7aadc)') called at /path/to/twiki/lib/TWiki/Net.pm line 207
        TWiki::Net::sendEmail('TWiki::Net=HASH(0x840784)', 'From: Peter Thoeny <peter@structuredwikis.com>\x{a}To: Firstname La...') called at /path/to/twiki/lib/TWiki/UI/Register.pm line 922
        TWiki::UI::Register::_emailRegistrationConfirmations('TWiki=HASH(0x244c0)', 'HASH(0xc9d358)') called at /path/to/twiki/lib/TWiki/UI/Register.pm line 754
        TWiki::UI::Register::finish('TWiki=HASH(0x244c0)', '/home/twiki/data/RegistrationApprovals') called at /path/to/twiki/lib/TWiki/UI/Register.pm line 89
        TWiki::UI::Register::register_cgi('TWiki=HASH(0x244c0)') called at /path/to/twiki/lib/TWiki/UI.pm line 97
        TWiki::UI::__ANON__() called at /path/to/twiki/lib/CPAN/lib/Error.pm line 387
        eval {...} called at /path/to/twiki/lib/CPAN/lib/Error.pm line 379
        Error::subs::try('CODE(0xc9d2bc)', 'HASH(0xc9cea8)') called at /path/to/twiki/lib/TWiki/UI.pm line 146
        TWiki::UI::run('CODE(0x1cb42c)') called at /path/to/twiki/bin/register line 31

********************************
********************************
OopsException(attention/send_mail_error web=>Main topic=>FirstnameLastname params=>ERROR: Can't send mail using Net::SMTP. Can't connect to '127.0.0.1' at /path/to/share/perl/5.8.8/CGI/Carp.pm line 314.
 at /path/to/share/perl/5.8.8/CGI/Carp.pm line 314
        CGI::Carp::realdie('ERROR: Can\'t send mail using Net::SMTP. Can\'t connect to \'...') called at /path/to/share/perl/5.8.8/CGI/Carp.pm line 385
        CGI::Carp::die('ERROR: Can\'t send mail using Net::SMTP. Can\'t connect to \'...') called at /path/to/twiki/lib/TWiki/Net.pm line 297
        TWiki::Net::_sendEmailByNetSMTP('TWiki::Net=HASH(0x840784)', 'Date: Tue, 08 Aug 2006 19:48:18 GMT\x{a}From: Peter Thoeny <peter...') called at /path/to/twiki/lib/TWiki/Net.pm line 191
        TWiki::Net::__ANON__() called at /path/to/twiki/lib/CPAN/lib/Error.pm line 387
        eval {...} called at /path/to/twiki/lib/CPAN/lib/Error.pm line 379
        Error::subs::try('CODE(0x739270)', 'HASH(0xd7aadc)') called at /path/to/twiki/lib/TWiki/Net.pm line 207
        TWiki::Net::sendEmail('TWiki::Net=HASH(0x840784)', 'From: Peter Thoeny <peter@structuredwikis.com>\x{a}To: Firstname La...') called at /path/to/twiki/lib/TWiki/UI/Register.pm line 922
        TWiki::UI::Register::_emailRegistrationConfirmations('TWiki=HASH(0x244c0)', 'HASH(0xc9d358)') called at /path/to/twiki/lib/TWiki/UI/Register.pm line 754
        TWiki::UI::Register::finish('TWiki=HASH(0x244c0)', '/home/twiki/data/RegistrationApprovals') called at /path/to/twiki/lib/TWiki/UI/Register.pm line 89
        TWiki::UI::Register::register_cgi('TWiki=HASH(0x244c0)') called at /path/to/twiki/lib/TWiki/UI.pm line 97
        TWiki::UI::__ANON__() called at /path/to/twiki/lib/CPAN/lib/Error.pm line 387
        eval {...} called at /path/to/twiki/lib/CPAN/lib/Error.pm line 379
        Error::subs::try('CODE(0xc9d2bc)', 'HASH(0xc9cea8)') called at /path/to/twiki/lib/TWiki/UI.pm line 146
        TWiki::UI::run('CODE(0x1cb42c)') called

Too many failures sending mail)

Apache access_log: (use name and path obfuscated)

200.195.147.135 - - [08/Aug/2006:12:46:57 -0700] "GET /cgi-bin/oops/Main/TWikiRegistration?template=oopsattention;def=confirm;param1=xxxxxx%40gmail.com HTTP/1.0" 200 2725 "http://twiki.org/cgi-bin/view/TWiki/TWikiRegistration" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
200.195.147.135 - - [08/Aug/2006:12:47:55 -0700] "GET /cgi-bin/register?action=verify;code=FirstnameLastname.4860659372 HTTP/1.0" 302 20 "http://mail.google.com/mail/?&ik=944c069dcc&view=cv&search=inbox&th=10cef55b97cdea63&lvp=1&cvp=0&qt=&zx=7ylzfp-5qg0if" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
200.195.147.135 - - [08/Aug/2006:12:48:20 -0700] "GET /cgi-bin/oops/Main/FirstnameLastname?template=oopsattention;def=send_mail_error;param1=ERROR:%20Can't%20send%20mail%20using%20Net::SMTP.%20Can't%20connect%20to%20'127.0.0.1'%20at%20/path/to/share/perl/5.8.8/CGI/Carp.pm%20line%20314.%0a%20at%20/path/to/share/perl/5.8.8/CGI/Carp.pm%20line%20314%0a%09CGI::Carp::realdie('ERROR:%20Can%5c't%20send%20mail%20using%20Net::SMTP.%20Can%5c't%20connect%20to%20%5c'...')%20called%20at%20/path/to/share/perl/5.8.8/CGI/Carp.pm%20line%20385%0a%09CGI::Carp::die('ERROR:%20Can%5c't%20send%20mail%20using%20Net::SMTP.%20Can%5c't%20connect%20to%20%5c'...')%20called%20at%20/path/to/twiki/lib/TWiki/Net.pm%20line%20297%0a%09TWiki::Net::_sendEmailByNetSMTP('TWiki::Net%3dHASH(0x840784)'%2c%20'Date:%20Tue%2c%2008%20Aug%202006%2019:48:18%20GMT%5cx%7ba%7dFrom:%20Peter%20Thoeny%20%3cpeter...')%20called%20at%20/path/to/twiki/lib/TWiki/Net.pm%20line%20191%0a%09TWiki::Net::__ANON__()%20called%20at%20/path/to/twiki/lib/CPAN/lib/Error.pm%20line%20387%0a%09eval%20%7b...%7d%20called%20at%20/path/to/twiki/lib/CPAN/lib/Error.pm%20line%20379%0a%09Error::subs::try('CODE(0x739270)'%2c%20'HASH(0xd7aadc)')%20called%20at%20/path/to/twiki/lib/TWiki/Net.pm%20line%20207%0a%09TWiki::Net::sendEmail('TWiki::Net%3dHASH(0x840784)'%2c%20'From:%20Peter%20Thoeny%20%3cpeter%40structuredwikis.com%3e%5cx%7ba%7dTo:%20Firstname%20La...')%20called%20at%20/path/to/twiki/lib/TWiki/UI/Register.pm%20line%20922%0a%09TWiki::UI::Register::_emailRegistrationConfirmations('TWiki%3dHASH(0x244c0)'%2c%20'HASH(0xc9d358)')%20called%20at%20/path/to/twiki/lib/TWiki/UI/Register.pm%20line%20754%0a%09TWiki::UI::Register::finish('TWiki%3dHASH(0x244c0)'%2c%20'/home/twiki/data/RegistrationApprovals')%20called%20at%20/path/to/twiki/lib/TWiki/UI/Register.pm%20line%2089%0a%09TWiki::UI::Register::register_cgi('TWiki%3dHASH(0x244c0)')%20called%20at%20/path/to/twiki/lib/TWiki/UI.pm%20line%2097%0a%09TWiki::UI::__ANON__()%20called%20at%20/path/to/twiki/lib/CPAN/lib/Error.pm%20line%20387%0a%09eval%20%7b...%7d%20called%20at%20/path/to/twiki/lib/CPAN/lib/Error.pm%20line%20379%0a%09Error::subs::try('CODE(0xc9d2bc)'%2c%20'HASH(0xc9cea8)')%20called%20at%20/path/to/twiki/lib/TWiki/UI.pm%20line%20146%0a%09TWiki::UI::run('CODE(0x1cb42c)')%20called%0a%0aToo%20many%20failures%20sending%20mail HTTP/1.0" 200 3135 "http://mail.google.com/mail/?&ik=944c069dcc&view=cv&search=inbox&th=10cef55b97cdea63&lvp=1&cvp=0&qt=&zx=7ylzfp-5qg0if" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
200.195.147.135 - - [08/Aug/2006:12:48:42 -0700] "GET /cgi-bin/register?action=verify&code=FirstnameLastname.4860659372 HTTP/1.0" 302 20 "http://twiki.org/cgi-bin/oops/Main/TWikiRegistration?template=oopsattention;def=confirm;param1=xxxxxx%40gmail.com" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
200.195.147.135 - - [08/Aug/2006:12:49:05 -0700] "GET /cgi-bin/oops/Main/WebHome?template=oopsattention;def=bad_ver_code;param1=FirstnameLastname.4860659372;param2=. HTTP/1.0" 200 2671 "http://twiki.org/cgi-bin/oops/Main/TWikiRegistration?template=oopsattention;def=confirm;param1=xxxxxx%40gmail.com" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
200.195.147.135 - - [08/Aug/2006:12:49:45 -0700] "GET /cgi-bin/register?action=verify&code=FirstnameLastname.4860659372 HTTP/1.0" 302 20 "http://twiki.org/cgi-bin/oops/Main/WebHome?template=oopsattention;def=bad_ver_code;param1=FirstnameLastname.4860659372;param2=." "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
200.195.147.135 - - [08/Aug/2006:12:50:03 -0700] "GET /cgi-bin/oops/Main/WebHome?template=oopsattention;def=bad_ver_code;param1=FirstnameLastname.4860659372;param2=. HTTP/1.0" 200 2671 "http://twiki.org/cgi-bin/oops/Main/WebHome?template=oopsattention;def=bad_ver_code;param1=FirstnameLastname.4860659372;param2=." "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
200.195.147.135 - - [08/Aug/2006:12:50:46 -0700] "GET /cgi-bin/register?action=verify&code=4860659372 HTTP/1.0" 302 20 "http://twiki.org/cgi-bin/oops/Main/WebHome?template=oopsattention;def=bad_ver_code;param1=FirstnameLastname.4860659372;param2=." "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"

The transient send mail error might not be avoidable, but the registration process should not die half way through. It should be an all or nothing transaction, or, alternatively, a registration that finishes and shows a send mail error message in addition to the oops message at the end.

-- PTh

Same user tried to register again, it worked the second time.

-- PTh

This is probably due to a known kmail bug. See http://twiki.org/cgi-bin/view/Support/InvalidActivationCodeKonqueror

In the absence of more information, that's my best guess, so I'm going to discard this. Please re-open it if more information comes to light.

CC

I am re-opening this, I provided a lot of bug details. The transient send mail error might not be avoidable, but the registration process should not die half way through. It should be an all or nothing transaction, or, alternatively, a registration that finishes and shows a send mail error message in addition to the oops message at the end. I changed the summary to reflect better what should be fixed.

You can simulate the transient error by throwing an exception when sending a mail.

Please let's try to increase the quality of TWiki, please do not disregard bugs; especially bugs that give a bad first time impression to prospects and users.

-- PTh

Fair point. If an error occurs during the registration validation process, it should not stop the process from completing or leave it in a transient state.

CC

OK, analysis after wasting a couple of precious hours. The summary is, I can't make the registration process fail by breaking mail.

There are two times it sends mail; once with the verification code (if verifications are on) and then with the confirmation mail. The confirmation mails are relatively unimportant; if a send of a confirmation mail fails, registration just continues. If a send of a verification mail fails, it reports that to the user in an oops screen. No data is written other than the registration cache in RegistrationApprovals.

Now, the specific case that triggered this report I believe arises after a user "double verifies", due to the kmail bug submitting the same request twice, as can be seen in the access log above. In this case the second activation is indeed invalid, and the message is perfectly correct. The user has already been registered.

I have improved the messages from registration (which will of course require a cycle through the translations loop). If you can reproduce a problem where the registration process "dies halfway through", or you feel my detailed analysis is in some way flawed, then please re-open this report.

CC

4.1.0 released

KJL

ItemTemplate
Summary Non-graceful error handling on mail issue during registration
ReportedBy TWiki:Main.PeterThoeny
Codebase 4.0.2
SVN Range TWiki-4.1-beta1, Sun, 23 Jul 2006, build 11129
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins 11572
TargetRelease minor
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2007-01-16 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback