"OSError: [Errno 98] Address already in use" - why does that stuff deal at it's own with the source-port? on a busy machine running dns-resolvers and all sort of milters and deamons for mail-processing that is racy by definition it happens not too often because a majority of junk is blocked here by psoscreen and RBL scoring as well as a very strict rate-limiting just dropping new connections after hit from a source IP ________________________________ logwatch for 24 hours **Unmatched Entries** 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: During handling of the above exception, another exception occurred: 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/spf.py", line 1182, in dns_txt 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/libexec/postfix/policyd-spf", line 531, in _spfcheck 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: OSError: [Errno 98] Address already in use 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 608, in check1 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 569, in check 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/spf.py", line 304, in check2 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 244, in req 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 269, in sendUDPRequest 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/spf.py", line 127, in DNSLookup 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 202, in getSource 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/spf.py", line 564, in check 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 198, in getSource 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 1216, in <listcomp> 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: OSError: [Errno 98] Address already in use 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: TypeError: 'OSError' object is not subscriptable 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: During handling of the above exception, another exception occurred: 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 205, in conn 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 244, in req 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 304, in check2 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/libexec/postfix/policyd-spf", line 707, in <module> 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/libexec/postfix/policyd-spf", line 531, in _spfcheck 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: TypeError: 'OSError' object is not subscriptable 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 269, in sendUDPRequest 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 1310, in dns 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 922, in check0 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 1216, in dns_mx 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 202, in getSource 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/libexec/postfix/policyd-spf", line 707, in <module> 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/spf.py", line 1310, in dns 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/spf.py", line 1133, in dns_spf 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 198, in getSource 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 127, in DNSLookup 1 Dec 21 13:16:38 mail-gw policyd-spf[10092]: File "/usr/lib/python3.5/site-packages/spf.py", line 1222, in dns_a 1 Dec 21 17:11:45 mail-gw policyd-spf[30809]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 205, in conn ________________________________ Dec 6 12:03:20 mail-gw policyd-spf[8410]: Traceback (most recent call last): Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 198, in getSource Dec 6 12:03:20 mail-gw policyd-spf[8410]: self.s.bind(('', source_port)) Dec 6 12:03:20 mail-gw policyd-spf[8410]: OSError: [Errno 98] Address already in use Dec 6 12:03:20 mail-gw policyd-spf[8410]: Dec 6 12:03:20 mail-gw policyd-spf[8410]: During handling of the above exception, another exception occurred: Dec 6 12:03:20 mail-gw policyd-spf[8410]: Traceback (most recent call last): Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/libexec/postfix/policyd-spf", line 707, in <module> Dec 6 12:03:20 mail-gw policyd-spf[8410]: instance_dict, configData, peruser) Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/libexec/postfix/policyd-spf", line 419, in _spfcheck Dec 6 12:03:20 mail-gw policyd-spf[8410]: res = spf.check2(ip, helo_fake_sender, helo, querytime=configData.get('Lookup_Time')) Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/spf.py", line 304, in check2 Dec 6 12:03:20 mail-gw policyd-spf[8410]: receiver=receiver,timeout=timeout,verbose=verbose,querytime=querytime).check() Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/spf.py", line 569, in check Dec 6 12:03:20 mail-gw policyd-spf[8410]: rc = self.check1(spf, self.d, 0) Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/spf.py", line 608, in check1 Dec 6 12:03:20 mail-gw policyd-spf[8410]: return self.check0(spf, recursion) Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/spf.py", line 917, in check0 Dec 6 12:03:20 mail-gw policyd-spf[8410]: if self.cidrmatch(self.dns_a(arg,self.A), cidrlength): Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/spf.py", line 1222, in dns_a Dec 6 12:03:20 mail-gw policyd-spf[8410]: r = self.dns(domainname, A) Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/spf.py", line 1310, in dns Dec 6 12:03:20 mail-gw policyd-spf[8410]: for k, v in DNSLookup(name, qtype, self.strict, timeout): Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/spf.py", line 127, in DNSLookup Dec 6 12:03:20 mail-gw policyd-spf[8410]: resp = req.req() Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 244, in req Dec 6 12:03:20 mail-gw policyd-spf[8410]: self.sendUDPRequest(server) Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 269, in sendUDPRequest Dec 6 12:03:20 mail-gw policyd-spf[8410]: self.conn() Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 205, in conn Dec 6 12:03:20 mail-gw policyd-spf[8410]: self.getSource() Dec 6 12:03:20 mail-gw policyd-spf[8410]: File "/usr/lib/python3.5/site-packages/DNS/Base.py", line 202, in getSource Dec 6 12:03:20 mail-gw policyd-spf[8410]: if msg[0] != 98: raise Dec 6 12:03:20 mail-gw policyd-spf[8410]: TypeError: 'OSError' object is not subscriptable
This occurs in F25 as well.
It is possible that this is actually a python3-py3dns bug. According to just linked Launchpad bug, we need to be bringing 3.1.1 into fedora to get this fixed.
I'm also having this problem. Is there a temporary workaround? Which recent update caused this? Is it possible to back off the update and revert to a previous version? Feb 1 12:47:53 mail03 policyd-spf[5364]: OSError: [Errno 98] Address already in use Feb 1 12:47:53 mail03 policyd-spf[5364]: TypeError: 'OSError' object is not subscriptable Feb 1 12:47:53 mail03 postfix/smtpd[5273]: warning: missing attribute action in input from private/policy-spf Feb 1 12:47:53 mail03 postfix/spawn[5363]: warning: command /usr/libexec/postfix/policyd-spf exit status 1 When is the anticipated fix going to be available?
maybe the problem existed long long ago and only got visible by the switch to python3 - that would explain RANDOM wrong SPF handling (whitelist_auth) of SpamAssassin over a very long time and so downgrade whatever would just mask it again but not fix it
If I'm reading that launchpad bug correctly, the issue is with the version of python3-py3dns that is in Fedora. This needs to be updated. I'm hoping maintainers of that package are reading this bug.
python3-py3dns-3.1.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-29283660bd
python3-py3dns-3.1.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b6bcc20b0c
python3-py3dns-3.1.1-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b6bcc20b0c
python3-py3dns-3.1.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-29283660bd
python3-py3dns-3.1.1-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
python3-py3dns-3.1.1-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.