I saw the same problem in 16.04 and recently "fixed" it (with a workaround to disable a kernel module).
If you manually mount the filesystem, then check
/etc/mtab, you'll probably see a bunch of junk added to the options, e.g. mine became:
The key insight is the
sec=sys bit, that means NFS isn't using any of the GSSAPI/Kerberos authentication stuff. (From context in mailing list issues, I've gleaned the the "-512" error is a generic error for when the "AUTH_GSS upcall" fails.)
You'd expect passing
sec=sys yourself in
/etc/fstab would fix this, but it didn't work for me. Nor did explicitly putting
What did work, following this thread was just blacklisting the
rpcsec_gss_krb5 module via modprobe.d:
echo 'blacklist rpcsec_gss_krb5' > /etc/modprobe.d/blacklist-rpcsec-gss-krb5.conf
The other caveat is that this is probably a bug, and should just work. There is, for example, this recent Redhat bug report for "nfs4_discover_server_trunking unhandled error -512" which has been marked as a duplicate of a non-public bug.