Author Topic: [Solved] 1.5 Master/Slave "stringify"???  (Read 5501 times)

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: 1.5 Master/Slave "stringify"???
« Reply #15 on: August 09, 2010, 08:23:07 pm »
It seems that ldap.conf has not been written, maybe you forgot to create ldap-slave.conf.mas file?

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #16 on: August 09, 2010, 09:56:00 pm »
It seems that ldap.conf has not been written, maybe you forgot to create ldap-slave.conf.mas file?

Yes. No.
Before accessing the web interface I did copy the content of
http://trac.ebox-platform.com/browser/trunk/client/usersandgroups/stubs/ldap-slave.conf.mas?rev=18330 into a newly created file at the same location as ldap.conf.mas exists, in: /usr/share/ebox/stubs/usersandgroups:

Code: [Select]
root@egw:/usr/share/ebox/stubs/usersandgroups# ls -al | grep ldap
-rw-r--r-- 1 root root   846 2010-08-04 18:18 ldap.conf.mas
-rw-r--r-- 1 root root   331 2010-08-09 17:46 ldap-slave.conf.mas

After realizing that ldap.conf is missing I copied ldap-slave.conf.mas manually to /etc/ldap.conf and adjusted two lines:
Code: [Select]
base dc=ps,dc=ebox,dc=lan
uri  ldap://10.2.102.1
I know that this is basically correct because I can successfully access the master by using "ldapsearch -x uid=ub" on the command line and getting the correct response.

Nevertheless I am not sure that this is the way the Master definition should look like. The web interface fails when I try to access Users and Groups with "An internal error has occurred" and in the ebox.log file I can read:
Code: [Select]
2010/08/09 21:30:12 ERROR> Ldap.pm:177 EBox::Ldap::anonymousLdapCon - Can't create ldapi connection
Probably I should wait for the next iteration of your packages and reinstall the slave then - I have no problem to wait :-)

Thank you
Udo

darkstar702

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #17 on: August 09, 2010, 10:27:43 pm »
My server is not in a Master/Slave configuration - its just as single server, but I'm noting the same behavior with LDAP and some of the errors look very much like the same ones I'm getting.  Is there a procedure to complete purge perl, apache, ebox, and all depedent modules and configuration files and start from scratch (aside from the obvious reformat)?

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #18 on: August 10, 2010, 04:55:41 pm »
Is there a procedure to complete purge perl, apache, ebox, and all depedent modules and configuration files and start from scratch (aside from the obvious reformat)?

To remove all eBox-components try:

Code: [Select]
~# apt-get --purge remove ebox*
To additionally remove now unused dependencies:

Code: [Select]
~# apt-get --purge autoremove
Best regards
Udo

pgarcia

  • Zen Apprentice
  • *
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #19 on: August 10, 2010, 05:17:21 pm »
I have tried with this solution but i continues getting this error:

Code: [Select]
Trace
Can't locate object method "stringify" via package "HTML::Mason::Exception::Params" at /usr/share/perl5/EBox/CGI/ServiceModule/ConfigureModuleController.pm line 74.

It seems that ldap.conf has not been written, maybe you forgot to create ldap-slave.conf.mas file?

darkstar702

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #20 on: August 10, 2010, 07:41:59 pm »
Well, the last time I ran the 'sudo apt-get autoremove' command, it blew away my gnome desktop.  So I'm not sure how well that would work... Although I did note some updates last night that I'll run.  I plan to run the ebox purge and then the autoremove command again and then start from scratch.

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #21 on: August 10, 2010, 08:57:24 pm »

Probably I should wait for the next iteration of your packages and reinstall the slave then


With the availability of ebox-usersandgroups_1.5.5-0ubuntu1~ppa1~lucid1_all.deb I gave it another try. Unfortunately without success.

My notes for this trip:

~#apt-get --purge remove slapd ldap-utils ebox* samba* apache* redis*

~#reboot

