Re: Pyro 4 help - please? :)
Irmen de Jong <[email protected]> Wed, 22 Oct 2014 00:38:14 +0200
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
On 21-10-2014 22:02, Aaron Wylie wrote:
>>From Aaron 2: I've entered "192.168.1.147 GOATS" into the /etc/hosts file
> of the pi and I can how ping the windows box from the pi using the windows
> box name. Cool! Regarding setting up a DNS, is that something out-of-the-box
> with Windows 7, or do I need a 3rd party app?
Windows Server edition can run a dns server (I believe as part of active directory) but
setting it up is a windows admin task. Alternatively you can fire up another linux box
and run a dns server on that instead (should be a standard package such as bind).
>>From Aaron 2: I was able to use 'daemon = Pyro4.Daemon(host="pi-001")' and
> it registered with the nameserver (pi-001 is the name of the pi. Original, I
> know.)
> "frequency --> PYRO:obj_45212471e7c741a7b9d0b38f8b875094@pi-001:44441"
> Though, when I called the client.py script it gave me the same error that it
> was "actively refused". Weird, because pinging pi-001 from Windows 7 returns
> the pi ip address just fine.
Don't know what's going on there then, sorry.
Does pi-001 resolve to 192.168.1.139?
> BUT! When I use 'daemon = Pyro4.Daemon(host="192.168.1.139")' in the server
> function, everything registers and works! Yay!!
> I tried using Pyro4.socketutil.getIpAddress("hostnameofthePi") and it just
> returned 127.0.1.1 which doesn't help me from the windows 7 side.
> I would prefer to stay away from hardcoded ip addresses if possible.
Try this: Pyro4.socketutil.getIpAddress("pi-001", workaround127=True)
Irmen
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho