Hi there!
I’m using a clusterhat with nat build (neat little device) to build a cluster. Problem is dispy wants to use the wifi connection by default. Can I tell it to start listening on another interface/ip address?
Client has 2 ips/interfaces, how do I tell dispy which to use?
Moderator: admin
-
- Posts: 2
- Joined: Sat Mar 05, 2022 11:58 am
-
- Site Admin
- Posts: 58
- Joined: Sun Dec 27, 2020 5:35 pm
Re: Client has 2 ips/interfaces, how do I tell dispy which to use?
Yes, you can use 'host' parameter to the hostname or IP you want to use. All dispy tools also have an option to specify one or more IP addresses to use in case of multi-homed network (or for masquerading even).
-
- Posts: 2
- Joined: Sat Mar 05, 2022 11:58 am
Re: Client has 2 ips/interfaces, how do I tell dispy which to use?
That’s excellent to hear! Glad I’m not barking up the wrong tree.
Where would one set this parameter? I have not set any custom options in here like that before.
Where would one set this parameter? I have not set any custom options in here like that before.
-
- Site Admin
- Posts: 58
- Joined: Sun Dec 27, 2020 5:35 pm
Re: Client has 2 ips/interfaces, how do I tell dispy which to use?
As mentioned, pass 'host' parameter when creating cluster, e.g., 'dispy.JobCluster(compute, host="a.b.c.d")'.
dispy by default uses host name configured for the system so likely you may want to set 'hostname' and its DNS appropriately so 'socket.gethostbyname(socket.gethostname())' resolves to the desired address.
dispy by default uses host name configured for the system so likely you may want to set 'hostname' and its DNS appropriately so 'socket.gethostbyname(socket.gethostname())' resolves to the desired address.