tranquilit / tis-sysvolsync

TIS Sysvolsync is a solution for sync'ing the sysvol share on domain controlers running Samba4 Active Directory. The sysvol share is a special share on an Active Directory server where are stored netlogon scripts and GPO definitions.
GNU General Public License v3.0
14 stars 8 forks source link

Problem building on Rocky Linux 9 #5

Open ceandre opened 2 months ago

ceandre commented 2 months ago

Hi, I trying to build packages on Rocky Linux 9 (RHEL 9), but I getting this error:

Anyone can give a help?

Thanks.

sfonteneau commented 1 month ago

Can you try with last release ? :

https://github.com/tranquilit/tis-sysvolsync/releases/tag/v1.27.12

ceandre commented 1 month ago

Hi! Thanks for reply!

I jus tried this version, but got this error on Primary:

/opt/tis-sysvolsync/sysvolsync.py configure

2024-09-23 17:09:38,367 INFO ID : xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx 2024-09-23 17:09:38,368 INFO api port : 8385 2024-09-23 17:09:38,368 INFO api key : xxxxxx 2024-09-23 17:09:38,368 INFO data port : 22001 {'Forest': 'test.lan', 'Domain': 'test.lan', 'Netbios domain': 'TEST', 'DC name': 'srv80v.test.lan', 'DC netbios name': 'SRV80V', 'Server site': 'Default-First-Site-Name', 'Client site': 'Default-First-Site-Name'} Get DRS connections informations from local LDB AD database... Configuring sync from SRV81V to SRV80V Remote host infos : {'Forest': 'test.lan', 'Domain': 'test.lan', 'Netbios domain': 'TEST', 'DC name': 'srv81v.test.lan', 'DC netbios name': 'SRV81V', 'Server site': 'Default-First-Site-Name', 'Client site': 'Default-First-Site-Name'} Connecting to srv81v.test.lan using SSH to add myself as remote device, add sysvol sync and get syncthing configuration... root@srv81v.test.lan's password: Traceback (most recent call last): File "/opt/tis-sysvolsync/sysvolsync.py", line 429, in main() File "/opt/tis-sysvolsync/sysvolsync.py", line 368, in main syncthing = SyncThing() File "/opt/tis-sysvolsync/sysvolsync.py", line 106, in init self.id = self.get_syncthing_id() File "/opt/tis-sysvolsync/sysvolsync.py", line 177, in get_syncthing_id return self.syncthing_rest_get('system/status')['myID'] File "/opt/tis-sysvolsync/sysvolsync.py", line 150, in syncthing_rest_get return json.loads(data.content or '{}') File "/usr/lib64/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/opt/tis-sysvolsync/sysvolsync.py", line 429, in main() File "/opt/tis-sysvolsync/sysvolsync.py", line 419, in main syncthing.add_mutual_sysvol_sync(local_dc,remote_dc) File "/opt/tis-sysvolsync/sysvolsync.py", line 292, in add_mutual_sysvol_sync remote_jsonconfig = subprocess.check_output('ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no %s python3 /opt/tis-sysvolsync/sysvolsync.py -ldebug -f /var/log/sysvolbind.log add-remote %s %s tcp://%s:%s' % ( File "/usr/lib64/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib64/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no srv81v.test.lan python3 /opt/tis-sysvolsync/sysvolsync.py -ldebug -f /var/log/sysvolbind.log add-remote xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx srv80v.test.lan tcp://srv80v.test.lan:22001' returned non-zero exit status 1.

ceandre commented 1 month ago

And this one one another server:

/opt/tis-sysvolsync/sysvolsync.py configure

2024-09-23 17:10:19,583 CRITICAL Error in data : b'CSRF Error\n' for path system/status Traceback (most recent call last): File "/opt/tis-sysvolsync/sysvolsync.py", line 429, in main() File "/opt/tis-sysvolsync/sysvolsync.py", line 368, in main syncthing = SyncThing() File "/opt/tis-sysvolsync/sysvolsync.py", line 106, in init self.id = self.get_syncthing_id() File "/opt/tis-sysvolsync/sysvolsync.py", line 177, in get_syncthing_id return self.syncthing_rest_get('system/status')['myID'] File "/opt/tis-sysvolsync/sysvolsync.py", line 150, in syncthing_rest_get return json.loads(data.content or '{}') File "/usr/lib64/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

ceandre commented 1 month ago

Hi, I made it work.... I took a "look" on files and after running: /opt/tis-synvolsync/bin/syncthing install-completions and /opt/tis-synvolsync/bin/syncthing (2x - yes, 2 times, first time got a bunch of erros, and then tried again, it started)

and THEN.... tried running again; /opt/tis-sysvolsync/sysvolsync.py configure

It starded and asked for password for another server. Another thing... I also installed python3-ldap, it's was a dependency for rpm 1.20 but not for 1.27.