dear all, I have been trying to get freevo 1.9.2b2 up and running for some days ; I uploaded a version in Debian that is reasonably fine (though there are some bugs... I'll post them later on); but I had one major showstopper that I wanted to share. The showstopper was this: when I tried to install freevo 1.9.2b2 (and newer kaa from SVN) in my usual freevo-PC , freevo could not talk to its recordserver. This was quite weird, since it all worked fine in my notebook (!!) After many (many!) hours of trial-and-error, I wrote the two scripts in attachment. The scripts expose a problem , that AFAICT may be (according to tracebacks) in _resolve_hostname_with_action in "kaa/base/sockets.py" Problem: it seems that SVN kaa rpc , binds to IPV6 but ignores IPV4 Note that it makes a difference if in your /etc/hosts.file you have ::1 ip6-localhost ip6-loopback or ::1 localhost ip6-localhost ip6-loopback I will call the first situation [L4] and the second [L6] FYI [L6] is the situation in the notebook ; [L4] in the freevo-PC ----------------------------------- In [L4], when you start the server without hostname # python kaa_rpc_server_test.py & then this server cannot be reached using default argument, # python kaa_rpc_client_test.py Contacting the server on localhostbut it can be reached using python kaa_rpc_client_test.py ip6-localhost------------------------------------------------------- In [L6], when you start the server without hostname # python kaa_rpc_server_test.py &then this server can be reached, # python kaa_r$ python2.6 kaa_rpc_client_test.py----------- both in [L4] and [L6], moreover, netstat does not find the server as a IPV4 , only as IPV6 $ netstat --inet6 -a | grep 19999 tcp6 0 0 [::]:19999 [::]:* LISTEN $ netstat --inet -a | grep 19999 [NO OUTPUT] --------- in [L4], trying to force the hostname to be '127.0.0.1' has this effect # python kaa_rpc_server_test.py 127.0.0.1 & --------------------- in [L6] it works but AFAICT the netstat is weird $ netstat --inet -an | grep 19999----------------- also since my local network is IPV4 only, I cannot contact the rpc_kaa_server on one machine using another machine a. |
import sys import kaa import kaa.rpc host='localhost' if len(sys.argv)>1: host=sys.argv[1] print 'Contacting the server on ', host
channel = kaa.rpc.connect((host,19999),'secret', retry=1) print channel.status kaa.inprogress(channel).wait() print channel.status if channel.status != kaa.rpc.CONNECTED: print 'ARGH' else: inprogress = channel.rpc('ping') inprogress.wait() print inprogress.result
import sys import kaa import kaa.rpc host='' if len(sys.argv)>1: host=sys.argv[1] print 'Starting a server that listens on ', (host or 'every inbound call') class R: @kaa.rpc.expose('ping') def ping(self): return 'ciao' rpc = kaa.rpc.Server((host,19999),'secret') r=R() rpc.register(r) print('kaa.main starting') kaa.main.run() print('kaa.main finished')
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel