Hmm, when starting Avast from registry, I always got the connection error with my SSH tunnel ( started from startup folder ). After some time ( 10 seconds ) manual restart of the tunnel used to solve this.

It’s good to say( but should not interfere ), that I’m using the tunnel for my mail as well:

mail client at home → avast mail guard → ssh tunnel to office intranet → intranet mail server.