More information: this looks as if it may be a bug in hydra_nameserver. I found the following:
If you start up the hydra_nameserver, and do an mpiexec with both my 'server' and 'client' groups, *the first time*, if you've got things set up OK, the client retrieves the right port and connects.
However, if when the MPI application exits, you then try to run it a second time on both 'server' and 'client', the server gets a new port ID and appears to store it to the nameserver, BUT the client retrieves a port ID that is basically, the port ID the server had on its first run, plus some (nonrandom) garbage at the end. The garbage at the end appears to be some small slice of one of the text strings corresponding to a port ID. It seems therefore that the nameserver isn't (entirely) deleting the published port information when an MPI application exits. And then it's doing something strange when it tries to look up the same service name for a different run. If you kill the hydra_nameserver process, then when you run the applications again with 'server' and 'client' they connect.
Incidentally, I got the following errors reported from what looks to be the hydra_nameserver on one run, when the 'server' group executed MPI_COMM_ACCEPT: