Univention Bugzilla – Bug 32255
UMC-server start fails if socket dir doesnt exists or no more inodes are available
Last modified: 2017-08-08 07:09:55 CEST
At ticket #2013081921003867, the following traceback has been observed: > 16.08.13 12:20:43.029 MAIN ( INFO ) : Initialising server process > 16.08.13 12:20:43.029 MAIN ( INFO ) : Using a UNIX socket > 16.08.13 12:20:43.029 MODULE ( ERROR ) : Traceback (most recent call last): > File "/usr/sbin/univention-management-console-module", line 110, in <module> > module = umcp.ModuleServer( options.socket, options.module, check_acls = False, timeout = session_timeout ) > File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/modserver.py", line 80, in __init__ > Server.__init__( self, ssl = False, unix = socket, magic = False, load_ressources = False ) > File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 442, in __init__ > os.unlink( self.__unix ) > OSError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/run/univention-management-console/11727-1376648442426.socket' The OSError is a follow up of a socket error, however, the cause of the socket error is not print to the log file.
Created attachment 5371 [details] Patch for correct handling of socket bind failure. The attached patch prints out the error message for the socket bind failure and tries to remove the socket file, catching an OSError in case the file does not exist.
The Error after applying the patch reads the following 19.08.13 11:26:05.095 MODULE ( ERROR ) : Traceback (most recent call last): File "/usr/sbin/univention-management-console-module", line 110, in <module> module = umcp.ModuleServer( options.socket, options.module, check_acls = False, timeout = session_timeout ) File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/modserver.py", line 80, in __init__ Server.__init__( self, ssl = False, unix = socket, magic = False, load_ressources = False ) File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 450, in __init__ self.__realsocket.listen( SERVER_MAX_CONNECTIONS ) File "<string>", line 1, in listen error: [Errno 22] Das Argument ist ung?ltig
(In reply to Kevin Dominik Korte from comment #2) > The Error after applying the patch reads the following > > 19.08.13 11:26:05.095 MODULE ( ERROR ) : Traceback (most recent call > last): > File "/usr/sbin/univention-management-console-module", line 110, in > <module> > module = umcp.ModuleServer( options.socket, options.module, check_acls = > False, timeout = session_timeout ) > File > "/usr/lib/pymodules/python2.6/univention/management/console/protocol/ > modserver.py", line 80, in __init__ > Server.__init__( self, ssl = False, unix = socket, magic = False, > load_ressources = False ) > File > "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server. > py", line 450, in __init__ > self.__realsocket.listen( SERVER_MAX_CONNECTIONS ) > File "<string>", line 1, in listen > error: [Errno 22] Das Argument ist ung?ltig More important is the line before the traceback: > Setting up connection to socket /var/run/univention-management-console/30904-1376904569464.socket failed: [Errno 2] Datei oder Verzeichnis nicht gefunden The directory /var/run/univention-management-console did not exist. In a different case (ticket #2013081521009136), no inodes were left on the device. In any case, theses errors need to be logged properly. The patch should be modified such that the module process exits correctly upon such a socket error.
All server crashs are logged since Bug #31130. Maybe this can also be WORKSFORME? We cannot change that no inodes are available and the socket directory is shipped by our packages (it can only not exist when manual interaction was present).
I would suggest creating the respective directory during the start up of the process, if it isn't present. For the inodes I agree, there isn't much one can do beyond proper logging.
(In reply to Florian Best from comment #4) > All server crashs are logged since Bug #31130. > > Maybe this can also be WORKSFORME? We cannot change that no inodes are > available and the socket directory is shipped by our packages (it can only > not exist when manual interaction was present). It would be nice if UMC could give a suggestion what to do. The problem is that the admin normally does not read the logfiles.
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4. If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
This issue has been filed against UCS 3.1. UCS 3.1 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.