Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demos\time client fails #179

Closed
clach04 opened this issue Nov 26, 2015 · 2 comments
Closed

demos\time client fails #179

clach04 opened this issue Nov 26, 2015 · 2 comments

Comments

@clach04
Copy link
Contributor

@clach04 clach04 commented Nov 26, 2015

Checkout of 7599ccf, client demo fails to find time service:

D:\\rpyc\demos\time>client.py
Traceback (most recent call last):
  File "D:\\rpyc\demos\time\client.py", line 4, in <module>
    c = rpyc.connect_by_service("TIME")
  File "D:\\rpyc\demos\time\rpyc\utils\factory.py", line 211, in connect_by_service
    host, port = discover(service_name, host = host)[0]
  File "D:\\rpyc\demos\time\rpyc\utils\factory.py", line 192, in discover
    raise DiscoveryError("no servers exposing %r were found" % (service_name,))
rpyc.utils.factory.DiscoveryError: no servers exposing 'TIME' were found

If the server and client is modified to specify a port and client does not use service name, demo works fine:

from rpyc.utils.server import ThreadedServer
from time_service import TimeService


if __name__ == "__main__":
    #s = ThreadedServer(TimeService)
    s = ThreadedServer(TimeService, port=1234)
    s.start()

client:

import rpyc


#c = rpyc.connect_by_service("TIME")
c = rpyc.connect('localhost', 1234)
print( "server's time is", c.root.get_time())
@clach04
Copy link
Contributor Author

@clach04 clach04 commented Nov 26, 2015

https://github.com/tomerfiliba/rpyc/blob/master/docs/tutorial/tut3.rst mentions registry_server.py - even when this is running TIME look up fails. Out out from registry_server.py 👍

DEBUG:REGSRV/UDP/18811:server started on 0.0.0.0:18811
DEBUG:REGSRV/UDP/18811:querying for 'TIME'
DEBUG:REGSRV/UDP/18811:no such service

No register appears to take place.

If this is needed, a one line comment may be appropriate in the client (and server) demo source.

@clach04
Copy link
Contributor Author

@clach04 clach04 commented Nov 26, 2015

See issue #180

tomerfiliba added a commit that referenced this issue Feb 10, 2016
Fixed #179 Ensure time demo registers service name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant