Opened 3 years ago
Closed 3 years ago
#2269 closed defect (fixed)
File importer fails with "Aborted by user" even if the Abort button is not clicked
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | major | Milestone: | BASE 3.19.1 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
Stack trace:
net.sf.basedb.core.BaseException: Aborted by user on line 2 in file '....': .... at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:735) at net.sf.basedb.plugins.AbstractFlatFileImporter.run(AbstractFlatFileImporter.java:468) at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:117) at net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:574) at java.base/java.lang.Thread.run(Thread.java:832) Caused by: net.sf.basedb.core.signal.SignalException: Aborted by user at net.sf.basedb.core.signal.ExceptionInterruptHandler.handleInterrupt(ExceptionInterruptHandler.java:49) at net.sf.basedb.core.signal.ThreadSignalHandler.checkInterrupted(ThreadSignalHandler.java:106) at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:727) ... 4 more
The file has a URL but it leads to a non-existing server. The file importer will try to load metadata by calling File.updateURLMetadata()
. This call is inside a try/catch block that is intended to ignore all exceptions.
Adding a debug stack trace to this method reveals:
net.sf.basedb.core.BaseException: Could not load metadata for URL:sftp://..... at net.sf.basedb.core.File.updateURLMetadata(File.java:1071) at net.sf.basedb.plugins.batchimport.FileImporter.updateItem(FileImporter.java:263) at net.sf.basedb.plugins.batchimport.FileImporter.createItem(FileImporter.java:230) at net.sf.basedb.plugins.batchimport.FileImporter.createItem(FileImporter.java:57) at net.sf.basedb.plugins.batchimport.AbstractItemImporter.handleData(AbstractItemImporter.java:792) at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:700) at net.sf.basedb.plugins.AbstractFlatFileImporter.run(AbstractFlatFileImporter.java:468) at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:117) at net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:574) at java.base/java.lang.Thread.run(Thread.java:832) Caused by: java.net.SocketTimeoutException: Connect timed out at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333) at java.base/java.net.Socket.connect(Socket.java:648) at net.schmizz.sshj.SocketClient.connect(SocketClient.java:138) at net.sf.basedb.xfiles.sftp.SSHClientWrapper.<init>(SSHClientWrapper.java:89) at net.sf.basedb.xfiles.sftp.SftpConnectionManager.connect(SftpConnectionManager.java:177) at net.sf.basedb.xfiles.sftp.SftpConnectionManager.getMetadata(SftpConnectionManager.java:132) at net.sf.basedb.core.File.updateURLMetadata(File.java:1055)
The SocketTimeoutException
is actually a subclass of InterruptedIOException
and there is a special case for this that is intended to handle the "Abort" functionality by setting the Thread.interrupt()
flag. This was implemented in #2226.
Change History (2)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In [8017]
Fixes #2269: File importer fails with "Aborted by user" even if the Abort button is not clicked