Author Topic: Master/slave problems again  (Read 4881 times)

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Master/slave problems again
« Reply #15 on: February 09, 2010, 11:14:39 am »
Are the pending operations still in the master (users and groups -> slave status)?

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #16 on: February 09, 2010, 12:32:40 pm »
Yap, fnd this in logs:
Code: [Select]
2010/02/09 14:30:07 ERROR> SOAPClient.pm:181 EBox::SOAPClient::AUTOLOAD - Server side: Can't call method "get_value" on an undefined value at /usr/share/perl5/EBox/UsersAndGroups.pm line 604.
2010/02/09 14:30:07 DEBUG> slave-sync:77 main::__ANON__ - Trying to run method addUser with param zerg on slave HASH(0x8daecc0) failed
2010/02/09 14:30:11 ERROR> SOAPClient.pm:181 EBox::SOAPClient::AUTOLOAD - Server side: Can't call method "get_value" on an undefined value at /usr/share/perl5/EBox/UsersAndGroups.pm line 604.
2010/02/09 14:30:11 DEBUG> slave-sync:77 main::__ANON__ - Trying to run method addUser with param test on slave HASH(0x8daecc0) failed
2010/02/09 14:30:14 ERROR> SOAPClient.pm:181 EBox::SOAPClient::AUTOLOAD - Server side: Can't call method "get_value" on an undefined value at /usr/share/perl5/EBox/UsersAndGroups.pm line 604.
2010/02/09 14:30:14 DEBUG> slave-sync:77 main::__ANON__ - Trying to run method addGroup with param test on slave HASH(0x8daecc0) failed
2010/02/09 14:30:14 DEBUG> slave-sync:77 main::__ANON__ - Trying to run method delGroup with param test on slave HASH(0x8daecc0) failed


In slave ebox.log i find just this:
Code: [Select]
2010/02/09 14:35:07 DEBUG> UsersAndGroups.pm:2671 EBox::UsersAndGroups::waitSync - Master users: 1
2010/02/09 14:35:07 DEBUG> UsersAndGroups.pm:2672 EBox::UsersAndGroups::waitSync - Replica users: 1
2010/02/09 14:35:07 DEBUG> UsersAndGroups.pm:2673 EBox::UsersAndGroups::waitSync - Master groups: 11
2010/02/09 14:35:07 DEBUG> UsersAndGroups.pm:2674 EBox::UsersAndGroups::waitSync - Replica groups: 11
2010/02/09 14:35:10 DEBUG> UsersAndGroups.pm:2671 EBox::UsersAndGroups::waitSync - Master users: 1
2010/02/09 14:35:10 DEBUG> UsersAndGroups.pm:2672 EBox::UsersAndGroups::waitSync - Replica users: 1
2010/02/09 14:35:10 DEBUG> UsersAndGroups.pm:2673 EBox::UsersAndGroups::waitSync - Master groups: 11
2010/02/09 14:35:10 DEBUG> UsersAndGroups.pm:2674 EBox::UsersAndGroups::waitSync - Replica groups: 11
2010/02/09 14:35:14 DEBUG> UsersAndGroups.pm:2671 EBox::UsersAndGroups::waitSync - Master users: 1
2010/02/09 14:35:14 DEBUG> UsersAndGroups.pm:2672 EBox::UsersAndGroups::waitSync - Replica users: 1
2010/02/09 14:35:14 DEBUG> UsersAndGroups.pm:2673 EBox::UsersAndGroups::waitSync - Master groups: 11
2010/02/09 14:35:14 DEBUG> UsersAndGroups.pm:2674 EBox::UsersAndGroups::waitSync - Replica groups: 11
2010/02/09 14:35:14 DEBUG> Samba.pm:1241 EBox::Samba::_checkGroupExists - group test does not exist.
« Last Edit: February 09, 2010, 12:37:07 pm by zergius »

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #17 on: February 09, 2010, 01:04:00 pm »
I think, I have win this situation... I have to reinstall slave server, recreat users and groups, which was in pending operations and ERRORs are ended... =))

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Master/slave problems again
« Reply #18 on: February 09, 2010, 01:55:55 pm »
Great :)

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #19 on: February 10, 2010, 11:26:27 am »
Thank you much...

