bell
(Victor)
September 23, 2019, 5:16pm
1
Could you please explain what these warnings mean?
Mon Sep 23 10:42:09 2019] WARNING:py.warnings:/usr/local/lib/python3.6/site-packages/sql/__init__.py:1294: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.0.0.52', 44961), raddr=('10.0.0.67', 389)>
super(Column, self).__init__()
Mon Sep 23 10:56:07 2019] WARNING:py.warnings:/usr/local/lib/python3.6/site-packages/sql/__init__.py:921: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.0.0.52', 45401), raddr=('10.0.0.67', 389)>
super(Table, self).__init__()
pokoli
(Sergi Almacellas Abellana)
September 24, 2019, 7:14am
2
From the port (389) it seems that the connection to the ldap server is not closed properly.
Are you using the ldap_authentication module?
ced
(Cédric Krier)
September 24, 2019, 7:31am
3
It is probably this connection .
bell
(Victor)
September 24, 2019, 10:38am
4
Yes.
Any ideas to solve this problem?
ced
(Cédric Krier)
September 24, 2019, 10:47am
5
It is not a problem, just a warning.
The connection should be explicitly closed.
bell
(Victor)
September 26, 2019, 1:42pm
6
Who should close the connection to the ldap server?
Who is the developer of the ldap_authentication module?
bell
(Victor)
September 26, 2019, 1:49pm
8
ced:
Tryton community.
So you need to fix the ldap_authentication module?
ced
(Cédric Krier)
September 26, 2019, 1:52pm
9
Yes someone has to propose a fix .
bell
(Victor)
September 26, 2019, 2:09pm
10
OK.
Here is a workaround for ignoring the warnings:
import warnings
warnings.simplefilter("ignore", ResourceWarning)
edbo
September 26, 2019, 8:23pm
11
Can you give a bit more information (which Tryton version, OS, when this happens etc) on the warning? Because I don’t see that kind of warning on my install (I’m also using ldap_authentication). I’m on Tryton 5.0 in a Python 3.6 virtual environment running on CentOS 7. If I can reproduce it, I can try to fix it. Just adding a filter to ignore the warning is not fixing the issue.
ced
(Cédric Krier)
September 27, 2019, 7:43am
12
bell
(Victor)
September 27, 2019, 12:47pm
13
I’m on Tryton 5.2, Python 3.6, FreeBSD 11.3.
It’s not a fixing, just a workaround.
bell
(Victor)
October 1, 2019, 2:19pm
14
The warning occurs immediately after entering the password.
The warning is not displayed, it is output to files warning.log, debug.log, info.log.