The documentation https://www.torproject.org/docs/tor-manual.html.en says that default value of CookieAuthentication is 0. However, until I set it 0 in my torrc, tor wanted a cookie ("host 9051 515 Authentication failed: Wrong length on authentication cookie.")
Hi Tomáš. The tor man page (and the documentation you cited) talks about tor's defaults. However, since you're using Ubuntu you got this from the deb, right? If so then the deb contains a torrc of its own (which is understandably a little confusing). I believe that this is what it uses...
https://gitweb.torproject.org/debian/tor.git/blob/HEAD:/debian/tor-service-d...