Domain Registration for gandi.net errors out

While testing the Gandi.net API services (new API), the test API worked ok but didn't show any contacts I had listed or my domains. Thinking this was expected behavior, I got my production API key, put it into Virtualmin's domain registration spot and then tried to Associate Domain for a domain I know is in my Gandi account. I got an error of "Associating domain elkhartarc.org with account Fuzzydice Gandi .. .. failed : Gandi API error : wanted a data type, got `nil' at line 78 column 7". I whipped up a quick perl script to log into the Gandi API with my production key and was able to list the domain just fine, so I'm not sure what is going on with Virtualmin. I'm using Virtualmin 3.94.gpl

Status: 
Closed (fixed)

Comments

This is a known issue - Gandi changed their API slightly, which broke Virtualmin's code that calls it :-(

However, we will be releasing an update to the virtualmin-registrar plugin shortly. I will update this bug when it is rolled out..

A fix for this should be available in a day or two..

Automatically closed -- issue fixed for 2 weeks with no activity.

Is the fix already out? Because I was trying the new GANDI API and got some sort of same error:

Failed to list contacts : Gandi API error : wanted a data type, got `nil' at line 13 column 7

Which version of the registrar plugin do you have installed there? You can see at System Settings -> Features and Plugins.

We have version 2.1

Looks like version 2.2 hasn't been properly released yet .. but Joe is working on it right now.

I installed 2.2 and when I click on "Contacts", I get the following error:

Failed to list contacts : Gandi API error : Can't locate object method "new" via package "XML::RPC" (perhaps you forgot to load "XML::RPC"?) at newgandi-type-lib.pl line 719.

You need to install the XML::RPC perl module. There may be an RPM package for this, or you can run :

perl -MCPAN -e "install XML::RPC"

Hi,

I installed the package and indeed the error went away. However when I create a new company contact, I get the following error:

Failed to save contact : Update failed : Gandi API error : Can't locate object method "string" via package "XML::RPC" at newgandi-type-lib.pl line 544.

webinteractive - see my comment #10 above.

I installed the XML::RPC perl module using your suggestion, but still get the errors. Do I need to restart something after that? We have a Debian distro.

I think that string error is actually a separate bug :-(

Try editing the file /usr/libexec/webmin/virtualmin-registrar/newgandi-type-lib.pl and changing lines 544 and 545 to :

        $callcon->{'zip'} = $con->{'zip'};
        $callcon->{'phone'} = $con->{'phone'};

Let me know if that helps ..

I changed it and when I save the contact, I get no errors.
But when I get back to the overviewscreen, my contact is not saved.

The DNS Domain registrar is in testmode at Gandi and in Virtualmin. Does it has something todo with that?

To rule out that that is the problem, I changed the DNS Domain Registrar in Virtualmin from "Test only" to "Really register domains".

However now I get this error:


HTTP/1.0 500 Perl execution failed Server: MiniServ/1.590 Date: Thu, 25 Oct 2012 07:00:47 GMT Content-type: text/html; Charset=iso-8859-1 Connection: close
Error - Perl execution failed

Not an ARRAY reference at newgandi-type-lib.pl line 47.

and the save button is gone. So I can't change it back to testmode.

Which page do you get that error on?

Also, is your Gandi account enabled to use the API in production mode?

I get that on the "Addresses and Networking" -> "DNS Domain Registrars" -> "Contacts"

And I just enabled Gandi for production mode.

I created a new DNS Domain Registrar with Gandi and the production API key. I can view the contacts but when I add a new contact, I get no error, but when returned to the overview screen the new contact is not added.

It would be best to test all this with Virtualmin DNS domain registrar in Test mode and Gandi in Test mode. I am not very comfortable that everything is in production mode now.

I looked into this some more, and it looks like Gandi changed their API slightly in a way that broke Virtualmin .. and broke proper reporting of the error.

To fix this, replace the file /usr/{share,libexec}/webmin/virtualmin-registrar/newgandi-type-lib.pl on your system with the file attached to this bug report. Let me know how it goes ..

It works now correctly with the updated script. Thanks for that!

I have 2 other questions:

1. Is it possible to move all the domains using the old Gandi API to the new Gandi API?
2. I discovered a small bug. When you select "Transfer domain" you can choose a registrar in Virtualmin. But the dropdown shows all registrars, even the disabled registrars. In the screenshot you can see I have two registrars, but one is disabled.

  1. Yes, this is possible. If you delete the "Old gandi API" registrar, Virtualmin will prompt you which registrar to use for those domains in future.

  2. That is expected, because when you disable a registrar Virtualmin will just stop using it for creating new domains.

Ok, thanks for the answers!

Can I use "Transfer domain" to selectively transfer domains from the old API to the new API?

No, but you can use "Dis-associate domain" and the "Associate domain" under the "Domain Registration" menu.

Hello

I trying to use in DNS Domain Registrars the Gandi.net (New API) I have applied for a Gandi reseller account as reseller (not an individual, a company, an association or a public body)

In my Gandi "Edit Registrar Account" when I try to "Create Registrar Contact" to associate a "company contact", as there is no "reseller contact" type in the options, with this registrar account I get the following error:

Failed to save contact : Update failed : Gandi API error : Can't locate object method "string" via package "XML::RPC" at newgandi-type-lib.pl line 544.

Any idea on what is missing? Do I have to install something else or is this a bug?

Thanks, Yann

You need to install the XML::RPC perl module - this can be done at Webmin -> Others -> Perl Modules.