If I can, one more question, how i can reconfigure userandgroup module to make it slave?

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Master/slave problems again
« Reply #20 on: February 10, 2010, 11:31:54 am »
There is no way to do that, you have to completely remove usersandgroups and reinstall it, in order to do that you can use the script:
Code: [Select]
sudo /usr/share/ebox-usersandgroups/ebox-usersandgroups-reinstall

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Master/slave problems again
« Reply #21 on: February 10, 2010, 11:33:08 am »
Note that after you run that all your users in that machine will be deleted (shouldn't matter as you are going to install a slave).

In addition if you have modules such as samba or mail installed there, you'll have to run:
Code: [Select]
sudo /usr/share/ebox/ebox-unconfigure-module samba
sudo /usr/share/ebox/ebox-unconfigure-module mail
... for each one of them after running the aforementioned script.

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #22 on: February 10, 2010, 11:41:42 am »
Ok... And if i have to change ip or name of slave, I'll have to reinstall it again, or it's is some way to reconfigure it?

Saturn2888

  • Zen Hero
  • *****
  • Posts: 707
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #23 on: February 10, 2010, 11:42:12 am »
Are the pending operations still in the master (users and groups -> slave status)?
You know what? While my Master/Slave are sync'd, I still have pending things. Is it supposed to be like that where it's a log file of changes or should those not show up any longer? Are they pending because they're pending for a machine not connected to LDAP?

isaac

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Master/slave problems again
« Reply #24 on: February 10, 2010, 11:45:37 am »
The replication is made at a LDAP server transparently, but every time a new user is added it might be needed to run some commands in the slaves.

To do that the master notifies the slaves using SOAP so they can setup the necessary stuff for the new user in the slave, such as adding extra LDAP attributes or creating directories.

In order to do that, the master keeps a list of slave hostnames. The server must be able to resolve these hostnames into IP addresses in order for this to work.

If you have the hostnames slave1 and slave2 in the master. ping slave1 and ping slave2 should work from the master. You can do this either setting up a DNS server (with eBox or otherwise) or just adding the hostname-ip pair in the file /etc/hosts in the master.

Once that's done you should be able to click 'force slave sync' and it should work.
Cheers!

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #25 on: February 10, 2010, 11:54:53 am »
So, as I can understand, i can't change the name of slaves... Only ip-adress in dns or /etc/hosts... I'm asking this, becouse I have some working eBox 1.3 now... But they don't work in master/slave mode. After eBox 1.4 release i install it to tests comps... Now I want to replace My working servers to tests comps... And i have no any wishes to run around the office to reconfigure all clients machins... So i want to config and test my servers and when everything will ready, just replace their names and IP to working servers...

P.s: sorry for my poor english...

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #26 on: February 10, 2010, 12:07:06 pm »
Hm... Something wrong with me...
I have ran:
Code: [Select]
sudo /usr/share/ebox-usersandgroups/ebox-usersandgroups-reinstalland
Code: [Select]
sudo /usr/share/ebox/ebox-unconfigure-module sambai go to User and Groups -> Mode, enter IP and master LDAP password (from Master LDAP Info), press change.
But, when i try to enable Userandgroups module i see just:
Code: [Select]
Failed to enable: Can't connect to master eBox at 192.168.1.107 with the provided LDAP password

Saturn2888

  • Zen Hero
  • *****
  • Posts: 707
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #27 on: February 10, 2010, 12:11:14 pm »
What if I can ping and after forcing the sync, it still shows pending operations even though it has already synced those operations? Anytime I add a user in the Master, the Slave immediately has access. Very nice, very fast, but very strange that the Master doesn't seem to know the Slave got that information.

Saturn2888

  • Zen Hero
  • *****
  • Posts: 707
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #28 on: February 10, 2010, 12:14:13 pm »
Hm... Something wrong with me...
I have ran:
Code: [Select]
sudo /usr/share/ebox-usersandgroups/ebox-usersandgroups-reinstalland
Code: [Select]
sudo /usr/share/ebox/ebox-unconfigure-module sambai go to User and Groups -> Mode, enter IP and master LDAP password (from Master LDAP Info), press change.
But, when i try to enable Userandgroups module i see just:
Code: [Select]
Failed to enable: Can't connect to master eBox at 192.168.1.107 with the provided LDAP password

You can't copy/paste the password by double-clicking on it, that adds tabs and spaces. You need to manually copy/paste that somewhere you can actually see where there spaces are, then copy/paste that into the LDAP slave password field.

zergius

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +1/-0
    • View Profile
Re: Master/slave problems again
« Reply #29 on: February 10, 2010, 01:32:54 pm »
Just reboot server help me...
Sorry for so much question, but... If i have already users on master, and try to force sync them to slaves samba and mail folders havn't created... So i have to recreate users on master size, am i right?