root@egw:~# apt-get install ebox-usersandgroups
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libtalloc2 smbldap-tools collectd-core collectd quota libunicode-maputf8-perl acl libunicode-map-perl libquota-perl libwbclient0 libunicode-string-perl libjcode-pm-perl libunicode-map8-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common ddclient ebox ebox-firewall ebox-network ebox-objects ebox-services ebox-software ldap-utils libapache-singleton-perl
  libapache2-mod-perl2 libapache2-reload-perl libebox libredis-perl redis-server slapd
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom ufw
The following NEW packages will be installed:
  apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common ddclient ebox ebox-firewall ebox-network ebox-objects ebox-services ebox-software ebox-usersandgroups ldap-utils
  libapache-singleton-perl libapache2-mod-perl2 libapache2-reload-perl libebox libredis-perl redis-server slapd
0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded.


Switch Mode Master --> Slave + enter Master host and Ldap password.

(ALL Modules are disabled up until now)

Save changes --> Moans about Firewall and Users and Groups, ignored. Save --> OK.

Module Status: enable Users and Groups --> mentions /etc/nsswitch.conf + /etc/ldap.conf --> Accept.

Users and Groups is "checked" now.

Save changes --> moans about Firewall. Ignored. Save --> Seems OK, but then:

   Some modules reported error when saving changes . More information on the logs in /var/log/ebox/
   The following modules failed while saving their changes, their state is unknown: users


Looking in /var/log/ebox/error.log:

[Tue Aug 10 20:41:31 2010] [notice] caught SIGTERM, shutting down
[Tue Aug 10 20:41:33 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Aug 10 20:41:33 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Aug 10 20:41:33 2010] [warn] RSA server certificate CommonName (CN) `eBox Server' does NOT match server name!?
[Tue Aug 10 20:41:34 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Aug 10 20:41:34 2010] [warn] RSA server certificate CommonName (CN) `eBox Server' does NOT match server name!?
[Tue Aug 10 20:41:34 2010] [notice] Apache/2.2.14 (Ubuntu) mod_ssl/2.2.14 OpenSSL/0.9.8k mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Aug 10 20:42:04 2010] [error] server reached MaxClients setting, consider raising the MaxClients setting
Use of uninitialized value $currentSeparator in string ne at /usr/share/perl5/EBox/Menu/Root.pm line 53.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/EBox/Menu/Separator.pm line 44.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/EBox/Menu/Separator.pm line 44.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/EBox/Menu/Separator.pm line 44.
Use of uninitialized value $dir_path in concatenation (.) or string at /usr/share/perl5/HTML/Mason/Tools.pm line 114.


And the corresponding part of /var/log/ebox/ebox.log:
 
2010/08/10 20:36:10 INFO> Base.pm:174 EBox::Module::Base::__ANON__ - Saving config for module: usercorner
2010/08/10 20:36:10 DEBUG> ebox-migrate:44 main::__ANON__ - Subroutine runGConf redefined at (eval 1153) line 29, <GEN2> line 6775.
2010/08/10 20:36:10 DEBUG> Base.pm:77 EBox::Migration::Base::executeGConf - Skipping migration to 3 in users
2010/08/10 20:36:10 DEBUG> ebox-migrate:44 main::__ANON__ - Subroutine runGConf redefined at (eval 1154) line 29, <GEN2> line 6776.
2010/08/10 20:36:10 DEBUG> Base.pm:77 EBox::Migration::Base::executeGConf - Skipping migration to 4 in users
2010/08/10 20:36:10 DEBUG> ebox-migrate:44 main::__ANON__ - Subroutine runGConf redefined at (eval 1155) line 33, <GEN2> line 6777.
2010/08/10 20:36:10 DEBUG> Base.pm:77 EBox::Migration::Base::executeGConf - Skipping migration to 5 in users
2010/08/10 20:36:10 INFO> Service.pm:666 EBox::Module::Service::restartService - Skipping restart for users as it's disabled
2010/08/10 20:36:11 INFO> Service.pm:670 EBox::Module::Service::restartService - Restarting service for module: apache
2010/08/10 20:36:11 INFO> ebox-apache-restart:52 main:: - Waiting for apache to shutdown, attempt 0
2010/08/10 20:36:34 INFO> Redis.pm:556 EBox::Config::Redis::_initRedis - Starting redis server
2010/08/10 20:38:46 INFO> Global.pm:473 EBox::Global::saveAllModules - Saving config and restarting services: firewall users
2010/08/10 20:40:04 DEBUG> UsersAndGroups.pm:2623 EBox::UsersAndGroups::_connRemoteLDAP - Can't connect to master eBox at 10.1.102.1
2010/08/10 20:40:04 DEBUG> ConfigureModuleController.pm:70 EBox::CGI::ServiceModule::ConfigureModuleController::__ANON__ - Failed to enable: Can't connect to master eBox at 10.1.102.1
2010/08/10 20:40:30 INFO> Global.pm:473 EBox::Global::saveAllModules - Saving config and restarting services: firewall users
2010/08/10 20:40:40 DEBUG> UsersAndGroups.pm:2664 EBox::UsersAndGroups::_registerHostname - Error registering hostname:Already exists
2010/08/10 20:40:40 ERROR> Sudo.pm:216 EBox::Sudo::_rootError - root command /usr/bin/stat -c%dI%iI%fI%hI%uI%gIhI%sI%XI%YI%ZI%oI%bI%tI%T '/var/lib/ebox/conf/ebox-ldap.passwd' failed.
Error output: /usr/bin/stat: cannot stat `/var/lib/ebox/conf/ebox-ldap.passwd': No such file or directory

Command output: .
Exit value: 1
2010/08/10 20:40:40 ERROR> Sudo.pm:216 EBox::Sudo::_rootError - root command /usr/bin/stat -c%dI%iI%fI%hI%uI%gIhI%sI%XI%YI%ZI%oI%bI%tI%T '/var/lib/ebox/tmp/slapd-replica.ldif' failed.
Error output: /usr/bin/stat: cannot stat `/var/lib/ebox/tmp/slapd-replica.ldif': No such file or directory

