I'm usining Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64) in headless mode.
Installed TeamViewer 13 (13.1.1548) deb package sucessfully.
trying to run "temaviewer setup" few times and sometimes it just gives me :
"There was a connectivity issue. Please check your internet connection and try again."
and once I made it throught all the way to adding a machine to My contacts at Teamviever Management console and I can see my computer there but with final result saying:
"Unable to add this computer to your account. Please contact support@teamviewer.com if the problem
persists."

Now if i run "sudo teamviewer setup" again I can see my computer in Management console coming up online for that brief time while I'm running setup and then it goes off line again when setup quites with message:

I have tried turning off my Ubuntu firewall ...no help...same behaviour. I have tried restarting the daemon " teamviewer daemon restart" - no help. I have tried installing teamviewer-host 13 on the same machine ...and I get same behaviour. I have tried the same process on my other Ubuntu machine...exactly same behaviour.
and just to clarify on the same local network I have windows machines and connectivity to Teamviewer's servers is OK.
At this point not sure what else to try.
Link to logs:
https://www.dropbox.com/s/m5ypc79cx9slwc7/tvlog_P3_2018-03-22.tar.gz?dl=0
Regards Stefan.