hjxwho | 15 May 17:23 2014
Picon

NAT configuration

Hi all,
Does someone have tried to use Pyro4 under NAT? I use vituralbox to set up a server, and the Network setting is NAT. Also, i specific the port forwarding.
Then, in the code, I did this

daemon = Pyro4.Daemon(port=8888,nathost="140.182.27.137", natport=8889)

After this, 
I tried to call this remote on my host computer by using the uri provided by the server.
However, I received 

Pyro4.errors.ConnectionClosedError: receiving: not enough data 

It seems like the server did not receive any data from the client. I checked the port 8889, and it says it’s listening.
Is there any other configuration I need to do ?

Thank you,
Klaus
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 16 Apr 09:48 2014
Picon

[Error 111] connection refused

Hi all,
When I tried to test Pyro4 on two separated vitural machines, I got this error:

cannot connect: [Error 111] Connection Refused

My two machines are using the NAT Network. They can ping each other and I also tried a little socket demo to ensure they can talk to each other. Also, I closed both firewalls. 

Can someone give me some advice? I really appreciate that!

Dante
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 15 Apr 04:48 2014
Picon

How to make my service public

Hi all,
I know this is a silly question but can someone tell how to make my service public?
I tried to make the name server public and did it in the following way:
1. use ifconfig to find the address
2. then, run the python -m Pyro4.naming -n 10.0.2.15

I tired to ping this server on another virtual machine, and it failed to locate the server.

Can anyone tell me what I should do to make it correct?
Thank you!
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
Irmen de Jong | 12 Apr 01:17 2014
Picon

Pyro 4.25 released!


Hi,

Pyro 4.25 has just been released!

Get it from Pypi:  http://pypi.python.org/pypi/Pyro4/
Or straight from Github:  https://github.com/irmen/Pyro4
Documentation: http://pythonhosted.org/Pyro4/index.html

Overview of new stuff in this version:

now also puts package name in serpent serialization data for custom class instances
(previously only the class name was used)
requires serpent 1.5 or newer (because of the feature above)
support for (Linux) abstract namespace AF_UNIX sockets (with a 0-byte at the start
of the name)
register_dict_to_class method added on SerializerBase, to be able to deserialize to
particular user defined classes
docs: mention that you may have to install serpent manually (most notably with
alternative Python implementations)
docs: mention the serialization hooks on SerializerBase
added ser_custom example that shows how to use the serialization hooks

Have fun!

Irmen de Jong
madhuri | 10 Mar 05:43 2014
Picon

High Availability of Pyro Servers

Hi All,

I have installed pyro on my machine and able to interact with remote objects
on different machine.

But I have a question regarding availability of Pyro servers. 
For eg. If I have multiple pyro servers(one running as master server at a
time and others as slave servers), is there any way in pyro to invoke slave
servers to run as master in case of any failures?

Thanks, in advance!!

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Tom Hanson | 3 Mar 17:41 2014

Having trouble handling events

Hey everyone!

I'm trying to add Pyro4 events to my gobject MainLoop, but I'm having trouble with handling them.

This is some of some code that I've tried:

def start_pyro(self,device_id):
    """Sets up Pyro, sharing Slave, and starting the eventloop"""
    def handle_pyro(self, socket,*args):
      daemon.events(socket)
      return True
      
    slave = Slave()
    
    daemon=Pyro4.Daemon()
    ns=Pyro4.locateNS()
    uri=daemon.register(slave)
    ns.register("pisync.slave.%s" % device_id, uri)
    
    gobject.io_add_watch(daemon.sockets[0],gobject.IO_IN,handle_pyro)
    gobject.MainLoop().run()

It seems to run fine, but when I try to access the object remotely the remote device just hangs and the local device displays:

Traceback (most recent call last):
  File "modules/pyro_slave_new.py", line 83, in handle_pyro
    print daemon.events([socket])
  File "/usr/local/lib/python2.7/dist-packages/Pyro4/core.py", line 658, in events
    return self.transportServer.events(eventsockets)
  File "/usr/local/lib/python2.7/dist-packages/Pyro4/socketserver/threadpoolserver.py", line 133, in events
    assert self.sock in eventsockets
AssertionError

Could anyone point me to where I'm going wrong?

Thanks!
Tom Hanson
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
Marcell Legeza | 24 Feb 22:11 2014
Picon

Stockmarket tutorial help

Hello!

I would like to ask for help regarding the stockmarket tutorial. I have a clean ubuntu installation in which i copy-pasted the code of the tutorial. I start the nameserver and the stockmarket cannot connect to it. The full error is here:

Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 334, in locateNS
    proxy.ping()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 160, in __call__
    return self.__send(self.__name, args, kwargs)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 306, in _pyroInvoke
    msg = Message.recv(self._pyroConnection, [Pyro4.message.MSG_RESULT])
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/message.py", line 160, in recv
    msg = cls.from_header(connection.recv(cls.header_size))
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 456, in recv
    return receiveData(self.sock, size)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 193, in receiveData
    raise err
Pyro4.errors.ConnectionClosedError: receiving: not enough data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "stockmarket.py", line 63, in <module>
    main()
  File "stockmarket.py", line 53, in main
    ns = Pyro4.locateNS()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 340, in locateNS
    raise e
