Hi,
I have poked around the problem described in previous thread https://www.crowd-render.com/forum-1/_bugs/can-t-connect-between-linux-machines
It looks like entwork_engine.descover_local_ip() is using hostname app with Debian specific, legacy CLI arg -I.
def discover_local_ip():
import socket, subprocess, platform
address_list = ()
if platform.system() == 'Windows':
try:
names_addrs = socket.gethostbyname_ex(socket.gethostname())
addresses = names_addrs[2]
for address in addresses:
address_list += (
(
address,
address,
'address of your network device for this computer'),)
except:
address_list += (('0.0.0.0', '??', 'address of this computer on the network'), )
else:
if platform.system() == 'Linux':
import subprocess
try:
res_bytes = subprocess.check_output(['hostname', '-I'])
res_string = res_bytes.decode('utf-8')
final_res = res_string.split()
for address in final_res:
address_list += (
(
address,
address,
'address of this computer on the network'),)
Why not uses sock library for Linux also (sock is platform independent)
ps. To fix the issue I've decomposed python bytecode and remove if platform.system() conditional. Works on my machine @{archlinux,blender-2.79b,crowdrender-cr_013_bl2_78_79_rel_a}
Just use gpg4win (on Linux gnupg is available on every distro as package signing mechanism ;)
Thanks! Public confession though, I had to google what GPG was! Never used it before.... and I have yet to build it from source as this seems like the only way to get hold of it? Unless it comes pre-packed with some flavour of linux maybe? Wow, exposing my noobness with linux here xD
Be my guest : https://github.com/bartoszek/cr-patch/blob/master/network_engine.py.patch.gpg
passphrase is equal to 1235-1 ;)
Hi Bart! Awesome! Thanks for putting in a huge effort :D. I only ask one thing, if you can share the plain source patch with us so we can review and include it in our master? Given the pace of development here its likely your patch will be made obsolete as it is right now, if we can see the source we can make sure its in our repository and so won't get left behind with subsequent releases.
I sent you an e-mail in response to your other question too which gave a lengthier explanation, but short story is, THANK YOU! And, please keep contributing :)
James
I make a simple bspatch, for users of Linux flavors other than Debian, for blender 2.79 (python >=3.6)
To apply the patch run this in bash:
cd ~/.config/blender/2.79/scripts/addons/crowdrender/src/bl_2_8_79 wget https://github.com/bartoszek/cr-patch/raw/master/network_engine.pyc.bspatch bspatch network_engine.pyc network_engine.pyc network_engine.pyc.bspatch
If you need a patch for other blender/python version just ping me ;)