Command output: .
Exit value: 1
2010/08/10 20:40:40 ERROR> Sudo.pm:216 EBox::Sudo::_rootError - root command /usr/bin/stat -c%dI%iI%fI%hI%uI%gIhI%sI%XI%YI%ZI%oI%bI%tI%T '/var/lib/ebox/tmp/slapd-translucent.ldif' failed.
Error output: /usr/bin/stat: cannot stat `/var/lib/ebox/tmp/slapd-translucent.ldif': No such file or directory

Command output: .
Exit value: 1
2010/08/10 20:40:40 ERROR> Sudo.pm:216 EBox::Sudo::_rootError - root command /usr/bin/stat -c%dI%iI%fI%hI%uI%gIhI%sI%XI%YI%ZI%oI%bI%tI%T '/var/lib/ebox/tmp/slapd-frontend.ldif' failed.
Error output: /usr/bin/stat: cannot stat `/var/lib/ebox/tmp/slapd-frontend.ldif': No such file or directory

Command output: .
Exit value: 1
2010/08/10 20:40:40 ERROR> Sudo.pm:216 EBox::Sudo::_rootError - root command /usr/bin/stat -c%dI%iI%fI%hI%uI%gIhI%sI%XI%YI%ZI%oI%bI%tI%T '/var/lib/ebox/tmp/slapd-frontend-referrals.ldif' failed.
Error output: /usr/bin/stat: cannot stat `/var/lib/ebox/tmp/slapd-frontend-referrals.ldif': No such file or directory

Command output: .
Exit value: 1
2010/08/10 20:40:43 DEBUG> UsersAndGroups.pm:2761 EBox::UsersAndGroups::waitSync - Master users: 3
2010/08/10 20:40:43 DEBUG> UsersAndGroups.pm:2762 EBox::UsersAndGroups::waitSync - Replica users: 3
2010/08/10 20:40:43 DEBUG> UsersAndGroups.pm:2763 EBox::UsersAndGroups::waitSync - Master groups: 5
2010/08/10 20:40:43 DEBUG> UsersAndGroups.pm:2764 EBox::UsersAndGroups::waitSync - Replica groups: 5
2010/08/10 20:40:43 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'ou=Users,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:43 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:43 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'uid=ub,ou=Users,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'uid=ubt,ou=Users,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'uid=uba,ou=Users,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'ou=Groups,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'cn=__USERS__,ou=Groups,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'cn=testgroup,ou=Groups,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'cn=family,ou=Groups,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'cn=extern,ou=Groups,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:40:44 ERROR> Ldap.pm:719 EBox::Ldap::_errorOnLdap - $VAR1 = 'cn=media,ou=Groups,dc=ps,dc=ebox,dc=lan';
2010/08/10 20:40:44 ERROR> Ldap.pm:721 EBox::Ldap::_errorOnLdap - Unknown error at EBox::UsersAndGroups::__ANON__ Referral received
2010/08/10 20:41:29 INFO> Global.pm:473 EBox::Global::saveAllModules - Saving config and restarting services: firewall users
2010/08/10 20:41:29 INFO> Base.pm:152 EBox::Module::Base::save - Restarting service for module: users
2010/08/10 20:41:30 ERROR> Sudo.pm:216 EBox::Sudo::_rootError - root command /usr/bin/stat -c%dI%iI%fI%hI%uI%gIhI%sI%XI%YI%ZI%oI%bI%tI%T '/var/lib/ebox/conf//apache-soap-slave' failed.
Error output: /usr/bin/stat: cannot stat `/var/lib/ebox/conf//apache-soap-slave': No such file or directory

