MT#8067 use nodename not hostname

(cherry picked from commit cd344a0d60b217f9f75bab7166e669be30b9070d)
MT#8067 check nodename no hostname to exclude ourselves

(cherry picked from commit d9e6ba263ddd90b04bf7a56ca8e9e7d987941257)