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

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Hi all,

running the latest update of 1.3 (with slapd_2.4.18) I get following error messages with all ldap-related modules:

Can't call method "attributes" on an undefined value at /usr/share/perl5/EBox/Ldap.pm line 226

Same happens in the web admin interface:

A really nasty bug has occurred
Exception
Can't call method "attributes" on an undefined value
Trace
Can't call method "attributes" on an undefined value at /usr/share/perl5/EBox/Ldap.pm line 226.

Thanks in advance!

Kind regards,

Björn
« Last Edit: January 17, 2010, 03:43:00 am by binary-two »

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #1 on: January 17, 2010, 03:12:47 am »
I am not 100% sure and not an expert on ldap issues, but can it be that slapd_2.4.18 breaks the system? Do others experience the same problem?

Thanks,

Björn

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #2 on: January 17, 2010, 03:24:09 am »
Do you have a configuration backup done before the update? Maybe you can try to restore it.

Anyway, the migration process is not finished yet, so these kind of things can happen. Remember that 1.3 is still beta.

Thank you for help us testing it.
Zentyal Server Lead Developer

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #3 on: January 17, 2010, 03:38:27 am »
Thanks! It is on a testing system, so its no problem. Backups are ready to test again after the new version is ready and on the ppa.

So long,

Björn

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #4 on: January 17, 2010, 11:26:55 am »
Sorry for asking, but when will we can get a new version of slapd module? Couse i have done big misstake and get beta version to the work machine... =((

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #5 on: January 17, 2010, 11:55:22 am »
Thanks! It is on a testing system, so its no problem. Backups are ready to test again after the new version is ready and on the ppa.

I meant that you can try to restore the backup in your current broken installation and give us feedback about if it fixes the problem.
Zentyal Server Lead Developer

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 #6 on: January 17, 2010, 12:14:25 pm »
Sorry for asking, but when will we can get a new version of slapd module? Couse i have done big misstake and get beta version to the work machine... =((

Hi zergius! I am going to perform and upgrade from some 1.3.X to 1.3.15 and I'll tell you how to fix your installation.

A new usersandgroups supporting upgrades from 1.3.X to 1.3.15 will be out soon.

Cheers!

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #7 on: January 17, 2010, 12:48:38 pm »
isaak, what is you way to fix it?

J. A. Calvo, yes, when i restore backup of yesterday most of functions are restored... Only in logs module i have get this:
Exception
(in cleanup) Can't call method "disconnect" on an undefined value
Trace
(in cleanup) Can't call method "disconnect" on an undefined value at /usr/share/perl5/EBox/PgDBEngine.pm line 112.

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 #8 on: January 18, 2010, 09:33:28 am »
Same problem here. No backup available. Big mistake.
Is there a way to fix?
Meteo Radio & Blog
@ Casa Bastiano
www.casabastiano.com

binary-two

  • Zen Monk
  • **
  • Posts: 61
  • Karma: +3/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #9 on: January 18, 2010, 10:14:05 am »
I quickly tried, but it was not successful (for me). What I've forgotten yesterday was to try to downgrade manually , i.e.

apt-get install slapd=version

You can get the available versions with

apt-cache policy slapd

I don't know the exact versions out of my mind right now.  And you have to fix the other dependencies (ebox-usersandgroups, etc.) as well. Could be messy to resolve everything after all.

I am sure the ebox-team will help with a fix soon. Thanks in advance for the great work!

So long,

Björn
« Last Edit: January 18, 2010, 10:15:52 am by binary-two »

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 #10 on: January 18, 2010, 11:35:44 am »
Waiting for a fix how can i downgrade manually?
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 #11 on: January 18, 2010, 12:58:11 pm »
Hi, in the end the fix is not that easy, and we are focusing on the 1.2 to 1.4 migration at the moment.

Can you run "dpkg -l | grep slapd" and paste here the result?

Also the output of:
Code: [Select]
sudo /usr/sbin/slapd -d 256 -h "ldap:/// ldapi:///" -g openldap -u openldap -F /etc/ldap/slapd.d/
and
Code: [Select]
sudo cat /etc/ldap/slapd.d/cn\=config/olcDatabase={0}config.ldif

Cheers!

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #12 on: January 18, 2010, 01:16:13 pm »
Here is my output:

Code: [Select]
dpkg -l | grep slapd
ii  slapd                                 2.4.15-1ubuntu3ebox5hardy         OpenLDAP server (slapd)

Code: [Select]
sudo /usr/sbin/slapd -d 256 -h "ldap:/// ldapi:///" -g openldap -u openldap -F /etc/ldap/slapd.d/
@(#) $OpenLDAP: slapd 2.4.15 (Jul 16 2009 12:49:57) $
buildd@muntries:/build/buildd/openldap-2.4.15/debian/build/servers/slapd
daemon: bind(8) failed errno=98 (Address already in use)
hdb_db_open: database "dc=kodi,dc=local": database already in use.
backend_startup_one: bi_db_open failed! (-1)
slapd stopped.

Code: [Select]
sudo cat /etc/ldap/slapd.d/cn\=config/olcDatabase={0}config.ldif
dn: olcDatabase={0}config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcAccess: {0}to * by dn="cn=ebox,dc=kodi,dc=local" write
olcRootDN: cn=admin,cn=config
olcRootPW:: Y3I1cWFVeUl3cE1SSDRxOQ==
structuralObjectClass: olcDatabaseConfig
entryUUID: 98d677c8-57e8-102e-810f-59ce46999e0a
creatorsName: cn=config
createTimestamp: 20091028083531Z
entryCSN: 20091028085325.450114Z#000000#000#000000
modifiersName: cn=admin,cn=config
modifyTimestamp: 20091028085325Z

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 #13 on: January 18, 2010, 01:31:37 pm »
@zergius: That looks quite good :P That is after restoring a backup in the new version, right? Are you still having problems with LDAP?

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Can't call method "attributes" on an undefined value at Ldap.pm line 226
« Reply #14 on: January 18, 2010, 03:00:33 pm »
Sorry, guess i make one more mistake... No, I havn't any problems with LDAP, i have them with LOG module - I can't see any logs in web... When i try to see any logs i get this:
Code: [Select]
Exception
(in cleanup) Can't call method "disconnect" on an undefined value
Trace
(in cleanup) Can't call method "disconnect" on an undefined value at /usr/share/perl5/EBox/PgDBEngine.pm line 112.

About backup - I haven't use eBox eBackup, it's just tar archive of "/" exclude some directory... So I have an old versions of eBox modules...