Command output: .
Exit value: 1
2010/08/10 20:41:30 INFO> Base.pm:152 EBox::Module::Base::save - Restarting service for module: apache
2010/08/10 20:41:32 INFO> ebox-apache-restart:52 main:: - Waiting for apache to shutdown, attempt 0
2010/08/10 20:41:34 INFO> Redis.pm:556 EBox::Config::Redis::_initRedis - Starting redis server
2010/08/10 20:41:40 ERROR> Ldap.pm:177 EBox::Ldap::anonymousLdapCon - Can't create ldapi connection
2010/08/10 20:41:40 ERROR> Global.pm:566 EBox::Global::saveAllModules - The following modules failed while saving their changes, their state is unknown: users


Best regards
Udo

darkstar702

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #22 on: August 11, 2010, 11:11:07 pm »
My ebox problem is solved and its up and running again flawlessly.  As per some of the suggestions in the forum, I did the following:

'sudo apt-get purge ebox-all'
'sudo apt-get purge slapd'
'sudo apt-get purge apache2'
'sudo apt-get purge ubuntu-desktop'
'sudo apt-get autoremove'

Once I rebooted, I reloaded ebox using the 'sudo apt-get install ebox' command, and then reloaded my Gnome desktop on the server without any of the "suggested installation components."  This resulted in a perfectly operating server, perfectly operating ebox system, and smooth set of updates. 

I'll be trying out the SAMBA shares later this evening.  Many thanks to all for the suggestions!

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: 1.5 Master/Slave "stringify"???
« Reply #23 on: August 12, 2010, 06:10:56 pm »

This resulted in a perfectly operating server, perfectly operating ebox system, and smooth set of updates. 


Thank you for the report. I followed you sequence and had no success.

I did see some error messages in /var/log/ebox/ebox.log though.

Just for the record here is what I did:

Code: [Select]
Remove all ebox, slapd, apache2 + "autoremove"

Note: I had _no_ packages installed with "desktop" in its name.


~# apt-get --purge remove libldap-2.4-2

~# apt-get --purge remove liborbit2 # just uninstalled because it comes from ebox repository

~# rm -rf /etc/ldap # there were old artefacts from slapd

~# rm -rf /var/lib/ebox-usercorner/ # there were old artefacts

<reboot>

~# aptitude install ebox

~# aptitude install ebox-usersandgroups

First access to https://.../ebox, go immediately to Ldap and toggle Master --> Slave.

Do NOT "Save changes"

Go to Module Status. Activate "Users and Groups"

/var/log/ebox/ebox.log says:

Command output: .
Exit value: 1
2010/08/12 18:01:37 ERROR> Sudo.pm:216 EBox::Sudo::_rootError - root command /usr/bin/stat -c%dI%iI%fI%hI%uI%gIhI%sI%XI%YI%ZI%oI%bI%tI%T '/var/lib/ebox/tmp/slapd-frontend.ldif' failed.
Error output: /usr/bin/stat: cannot stat `/var/lib/ebox/tmp/slapd-frontend.ldif': No such file or directory


To be continued...
« Last Edit: August 12, 2010, 06:13:16 pm by UdoB »
Udo