Author Topic: [Resolved] OpenVPN Server Error  (Read 2443 times)

Gabu

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
    • 8 Balls
[Resolved] OpenVPN Server Error
« on: June 11, 2010, 07:46:45 pm »
Hello there!
.
When I try to create a VPN server on eBox, I receive the following message:
Quote
A really nasty bug has occurred
Exception
Can't use an undefined value as a HASH reference
Trace
Can't use an undefined value as a HASH reference at /usr/share/perl5/EBox/OpenVPN/Model/Servers.pm line 383.
.
Where /usr/share/perl5/EBox/OpenVPN/Model/Servers.pm is:
Quote
378  # Create server certificate
379  my $ca = EBox::Global->modInstance('ca');
380  my $certName = "vpn-$name";
381  my @certs = @{$ca->listCertificates()};
382  unless (List::Util::first { $_->{dn}->{commonName} eq $certName } @certs ) {
383    my $caExpiration = $ca->getCACertificateMetadata()->{expiryDate};
384    $ca->issueCertificate(commonName => $certName , endDate => $caExpiration);
385  }
.
And when I enable the OpenVPN module and save changes:
Quote
Some modules reported error when saving changes . More information on the logs in /var/log/ebox/
The following modules failed while saving their changes
.
I'm using eBox 1.5 over Ubuntu 10.04, but I had the same problem in eBox 1.4.4 over Ubuntu 8.04.

Thanks in advice...
Gabriel
« Last Edit: June 15, 2010, 10:56:08 pm by Gabu »
There's two kind of people in the world. The ones who knows binary code and the ones that don't.

sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: OpenVPN Server Error
« Reply #1 on: June 13, 2010, 12:40:07 pm »
Hi Gabriel,

I'm afraid to tell you that you hit a bug in ebox-ca package. I think you have entered non-ASCII characters in your CA certificate creation, am I right? If so, you must remove the current CA by removing /var/lib/ebox/CA directory. Then recreate the CA without non-ASCII characters.

I hope this helps you to set up a VPN server.

Best regards,
My secret is my silence...

Gabu

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
    • 8 Balls
Re: OpenVPN Server Error
« Reply #2 on: June 15, 2010, 10:44:37 pm »
Hey, sixstone!

I installed again version 1.4 to ensure stability.
And yes, you were right.
On "city" I typed "São Paulo".
Changing this information for "Sao Paulo" worked perfectly.

Thank you for your help.

Best Regards
There's two kind of people in the world. The ones who knows binary code and the ones that don't.