473,395 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Pyro problems...


I'm using Pyro to develop a distribuited system

running my integration test suite I've found a strange
behaviour

it seems that whenever I have a failed resolve or unregister on
a name server, the name server acts normally during its life
span, but when I shut it down... something remains up...

if, afterwards, i lookup for a name server python freezes
and if i try to start a new name server, the port look occupied

is this a Pyro issue? or is that just me, that I've lost something
important?

i'll attach the code that causes the freeze

thanks!

Vieri
***
print('test_pyro_bug')
timeout = 10
#init pyro
Pyro.core.initServer(0)
Pyro.core.initClient(0)
#start name server
ns_host = 'localhost'
ns_port = 9090
name_server_starter = Pyro.naming.NameServerStarter()
name_server_thread = threading.Thread(
target = name_server_starter.start,
args = (ns_host, ns_port))
name_server_thread.setDaemon(True)
name_server_thread.start()
name_server_starter.waitUntilStarted(timeout)
#locate name server
locator = Pyro.naming.NameServerLocator()
name_server = locator.getNS(ns_host, ns_port)
name_server.createGroup( "my_group" )
#init daemon
daemon = Pyro.core.Daemon()
daemon.useNameServer(name_server)
daemon_thread = threading.Thread(
target = daemon.requestLoop,
args = ())
daemon_thread.setDaemon(True)
daemon_thread.start()
#try to unregisater a non existent object
dummy_name = "my_group" + ".dummy"
dummy = _DummyRemote()
daemon.connect(dummy, dummy_name)
try:
name_server.unregister(dummy_name + "not found")
except Pyro.core.NamingError:
pass
#shutdown daemon
daemon.shutdown()
daemon = None
daemon_thread.join(timeout)
daemon_thread = None
#shutdown name server
name_server._shutdown()
name_server_thread.join(timeout)
name_server_thread = None
#locate name server
locator = Pyro.naming.NameServerLocator()
##freezes here!
self.failUnlessRaises(
Pyro.core.ProtocolError,
locator.getNS, ns_host, ns_port)

------------------------------------------------
Vieri del Bianco
CEFRIEL · Politecnico di Milano
Via Fucini, 2 · 20133 Milano (Italy)
t: +39 0223954355
e: vi*************@cefriel.it
w: http://www.cefriel.it
------------------------------------------------

Jan 23 '06 #1
0 1304

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: hyperbob | last post by:
Hi, I'm working on a distributed application using Pyro, and I've come across several issues I'm not really sure how to handle, since this is my first distributed application. My application...
0
by: Golawala, Moiz M (GE Infrastructure) | last post by:
Hi Folks, I am trying to build my application using py2exe version0.5.2 for python 2.3 but the build does not seem to pick the pyro modules. I used an earlier version of py2exe to build the same...
2
by: Peter Gordon | last post by:
Is there somethin like tcl "send" command in Python. I would like to be able to exucate calls in a python program on one machine from another machine.
38
by: writeson | last post by:
Hi all, At work I'm considering proposing a solution for our distributed processing system (a web based shopping cart that feeds an actual printing production line) based on Pyro. I've done some...
0
by: Sells, Fred | last post by:
I'm using ActiveState python on a windows box to talk to ACtive Directory. I'm running a Pyro Server on the same box. The client is Linux running std Python 2.4. It works just fine until the...
2
by: jamitwidme | last post by:
Hello everyone Can someone help me fix this problem? I am using an example from Pyro(Python Remote Object) website directly. It is the last example from...
0
by: Irmen de Jong | last post by:
I'm happy to announce Pyro 3.8 -- Python's own powerful remote method invocation technology! You can get it via http://pyro.sourceforge.net, then go to the SF project homepage download area. ...
0
by: Chuckk Hubbard | last post by:
The docs say to try to discover the URI on my own if this happens. Could I get a hand doing that? This isn't just something I want to solve on my machine, e.g. by changing my network setup or what...
0
by: Chuckk Hubbard | last post by:
OK, I think I have it. The Manual says to start a Name Server "using the ns command", and I figured out that means using the pyro-ns script. On Mon, Nov 10, 2008 at 10:49 AM, Chuckk Hubbard...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.