My guess is that you are running on Linux. On some systems, the network software refuses to let go of the socket even after it is closed when the program that opened the socket exits. There is a rather complex reason for this: it is an attempt to avoid an extremely unlikely but extremely unpleasant condition. After about 1-2 minutes, the bad condition becomes impossible, and then the network software in the kernel will release that socket address. So it can happen that you kill AFNI then restart it within this 1-2 minute interval, and it won't work with the NIML socket address since the socket address is still being held hostage.
If you can't get it to work after waiting, then something else bad is happening, but I'm not sure what that might be. You could use the
netstat program to see what has grabbed that port; the port number is 53211 (my old zip code in Milwaukee); a command like
netstat -n | grep 53211
might help. Or it might not.
bob cox