OpenVPN on Android Reporting "TUN write exception: write_some: Invalid argument"

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
nh905
OpenVpn Newbie
Posts: 1
Joined: Wed Nov 14, 2018 4:11 pm

OpenVPN on Android Reporting "TUN write exception: write_some: Invalid argument"

Post by nh905 » Sun Mar 27, 2022 3:13 pm

I recently updated my OpenVPN configurations (turn off comp-lzo, switch to topology subnet). After a few false starts, everything seemed to be working well. I happened to check the log on my Android OpenVPN client and noticed numerous "TUN write exception: write_some: Invalid argument" errors during connection.

A quick search suggested compression issues. However, I noticed that the server log showed "failed to empirically measure MTU (requires OpenVPN 1.5 or higher at other end of connection)." It turns out I had run into mtu issues while travelling, had added "mtu-test" to the server's UPD profile, and never removed it. After disabling "mtu-test", the Android OpenVPN errors disappeared. I am posting this in case anyone else sees this error message.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN on Android Reporting "TUN write exception: write_some: Invalid argument"

Post by TinCanTech » Sun Mar 27, 2022 3:26 pm

That is a really nice find, thanks! 8-)

Post Reply