Restart Knime tries to start before the end is completed

I’m using Knime 4.3.0 on Windows10 and I noticed that restarting Knime (File > Restart) gives me in the restarted Knime a lock on my workspace “because it’s in use already”.
When this happens there is still a knime.exe visible in the task manager, which after some seconds disappears.

This happens more often when I ran a workflow which pushes memory to the max (i.e. the max I assigned in the knime.ini; the machine runs at 94% when this happens). My attempt to clear this memory usage is to first save the workflow and then use restart Knime.

I looked in the knime.log and I noticed several deletes failing of temp-files, of which I don’t know whether it’s important or not.
This is the last bit of my logfile where the restart is triggered (and everything which follows after that):
knime.log (26.7 KB)

Why is Knime started already when the exited version is not yet completely ended?

1 Like

I’ve upgraded to 4.3.1, but still this issue remains: knime.exe does not stop when the application is closed.

The knime.log ends with this, CPU usage stops, no change in memory usage or IO’s whatsoever:

2021-02-09 16:43:01,797 : DEBUG : KNIME-Temp-File-Deleter :  : Buffer :  :  : Deleted temporary file "C:\Users\myuser\AppData\Local\Temp\1\knime_xxxxxxxxxxxxxxxx3892\knime_container_20210209_4246984062407900881.bin.snappy"
2021-02-09 16:43:01,798 : DEBUG : main :  : StringWidgetNodeModel : String Widget : 0:58 : Removing all (0) views from model.
2021-02-09 16:43:01,799 : DEBUG : main :  : Node : String Widget : 0:58 : clean output ports.
2021-02-09 16:43:01,800 : DEBUG : main :  : DataColumnSpecFilterNodeModel : Column Filter : 0:2 : Removing all (0) views from model.
2021-02-09 16:43:01,801 : DEBUG : main :  : Node : Column Filter : 0:2 : clean output ports.
2021-02-09 16:43:01,802 : DEBUG : main :  : SimplePortObjectReaderNodeModel : Model Reader : 0:555 : Removing all (0) views from model.
2021-02-09 16:43:01,802 : DEBUG : main :  : Node : Model Reader : 0:555 : clean output ports.
2021-02-09 16:43:01,803 : DEBUG : main :  : WorkflowDataRepository : Model Reader : 0:555 : Removing handler 0dd21726-d047-45c0-9fc0-64e9e793c73d (Model Reader 0:555: <no directory>) - 2 remaining
2021-02-09 16:43:01,804 : DEBUG : main :  : SimplePortObjectReaderNodeModel : Model Reader : 0:554 : Removing all (0) views from model.
2021-02-09 16:43:01,804 : DEBUG : main :  : Node : Model Reader : 0:554 : clean output ports.
2021-02-09 16:43:01,805 : DEBUG : main :  : WorkflowDataRepository : Model Reader : 0:554 : Removing handler 110519b7-76ab-4ffc-93a9-84d4e61c6ef4 (Model Reader 0:554: <no directory>) - 1 remaining
2021-02-09 16:43:01,806 : DEBUG : main :  : StringWidgetNodeModel : String Widget : 0:369 : Removing all (0) views from model.
2021-02-09 16:43:01,806 : DEBUG : main :  : Node : String Widget : 0:369 : clean output ports.
2021-02-09 16:43:01,807 : DEBUG : main :  : WorkflowDataRepository : String Widget : 0:369 : Removing handler 8eb36b28-05e9-4dfa-93aa-d1f2b432dcf9 (String Widget 0:369: <no directory>) - 0 remaining
2021-02-09 16:43:01,808 : DEBUG : main :  : DBConnectorNodeModel : DB Connector : 0:64 : Removing all (0) views from model.
2021-02-09 16:43:01,809 : DEBUG : main :  : DefaultDBSession : DB Connector : 0:64 : Closing the connection manager of the session: DefaultDBSessionInformation(id=7bbceb64-19ad-4242-997e-bcf0ddf23fe0, dbType=DBType(id=mssqlserver, name=Microsoft SQL Server, description=null), driverDefinition=DBDriverDefinition(id=Official Driver for Microsoft SQL Server, name=Official Driver for Microsoft SQL Server, version=7.2.0, driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver, dbType=DBType(id=mssqlserver, name=Microsoft SQL Server, description=null), description=, origin=EXTENSION), connectionController=org.knime.database.connection.UserDBConnectionController=(url=jdbc:sqlserver://sqlserver:port;databaseName=DWH;integratedSecurity=true, authenticationType=NONE), dialectId=mssqlserver, attributeValues={knime.db.connection.restore=true})
2021-02-09 16:43:01,810 : DEBUG : main :  : Node : DB Connector : 0:64 : clean output ports.
2021-02-09 16:43:01,811 : DEBUG : KNIME-Database-Connection-Closer-1 :  : DBConnectionManager :  :  : Closing the database connection: URL="jdbc:sqlserver://sqlserver:port;databaseName=DWH;integratedSecurity=true"
2021-02-09 16:43:01,811 : DEBUG : main :  : StringWidgetNodeModel : String Widget : 0:57 : Removing all (0) views from model.
2021-02-09 16:43:01,813 : DEBUG : KNIME-Database-Connection-Closer-1 :  : DBConnectionManager :  :  : The database connection has been closed successfully: URL="jdbc:sqlserver://sqlserver:port;databaseName=DWH;integratedSecurity=true"
2021-02-09 16:43:01,813 : DEBUG : main :  : Node : String Widget : 0:57 : clean output ports.
2021-02-09 16:43:01,814 : DEBUG : main :  : DBConnectorNodeModel : DB Connector : 0:16 : Removing all (0) views from model.
2021-02-09 16:43:01,815 : DEBUG : main :  : DefaultDBSession : DB Connector : 0:16 : Closing the connection manager of the session: DefaultDBSessionInformation(id=fe7af509-00d8-42a1-b1eb-a692966edb09, dbType=DBType(id=mssqlserver, name=Microsoft SQL Server, description=null), driverDefinition=DBDriverDefinition(id=jTDS for Microsoft SQL Server, name=jTDS for Microsoft SQL Server, version=1.3.0, driverClass=net.sourceforge.jtds.jdbc.Driver, dbType=DBType(id=mssqlserver, name=Microsoft SQL Server, description=null), description=, origin=EXTENSION), connectionController=org.knime.database.connection.UserDBConnectionController=(url=jdbc:jtds:sqlserver://sqlserver2:port/DWH, authenticationType=NONE), dialectId=mssqlserver, attributeValues={knime.db.connection.restore=true, knime.db.connection.jdbc.properties=DerivableProperties(map={integratedSecurity="true" (LITERAL), sendTimeAsDateTime="false" (LITERAL)}, defaults=null)})
2021-02-09 16:43:01,816 : DEBUG : main :  : Node : DB Connector : 0:16 : clean output ports.
2021-02-09 16:43:01,816 : DEBUG : KNIME-Database-Connection-Closer-1 :  : DBConnectionManager :  :  : Closing the database connection: URL="jdbc:jtds:sqlserver://sqlserver2:port/DM"
2021-02-09 16:43:01,817 : DEBUG : main :  : ReadTableNodeModel : Table Reader : 0:1 : Removing all (0) views from model.
2021-02-09 16:43:01,819 : DEBUG : main :  : Node : Table Reader : 0:1 : clean output ports.
2021-02-09 16:43:01,818 : DEBUG : KNIME-Database-Connection-Closer-1 :  : DBConnectionManager :  :  : The database connection has been closed successfully: URL="jdbc:jtds:sqlserver://sqlserver2:port/DM"
2021-02-09 16:43:01,820 : DEBUG : main :  : WorkflowManager : xxxxxxxxxxxxxxxx : 0 : Project "xxxxxxxxxxxxxxxx 0" removed (2 remaining)
2021-02-09 16:43:01,821 : DEBUG : main :  : WorkflowRootEditPart :  :  : WorkflowRootEditPart deactivated
2021-02-09 16:43:01,823 : DEBUG : main :  : WorkflowRootEditPart :  :  : WorkflowRootEditPart deactivated
2021-02-09 16:43:01,824 : DEBUG : KNIME-Temp-File-Deleter :  : Buffer :  :  : Deleted temporary file "C:\Users\myuser\AppData\Local\Temp\1\knime_xxxxxxxxxxxxxxxx3892\knime_container_20210209_405578380442619822.tmp"
2021-02-09 16:43:03,277 : INFO  : KNIME shutdown hooks - org.knime.core.util.FileUtil$$Lambda$216/1980780021 :  : FileUtil :  :  : Deleting 217 temporary files.

There is no error shown in the log on the moment I close Knime. From that moment on it’s many lines of remove this and delete temp that.

@ipazin do you have a clue why knime.exe is not ending (and thus keeping a lock on my workspace)?

Edit: typo

Hello @JanDuo,

don’t know. Let’s see if someone else can explain it.

Br,
Ivan

Hello @JanDuo,

I tried reproducing above described behavior but couldn’t. Can you give it a try with newest KNIME version (4.3.2.) to see if you are still experiencing it? If yes is there possibility to share workflow which pushes memory to max? If I got it right when that happens you first save the workflow and then restart KNIME?

Br,
Ivan

1 Like

Hi @ipazin

I’ve uppgraded to 4.3.2 and it’s still there. I noticed this behaviour more often, not only when pushing Knime to the max, but also at lower memory-usage.

The logfile still looks the same. I stopped Knime yesterday end of the day and when the knime.exe stopped using CPU I killed the program. In the log it ends with this info message “shutdown hooks”. You see where it starts again this morning (always with these WindowsDefenderExceptionHandler messages, for which I don’t know if the are important or not).

2021-03-10 17:51:18,839 : DEBUG : main :  : WorkflowRootEditPart :  :  : WorkflowRootEditPart deactivated
2021-03-10 17:51:18,840 : DEBUG : main :  : WorkflowRootEditPart :  :  : WorkflowRootEditPart deactivated
2021-03-10 17:51:18,852 : DEBUG : KNIME-Temp-File-Deleter :  : Buffer :  :  : Deleted temporary file "C:\Users\janduo\AppData\Local\Temp\1\knime_container_20210310_2867994689944635794.bin.snappy"
2021-03-10 17:51:20,321 : INFO  : KNIME shutdown hooks - org.knime.core.util.FileUtil$$Lambda$216/1662417126 :  : FileUtil :  :  : Deleting 85 temporary files.
2021-03-11 07:37:44,954 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  : PowerShell command powershell -inputformat none -outputformat text -NonInteractive -Command Get-MpComputerStatus -ErrorAction Stop | Select-Object -ExpandProperty AMServiceEnabled did not terminate successfully.
2021-03-11 07:37:44,956 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  : Stderr is:
2021-03-11 07:37:44,958 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  : Get-MpComputerStatus : Operation failed with the following error: 0x800106ba
2021-03-11 07:37:44,959 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  : At line:1 char:1
2021-03-11 07:37:44,959 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  : + Get-MpComputerStatus -ErrorAction Stop | Select-Object -ExpandPropert ...
2021-03-11 07:37:44,960 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  : + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-03-11 07:37:44,961 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  :     + CategoryInfo          : NotSpecified: (MSFT_MpComputerStatus:ROOT\Microsoft\...pComputerStatus) [Get-MpComputerS 
2021-03-11 07:37:44,962 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  :    tatus], CimException
2021-03-11 07:37:44,963 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  :     + FullyQualifiedErrorId : HRESULT 0x800106ba,Get-MpComputerStatus
2021-03-11 07:37:44,964 : ERROR : main :  : WindowsDefenderExceptionHandler :  :  :  

And on top of this I have similar issues using RStudio. Switching between projects leaves programs “active” in the taskmanager details (while doing nothing). It must be something in my desktop (i.e. a virtual desktop). I’ve already asked the helpdesk at work if they have a clue, but they draw a blank on this too.

Workaround is simple, though a bit annoying.

Thanks for your time Ivan, but I think this topic can be closed.

1 Like

Hello @JanDuo,

I see. Sounds like something related to this specific desktop. Anyways we can keep topic open if someone experiences same/similar issues.

Br,
Ivan

1 Like

Hi @ipazin
There is a question/remark I received from the helpdesk at work on these errors on the WindowsDefenderExceptionHandler. They wonder why this powershell script is not checking whether there is a windefend-service is running in order to prevent these error 0x800106ba from happening. According to them something like the next line of code could do this trick.
If ((Get-Service windefend).Status -eq “Running”)) {}

Whether or not this would solve my issue is unknown. But from a point of view that code should give as little errors as possible, it might be something to look at anyway.
BR, Jan

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.