Skip Menu |

This queue is for tickets about the VUser-Google-ProvisioningAPI CPAN distribution.

Report information
The Basics
Id: 55350
Status: new
Priority: 0/
Queue: VUser-Google-ProvisioningAPI

People
Owner: Nobody in particular
Requestors: justin.Doyle [...] dcu.ie
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.24
Fixed in: (no value)



Subject: Possible problem with CreateNickname ?
Hi, I am experiencing this error intermittently when creating our student accounts. Creating Gmail account for joe.bloggs22@mail.dcu.ie OK: Add account for joe.bloggs22 File does not exist: 500 Can't connect to www.google.com:443 (Timeout) at /usr/lib/perl5/site_perl/5.8.5/VUser/Google/ProvisioningAPI/V2_0.pm line 443 The Google account always creates correctly. If the script fails it always fails at creating the Nickname stage - despite already having connected to Google to create the account. It may run fine for days and then fail some other days. I have tried adding in a sleep command (sleep (35);) as in the code below to introduce a delay between account creation and nickname creation. This has not resolved the issue. We do not have any outbound firewall rules on this machine. My OS and perl versions: Linux phoenix.dcu.ie 2.6.9-67.0.4.ELsmp #1 SMP Fri Jan 18 05:00:58 EST 2008 i686 athlon i386 GNU/Linux This is perl, v5.8.5 built for i386-linux-thread-multi The snippets of code which are generating the Output above are below. thank you, Justin # Create New Google account # Receives account information for user, Google api connection info # Creates account with alias for login and id number sub G_create_account { my ($g, %ac) = @_; $g = shift; my %email = {}; # Try to create a new user my $message = "Add account for $ac{g_name}"; my $account = $g->CreateUser($ac{g_name}, $ac{fname}, $ac{sname}, $ac{password}); if ($account) { printok ($message); sleep (35); # Create the aliases for the account G_create_aliases ($g, %ac); return true; } else { printerr ("$message", "$g->{result}{reason}"); return false; } } #end sub # Create necessary aliases for google account # receives Google server connection object # receives account hash - $ac{g_name} is google account name - e.g Joe.Bloggs # Add aliases for student number, login name sub G_create_aliases { my ($g, %ac) = @_; $g = shift; my ($alias_list_ref, $alias); $alias_list_ref = [$ac{login}, $ac{id}]; foreach $alias (@$alias_list_ref) { G_create_alias ($g, $ac{g_name}, $alias); } } sub G_create_alias { my ($g, $ac_name, $alias) = @_; $g = shift; $message = "Create email alias for $alias -> $ac_name"; $alias = $g->CreateNickname($ac_name, $alias); if (defined $alias) { printok ($message); return (1); } else { printerr ($message, $g->{result}{reason}); return (0); } } #end sub