Pyro4.errors.NamingError: Failed to locate the nameserver
legezam <at> ubuntu:~/PycharmProjects/PyroTutorial$ python3 stockmarket.py 
Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 334, in locateNS
    proxy.ping()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 160, in __call__
    return self.__send(self.__name, args, kwargs)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 306, in _pyroInvoke
    msg = Message.recv(self._pyroConnection, [Pyro4.message.MSG_RESULT])
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/message.py", line 160, in recv
    msg = cls.from_header(connection.recv(cls.header_size))
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 456, in recv
    return receiveData(self.sock, size)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 193, in receiveData
    raise err
Pyro4.errors.ConnectionClosedError: receiving: not enough data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "stockmarket.py", line 63, in <module>
    main()
  File "stockmarket.py", line 53, in main
    ns = Pyro4.locateNS()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 340, in locateNS
    raise e
Pyro4.errors.NamingError: Failed to locate the nameserver

I have tried it with ufw disabled and enabled with corresponding rules, and still no change. The interesting part is that the warehouse example (with servesimple) works exactly as it is descripted in the tutorial. (with nameserver turned on)
The stockmarket stucks at the line: locateNS().

Environment: Ubuntu 64 desktop in VMWare workstation

I am really new to this, please help me!

Thank You in advance!

Regards,
Marcell Legeza
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
Irmen de Jong | 17 Feb 23:36 2014
Picon

Pyro 4.24 released! (note: has backward-incompatible config item change)


Hi,

Pyro 4.24 has just been released!

Get it from Pypi:  http://pypi.python.org/pypi/Pyro4/
Or straight from Github:  https://github.com/irmen/Pyro4
Documentation: http://pythonhosted.org/Pyro4/index.html

Overview of new stuff in this version:

Python 3.4 compatibility added (fixed pickle/marshal issues)
a backwards incompatible change has been implemented regarding the threadpool
implementation and configuration, see next two items.
threadpool is now again a fixed size determined by the new THREADPOOL_SIZE config
item (defaults to 16)
config items removed: THREADPOOL_MINTHREADS, THREADPOOL_MAXTHREADS,
THREADPOOL_IDLETIMEOUT
daemon no longer sends an exception response when a communication error occurred
(such as a timeout). This fixes the MSG_PING/disconnect example on linux
jython: multiplex server type now available (uses select based multiplexing). Be
wary, this has not been tested much. When in doubt, use the thread server type.
python wheel distribution format support added (universal, setup.cfg)
merged name server initd script improvements that were made for the Debian package
(easy enable/disable, use sh instead of bash, etc)

Have fun!

Irmen de Jong
Frédéric | 17 Feb 12:59 2014

Porting Pyro to micropython

Hi there,

Some years ago (back to 2003), I started a software based on Pyro to
control a big instrument, in a french research institute (ILL¹).

This software is split in 3 parts: a Pyro server is running on an embedded
system (VME card running linux), where we wrote some low-level task to
drive the instrument. On a desktop computer, we wrote another Pyro server,
which is itself a client of the embedded Pyro server; this second server
implements high level tasks, and is itself used by clients which send
commands, and receive results. These clients are mainly console oriented,
based on ipython.

This software is still running fine for all these years, almost 24/7/365:
Pyro was a really good choice :o)

I recently discovered a great project: micropython². It is a python
interpreter for micro-controller (stm32f4xx). This project is amazing! I
ordered 4 boards (not yet delivered, as Damien, the developer, is still
working on it), and I will use them to replace my Arduino boards ;o)

So, why not porting Pyro to micropython? This would be great to be able to
write low-level code on the pyboard, which has limited ressources, and is
more I/O oriented, and then have a higher-level code running on a
desktop-like computer. Mostly what we did to drive our intruments ;o)

The question is: can Pyro run on micropython? I don't think it is possible
to port the complete server code, but having some basic Pyro core running
should be great, even if we don't maintain compatibility with official
Pyro project ; some fork would be OK too.

What do you think? I already have a non-official board running micropython
(STM32F4-Discovery), so I can start making some tests. Where should I
start? Which part of the code should I dig into?

Thanks for you help,

¹ http://www.ill.eu
² http://www.micropython.org

PS: as micropython implements python3 language, I guess it is better to
use Pyro4.

--

-- 
    Frédéric

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Pyro-core mailing list
Pyro-core <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyro-core
Irmen de Jong | 14 Feb 23:41 2014
Picon

python 3.4 compatibility

Hi,

I've tried to run Pyro on Python 3.4.0-RC1 and discovered some issues related to the new
pickle protocol. They seem rather minor but require a new Pyro version to deal with
them. So, if you are planning to use Pyro on Python 3.4 you'll have to use version 4.24
or newer (which is not released yet, but I've already pushed the necessary fixes).

I am not aware of other issues, but have only ran the unit test suite. So I may have
missed something. Please report here (or on the github issue tracker) if you discover an
problem yourself when using python 3.4 with pyro. Thanks!

Cheers
Irmen de Jong

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
Richard van Bemmelen | 11 Feb 22:25 2014
Picon

Are decorators supported?

I am trying to add a function to an instance of a Pyro4 object, like so:



def addto(instance):
    def decorator(f):
        import types
        f = types.MethodType(f, instance, instance.__class__)
        setattr(instance, f.func_name, f)
        return f
    return decorator

cs = Pyro4.Proxy("PYRONAME:example.cserv")

<at> addto(cs)
def getInit(self):
    print self.initCsd
    return self.initCsd
 

print getInit()

This code is running in a client.
It should print the content of self.initCsd on the server and on the client.
Instead, I get this on the client (nothing on the server):

<Pyro4.core._RemoteMethod object at 0x105523dd0>
<Pyro4.core._RemoteMethod object at 0x105523dd0>

So, is this supported?

Richard

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core

Gmane