bioimage-io / JDLL

The Java library to run Deep Learning models
https://github.com/bioimage-io/JDLL/wiki
Apache License 2.0
27 stars 6 forks source link

Workaround for SSL exception when downloading models from zenodo.org #45

Closed stefanhahmann closed 1 month ago

stefanhahmann commented 4 months ago

Downloading from Zenodo sometimes resulted in the following exception: java.security.cert.CertificateException: No subject alternative DNS name matching zenodo.org found

@carlosuc3m I was having the same problem again as I had shown during the hackathon, when trying to download models from Zenodo:

StarDist3D: javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching zenodo.org found.
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching zenodo.org found.
    at io.bioimage.modelrunner.bioimageio.download.DownloadModel.getFileSize(DownloadModel.java:605)
    at io.bioimage.modelrunner.bioimageio.download.DownloadModel.getModelSizeFileByFile(DownloadModel.java:581)
    at io.bioimage.modelrunner.bioimageio.download.DownloadTracker.<init>(DownloadTracker.java:174)
    at io.bioimage.modelrunner.bioimageio.download.DownloadTracker.getBMZModelDownloadTracker(DownloadTracker.java:198)
    at io.bioimage.modelrunner.bioimageio.BioimageioRepo.downloadModel(BioimageioRepo.java:502)
    at io.bioimage.modelrunner.bioimageio.BioimageioRepo.downloadByName(BioimageioRepo.java:605)
    at io.bioimage.modelrunner.model.Stardist3D.fromPretained(Stardist3D.java:125)
    at io.bioimage.modelrunner.model.Stardist3D.fromPretained(Stardist3D.java:106)
    at org.mastodon.tracking.detection.StarDist3DDetectorPlugin.detect(StarDist3DDetectorPlugin.java:89)
    at org.scijava.ui.behaviour.util.RunnableAction.actionPerformed(RunnableAction.java:47)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
    at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
    at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
    at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
    at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
    at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1020)
    at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1064)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
    at java.desktop/java.awt.Component.processEvent(Component.java:6397)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)