[minor] move agent socket creation higher in init process
[minor] fall back to os.Hostname() if linux agents fails to use --fqdn