Again with "write to TUN/TAP : Invalid argument (code=22)"

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
SeijiSensei
OpenVpn Newbie
Posts: 4
Joined: Wed Mar 13, 2013 7:04 pm

Again with "write to TUN/TAP : Invalid argument (code=22)"

Post by SeijiSensei » Wed Mar 13, 2013 7:30 pm

I have two servers at Linode running OpenVPN. One is in New Jersey and the other in California. The NJ server is running CentOS 5.6 while the CA server runs CentOS 6.3. However I have the same Repoforge OpenVPN RPM, openvpn-2.2.2-1, installed on both. Both have comp-lzo enabled, though the CA server has version 2.03-3.1 and the NJ server has 2.06-1. The connection works fine, but I still get the code=22 error in syslog. The 5.6 server in NJ maintains tunnels with half a dozen remote hosts. Only this connection generates the error. Another remote runs Debian 5.0.8 with OpenVPN 2.1~rc11-1, yet it does not cause the code 22 error. It is also running version 2.03 of lzo.

Every solution I've read points to comp-lzo as the culprit, but that cannot be the case here unless the difference between versions 2.03 and 2.06 of lzo is the problem. Still if that mismatch mattered, I'd see the same errors from the Debian connection. As I say, the connection between the Linode servers works fine, but I still get these errors. Any hints? An MTU issue perhaps?

I've run OpenVPN for quite a few years now without incident. I'd like to fix whatever causes this problem so it doesn't fill my syslog. These are simple static-key tunnels; the configuration on the NJ server reads like this:

Code: Select all

dev tun
ifconfig 10.1.1.1 10.1.1.12
secret /etc/openvpn/keys/my.key
port 51002
user nobody
group nobody
comp-lzo
ping 15
ping-restart 45
ping-timer-rem
persist-tun
persist-key
verb 3
The configuration in California has a "remote" directive and, of course, the IP addresses in the "ifconfig" directive are reversed.

SeijiSensei
OpenVpn Newbie
Posts: 4
Joined: Wed Mar 13, 2013 7:04 pm

Re: Again with "write to TUN/TAP : Invalid argument (code=22

Post by SeijiSensei » Tue Mar 19, 2013 7:56 pm

It's been about a week now since I posted this. Has no one encountered this problem? No possible solutions? My syslog continues to be filled with these errors.

SeijiSensei
OpenVpn Newbie
Posts: 4
Joined: Wed Mar 13, 2013 7:04 pm

Re: Again with "write to TUN/TAP : Invalid argument (code=22

Post by SeijiSensei » Fri May 10, 2013 6:59 pm

I'm going to bump this request one last time in the vain hope someone will actually reply. For the record, my server contines to log this error.

Thias
OpenVpn Newbie
Posts: 1
Joined: Wed May 29, 2013 4:38 pm

Re: Again with "write to TUN/TAP : Invalid argument (code=22

Post by Thias » Wed May 29, 2013 4:47 pm

Sorry, but all I'll be posting is a "me too" here.

Zero problems with all RHEL servers with OpenVPN 2.2.1 until today, all shared key based connections. Then I added some connections to some Gentoo servers running OpenVPN 2.3.1 and the message started appearing on the RHEL servers for those new connections, but not on the Gentoo servers' end.

I tried updating to 2.3.1 on one of the RHEL servers, but nothing changed.
I tried changing the plain "comp-lzo" I already had in all my configurations (they're all auto-generated), but nothing changed (I tried explicit "yes", explicit "no" and removing the option altogether).

Note that the tunnel seems to be working fine, though I've only testing ping and basic tcp connectivity so far.

But that message every minute is annoying, even if it's only a false-positive.

So... sorry I don't have an answer to the problem, but you're not the only one seeing it.

SeijiSensei
OpenVpn Newbie
Posts: 4
Joined: Wed Mar 13, 2013 7:04 pm

Re: Again with "write to TUN/TAP : Invalid argument (code=22

Post by SeijiSensei » Wed May 29, 2013 6:25 pm

Thanks, Thias! Even if you don't have an answer, it's good to know I'm not just a single voice crying out in the wilderness!

I'd be happy to provide any additional information to help diagnose this problem if only someone from the development team would ask!

Post Reply