I have seen OpenKm to fail at startup sometimes while trying to bind to a port when its busy, in windows enviroment. Didnt test it in linux.
Its really easy to add a batch file before the executing startup.bat and kill all the processes in the desired port:
The following command will print and kill all process and child process in port 2002:
This script will solve the problem that OpenKM cant kill the process soffice.bin process binded at port 2002, since it automatically tries to run it and needs the port to be completly free.
Its really easy to add a batch file before the executing startup.bat and kill all the processes in the desired port:
The following command will print and kill all process and child process in port 2002:
Code: Select all
Take in mind that if you want to test it in the command console you must use only one % symbol. ( %P ). Two % are needed inside the .bat batch file.FOR /F "tokens=5 delims= " %%P IN ('netstat -a -n -o ^| findstr :2002') DO @ECHO TaskKill.exe /PID %%P /T /F
FOR /F "tokens=5 delims= " %%P IN ('netstat -a -n -o ^| findstr :2002') DO TaskKill.exe /PID %%P /T /F
This script will solve the problem that OpenKM cant kill the process soffice.bin process binded at port 2002, since it automatically tries to run it and needs the port to be completly free.