Author Topic: Can't call method "attributes" on an undefined value at Ldap.pm line 226  (Read 7050 times)

michele

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
    • Casa Bastiano
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #15 on: January 18, 2010, 03:17:29 pm »
Here's my output. I still have problems with slapd, ebox-userandgroups, ebox-mail.
No backup available.
Still waiting for a solution to give access to this server (it will be enough to have mail server working again. Now i can't connect)

Code: [Select]
dpkg -l | grep slapd
iF  slapd                                 2.4.18-0ubuntu3hardy0                OpenLDAP server (slapd)

Code: [Select]
/usr/sbin/slapd -d 256 -h "ldap:/// ldapi:///" -g openldap -u openldap -F /etc/ldap/slapd.d/
@(#) $OpenLDAP: slapd 2.4.18 (Jan  8 2010 10:48:43) $
        buildd@plutonium:/build/buildd/openldap-2.4.18/debian/build/servers/slapd
config error processing olcDatabase={0}config,cn=config: ordered_value_sort failed on attr olcAccess

slapd stopped.
connections_destroy: nothing to destroy.

Code: [Select]

cat /etc/ldap/slapd.d/cn\=config/olcDatabase={0}config.ldif
dn: olcDatabase={0}config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcRootDN: cn=admin,cn=config
olcRootPW:: e2NyeXB0fUFlL1VuLjgzYldNMms=
olcAccess: to * by dn.exact=cn=localroot,cn=config manage by * break
structuralObjectClass: olcDatabaseConfig
entryUUID: 3f2721da-4935-102e-834d-8702370b30f5
creatorsName: cn=config
createTimestamp: 20091009153624Z
olcAccess: {0}to * by dn="cn=ebox,dc=vibrobloc,dc=locale" write
entryCSN: 20091009154611.224756Z#000000#000#000000
modifiersName: cn=admin,cn=config
modifyTimestamp: 20091009154611Z
Meteo Radio & Blog
@ Casa Bastiano
www.casabastiano.com

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #16 on: January 18, 2010, 03:34:32 pm »
Ok. Do the following:
sudo rm /var/lib/dpkg/info/slapd.postinst
then edit:
/etc/ldap/slapd.d/cn\=config/olcDatabase={0}config.ldif with vim or whatever, and you can see two lines that start with olcAccess:
Code: [Select]
olcAccess: to * by dn.exact=cn=localroot,cn=config manage by * break
olcAccess: {0}to * by dn="cn=ebox,dc=vibrobloc,dc=locale" write

They are separated, move them together and change them to look like this:
Code: [Select]
olcAccess: {0}to * by dn.exact=cn=localroot,cn=config manage by * break
olcAccess: {1}to * by dn="cn=ebox,dc=vibrobloc,dc=locale" write

Then run:
Code: [Select]
sudo dpkg --configure -a

Then run again the commands I gave in the other post to see if things have been fixed. Also check the web interface to see if things are working and paste here any error you get.

Cheers

michele

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
    • Casa Bastiano
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #17 on: January 18, 2010, 03:46:00 pm »
Ok Isaac. Thanks a lot for your help.
I did it and i got:

Code: [Select]
dpkg --configure -a
Configuro slapd (2.4.18-0ubuntu3hardy0) ...
Configuro ebox-usersandgroups (1.3.13-0ubuntu1~ppa1~hardy1) ...
Can't call method "bind" on an undefined value at /usr/share/perl5/EBox/Ldap.pm
line 217.
 * Restarting eBox module: users                                         [fail]
Can't call method "bind" on an undefined value at /usr/share/perl5/EBox/Ldap.pm
line 217.

Stopping OpenLDAP: slapd.
Starting OpenLDAP: slapd.

Configuro ebox-mail (1.3.14-0ubuntu1~ppa1~hardy1) ...
Can't call method "attributes" on an undefined value at /usr/share/perl5/EBox/Ld
ap.pm line 226.
 * Restarting eBox module: logs                                          [ OK ]
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
 * Restarting eBox module: mail                                          [fail]
Can't call method "attributes" on an undefined value at /usr/share/perl5/EBox/Ld
ap.pm line 226.


Processing triggers for ebox ...
 * Restarting eBox module: apache                                        [ OK ]
Meteo Radio & Blog
@ Casa Bastiano
www.casabastiano.com

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #18 on: January 18, 2010, 03:58:12 pm »
Ok, can you please run this command:
sudo cat /etc/ldap/slapd.d/cn\=config/olcDatabase\=\{-1\}frontend.ldif
and paste the output here?

If the output is something like:
Code: [Select]
dn: olcDatabase={-1}frontend
objectClass: olcDatabaseConfig
objectClass: olcFrontendConfig
olcDatabase: {-1}frontend
olcAccess: {0}to * by dn.exact=cn=localroot,cn=config manage by * break
olcSizeLimit: 500
structuralObjectClass: olcDatabaseConfig
entryUUID: 5d8fda1c-9814-102e-9dea-d1fb3b0916b4
creatorsName: cn=config
createTimestamp: 20100118003004Z
entryCSN: 20100118003004.016646Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20100118003004Z
containing one single olcAccess line, you need to add two more lines, so it looks like:
Code: [Select]
...
olcAccess: {0}to * by dn.exact=cn=localroot,cn=config manage by * break
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to dn.base="cn=subschema" by * read
...
then run:
Code: [Select]
sudo /etc/init.d/slapd restart
sudo /etc/init.d/ebox users restart
sudo /etc/init.d/ebox mail restart

Post here the output of the commands. Cheers!

olcAccess: to dn.base="" by * read
olcAccess: to dn.base="cn=subschema" by * read

michele

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
    • Casa Bastiano
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #19 on: January 18, 2010, 06:16:26 pm »
It worked! Isaac, thanks a lot!
Now i can have access again to web interface and all services are running well.
Last question: what about my upgrades now? Doing sudo apt-get upgrade i haven't packets to install...

Here my last output:

Code: [Select]
sudo /etc/init.d/slapd restart
Stopping OpenLDAP: slapd.
Starting OpenLDAP: slapd.

Code: [Select]
sudo /etc/init.d/ebox users restart
 * Restarting eBox module: users                                         [ OK ]

Code: [Select]
sudo /etc/init.d/ebox mail restart
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Use of uninitialized value in string eq at /usr/share/perl5/EBox/Types/Union.pm
line 450.
Argument "unlimitedMsgSize" isn't numeric in multiplication (*) at /usr/share/pe
rl5/EBox/Mail.pm line 378.
 * Restarting eBox module: mail                                          [ OK ]
Meteo Radio & Blog
@ Casa Bastiano
www.casabastiano.com

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #20 on: January 18, 2010, 06:32:02 pm »
Great :)

Well, you are now up-to-date, there is nothing else left to upgrade I guess :)

Coarch

  • Zen Apprentice
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #21 on: January 27, 2010, 08:46:37 am »
Thanks for the directions above.  I think I'm almost fixed.  I get the following error when running:

Code: [Select]
/etc/init.d/ebox users restart
 * Restarting eBox module: users
   ...fail!
Unknown error at EBox::UsersAndGroups::_loadCertificates objectClass: value #0 invalid per syntax
What am I missing out on.  I edit the two files mentioned above and now slapd restarts fine but I still get the error above.


isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #22 on: January 27, 2010, 10:05:35 am »
Uhm, apparently you are lacking the LDAP schema required for a master eBox.

If the rest of your setup is ok you can load it using:
Code: [Select]
sudo ldapadd -H 'ldapi://' -Y EXTERNAL -c

The command will wait for input, type this:
Code: [Select]
include: file:///usr/share/ebox-usersandgroups/master.ldif
include: file:///usr/share/ebox-usersandgroups/slaves.ldif

This should fix that problem, but if that's missing, you might miss other stuff too. Let me know :)

Coarch

  • Zen Apprentice
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #23 on: January 27, 2010, 06:48:38 pm »
Thanks for the fix, much appreciated.