Can not connect to omero using imagej log in issues

Hi, I’m not able to connect to our omero database using the omero imagej plugin, but I am with the omero.insight tool using the same credentials.

this works:


to open omero.insight:

but trying this through ImageJ does not. I put the omero.imagej plugin available from the omero download page into the ImageJ plugin folder:

Any ideas why this is happening? Thanks for your time, John

Is it a fresh ImageJ/Fiji installation? Just asking because with older and updated Fiji installations it can sometimes happen that an older version of the OMERO Fiji plugin keeps dangling in the plugin folder, which can cause issues. If you’re sure that the newest plugin jar is the only omero_ij jar in the plugin folder and it’s still not working, we’d need more information. Could you enable debug mode (Edit -> Options -> Misc) before connecting to OMERO, and then post what’s getting logged when you try to connect?

Kind Regards,
Dominik

thanks for taking my question. Yes, I deleted previous versions of omero plugins before adding the one I got from the ome site:

I verfied again I can log on through omero.insight then I open the imagej omero plug in and got this in the debug window:

setKeyUp: -1
actionPerformed: time=1610729776880, java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Connect to OMERO,when=1610729776879,modifiers=] on menuitem0
runPlugIn: org.openmicroscopy.shoola.MainIJPlugin(“imageJ=retrieve”)
runUserPlugIn: org.openmicroscopy.shoola.MainIJPlugin, arg=(“imageJ=retrieve”)
Heap memory usage: max 26512195584
Loaded L&F: com.apple.laf.AquaLookAndFeel
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.openmicroscopy.shoola.util.ui.OSMenuAdapter.setHandler(OSMenuAdapter.java:149)
at org.openmicroscopy.shoola.util.ui.OSMenuAdapter.setQuitHandler(OSMenuAdapter.java:84)
at org.openmicroscopy.shoola.util.ui.MacOSMenuHandler.initialize(MacOSMenuHandler.java:84)
at org.openmicroscopy.shoola.env.ui.TaskBarManager.attachListeners(TaskBarManager.java:916)
at org.openmicroscopy.shoola.env.ui.TaskBarManager.(TaskBarManager.java:982)
at org.openmicroscopy.shoola.env.ui.UIFactory.makeTaskBar(UIFactory.java:70)
at org.openmicroscopy.shoola.env.init.TaskBarInit.execute(TaskBarInit.java:111)
at org.openmicroscopy.shoola.env.init.Initializer.doInit(Initializer.java:275)
at org.openmicroscopy.shoola.env.Container.startupInPluginMode(Container.java:550)
at org.openmicroscopy.shoola.MainIJPlugin.run(MainIJPlugin.java:296)
at ij.IJ.runUserPlugIn(IJ.java:235)
at ij.IJ.runPlugIn(IJ.java:198)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Cannot add com.apple.eawt.ApplicationListener after installing an app event handler
at com.apple.eawt._AppEventLegacyHandler.checkIfLegacyAPIBlocked(_AppEventLegacyHandler.java:51)
at com.apple.eawt._AppEventLegacyHandler.addLegacyAppListener(_AppEventLegacyHandler.java:55)
at com.apple.eawt.Application.addApplicationListener(Application.java:420)
… 19 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.openmicroscopy.shoola.util.ui.OSMenuAdapter.setHandler(OSMenuAdapter.java:149)
at org.openmicroscopy.shoola.util.ui.OSMenuAdapter.setQuitHandler(OSMenuAdapter.java:84)
at org.openmicroscopy.shoola.util.ui.MacOSMenuHandler.initialize(MacOSMenuHandler.java:84)
at org.openmicroscopy.shoola.env.ui.TaskBarManager.attachListeners(TaskBarManager.java:916)
at org.openmicroscopy.shoola.env.ui.TaskBarManager.(TaskBarManager.java:982)
at org.openmicroscopy.shoola.env.ui.UIFactory.makeTaskBar(UIFactory.java:70)
at org.openmicroscopy.shoola.env.init.TaskBarInit.execute(TaskBarInit.java:111)
at org.openmicroscopy.shoola.env.init.Initializer.doInit(Initializer.java:275)
at org.openmicroscopy.shoola.env.Container.startupInPluginMode(Container.java:550)
at org.openmicroscopy.shoola.MainIJPlugin.run(MainIJPlugin.java:296)
at ij.IJ.runUserPlugIn(IJ.java:235)
at ij.IJ.runPlugIn(IJ.java:198)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Cannot add com.apple.eawt.ApplicationListener after installing an app event handler
at com.apple.eawt._AppEventLegacyHandler.checkIfLegacyAPIBlocked(_AppEventLegacyHandler.java:51)
at com.apple.eawt._AppEventLegacyHandler.addLegacyAppListener(_AppEventLegacyHandler.java:55)
at com.apple.eawt.Application.addApplicationListener(Application.java:420)
… 19 more
Exception in thread “Connect to OMERO”

/////////////////// Then I tried to log on and this was the result: ///////////////

setKeyDown: 157
keyPressed: code=157 (⌘), char=“” (65535), flags=⌘
setKeyUp: 67
setKeyUp: 157
Failed to log onto OMERO.
Reason: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
OMERO address: 10.224.1.143
User Name: luser – Password: **********************
Ice.SecurityException
reason = “IceSSL: handshake error”
at IceInternal.AsyncResultI.__wait(AsyncResultI.java:276)
at Ice.ObjectPrxHelperBase.end_ice_isA(ObjectPrxHelperBase.java:310)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:92)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:69)
at Ice.ObjectPrxHelperBase.checkedCastImpl(ObjectPrxHelperBase.java:2810)
at Ice.ObjectPrxHelperBase.checkedCastImpl(ObjectPrxHelperBase.java:2770)
at Glacier2.RouterPrxHelper.checkedCast(RouterPrxHelper.java:1787)
at omero.client.getRouter(client.java:802)
at omero.client.createSession(client.java:723)
at omero.gateway.Gateway.createSession(Gateway.java:1054)
at omero.gateway.Gateway.connect(Gateway.java:259)
at org.openmicroscopy.shoola.env.data.OMEROGateway.connect(OMEROGateway.java:1422)
at org.openmicroscopy.shoola.env.data.DataServicesFactory.connect(DataServicesFactory.java:479)
at org.openmicroscopy.shoola.env.data.login.LoginServiceImpl.attempt(LoginServiceImpl.java:144)
at org.openmicroscopy.shoola.env.data.login.LoginServiceImpl.login(LoginServiceImpl.java:277)
at org.openmicroscopy.shoola.env.data.login.LoginManager.login(LoginManager.java:98)
at org.openmicroscopy.shoola.env.init.SplashScreenInit.onEnd(SplashScreenInit.java:157)
at org.openmicroscopy.shoola.env.init.Initializer.notifyEnd(Initializer.java:188)
at org.openmicroscopy.shoola.env.Container.startupInPluginMode(Container.java:558)
at org.openmicroscopy.shoola.MainIJPlugin.run(MainIJPlugin.java:296)
at ij.IJ.runUserPlugIn(IJ.java:235)
at ij.IJ.runPlugIn(IJ.java:198)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at sun.security.ssl.Handshaker.activate(Handshaker.java:509)
at sun.security.ssl.SSLEngineImpl.kickstartHandshake(SSLEngineImpl.java:714)
at sun.security.ssl.SSLEngineImpl.beginHandshake(SSLEngineImpl.java:741)
at IceSSL.SSLEngine.createSSLEngine(SSLEngine.java:856)
at IceSSL.Instance.createSSLEngine(Instance.java:42)
at IceSSL.ConnectorI.connect(ConnectorI.java:30)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.nextConnector(OutgoingConnectionFactory.java:1101)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.access$100(OutgoingConnectionFactory.java:868)
at IceInternal.OutgoingConnectionFactory.getConnection(OutgoingConnectionFactory.java:569)
at IceInternal.OutgoingConnectionFactory.access$800(OutgoingConnectionFactory.java:14)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.getConnection(OutgoingConnectionFactory.java:1048)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.connectors(OutgoingConnectionFactory.java:932)
at IceInternal.EndpointHostResolver.resolve(EndpointHostResolver.java:52)
at IceInternal.ProtocolInstance.resolve(ProtocolInstance.java:104)
at IceInternal.IPEndpointI.connectors_async(IPEndpointI.java:120)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.nextEndpoint(OutgoingConnectionFactory.java:1030)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.getConnectors(OutgoingConnectionFactory.java:1020)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.access$000(OutgoingConnectionFactory.java:868)
at IceInternal.OutgoingConnectionFactory.create(OutgoingConnectionFactory.java:224)
at IceInternal.RoutableReference.createConnection(RoutableReference.java:831)
at IceInternal.RoutableReference.getConnectionNoRouterInfo(RoutableReference.java:557)
at IceInternal.RoutableReference.getConnection(RoutableReference.java:548)
at IceInternal.RequestHandlerFactory.getRequestHandler(RequestHandlerFactory.java:73)
at IceInternal.RoutableReference.getRequestHandler(RoutableReference.java:502)
at Ice.ObjectPrxHelperBase.__getRequestHandler(ObjectPrxHelperBase.java:2686)
at IceInternal.ProxyOutgoingAsyncBase.invokeImpl(ProxyOutgoingAsyncBase.java:203)
at IceInternal.OutgoingAsync.invoke(OutgoingAsync.java:182)
at Ice.ObjectPrxHelperBase.begin_ice_isA(ObjectPrxHelperBase.java:288)
… 23 more
Failed to log onto OMERO.
Reason: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
OMERO address: 10.224.1.143
User Name: luser – Password: **********************
Ice.SecurityException
reason = “IceSSL: handshake error”
at IceInternal.AsyncResultI.__wait(AsyncResultI.java:276)
at Ice.ObjectPrxHelperBase.end_ice_isA(ObjectPrxHelperBase.java:310)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:92)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:69)
at Ice.ObjectPrxHelperBase.checkedCastImpl(ObjectPrxHelperBase.java:2810)
at Ice.ObjectPrxHelperBase.checkedCastImpl(ObjectPrxHelperBase.java:2770)
at Glacier2.RouterPrxHelper.checkedCast(RouterPrxHelper.java:1787)
at omero.client.getRouter(client.java:802)
at omero.client.createSession(client.java:723)
at omero.gateway.Gateway.createSession(Gateway.java:1054)
at omero.gateway.Gateway.connect(Gateway.java:259)
at org.openmicroscopy.shoola.env.data.OMEROGateway.connect(OMEROGateway.java:1422)
at org.openmicroscopy.shoola.env.data.DataServicesFactory.connect(DataServicesFactory.java:479)
at org.openmicroscopy.shoola.env.data.login.LoginServiceImpl.attempt(LoginServiceImpl.java:144)
at org.openmicroscopy.shoola.env.data.login.LoginServiceImpl.login(LoginServiceImpl.java:277)
at org.openmicroscopy.shoola.env.data.login.LoginManager.login(LoginManager.java:98)
at org.openmicroscopy.shoola.env.init.SplashScreenInit.onEnd(SplashScreenInit.java:157)
at org.openmicroscopy.shoola.env.init.Initializer.notifyEnd(Initializer.java:188)
at org.openmicroscopy.shoola.env.Container.startupInPluginMode(Container.java:558)
at org.openmicroscopy.shoola.MainIJPlugin.run(MainIJPlugin.java:296)
at ij.IJ.runUserPlugIn(IJ.java:235)
at ij.IJ.runPlugIn(IJ.java:198)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at sun.security.ssl.Handshaker.activate(Handshaker.java:509)
at sun.security.ssl.SSLEngineImpl.kickstartHandshake(SSLEngineImpl.java:714)
at sun.security.ssl.SSLEngineImpl.beginHandshake(SSLEngineImpl.java:741)
at IceSSL.SSLEngine.createSSLEngine(SSLEngine.java:856)
at IceSSL.Instance.createSSLEngine(Instance.java:42)
at IceSSL.ConnectorI.connect(ConnectorI.java:30)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.nextConnector(OutgoingConnectionFactory.java:1101)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.access$100(OutgoingConnectionFactory.java:868)
at IceInternal.OutgoingConnectionFactory.getConnection(OutgoingConnectionFactory.java:569)
at IceInternal.OutgoingConnectionFactory.access$800(OutgoingConnectionFactory.java:14)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.getConnection(OutgoingConnectionFactory.java:1048)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.connectors(OutgoingConnectionFactory.java:932)
at IceInternal.EndpointHostResolver.resolve(EndpointHostResolver.java:52)
at IceInternal.ProtocolInstance.resolve(ProtocolInstance.java:104)
at IceInternal.IPEndpointI.connectors_async(IPEndpointI.java:120)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.nextEndpoint(OutgoingConnectionFactory.java:1030)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.getConnectors(OutgoingConnectionFactory.java:1020)
at IceInternal.OutgoingConnectionFactory$ConnectCallback.access$000(OutgoingConnectionFactory.java:868)
at IceInternal.OutgoingConnectionFactory.create(OutgoingConnectionFactory.java:224)
at IceInternal.RoutableReference.createConnection(RoutableReference.java:831)
at IceInternal.RoutableReference.getConnectionNoRouterInfo(RoutableReference.java:557)
at IceInternal.RoutableReference.getConnection(RoutableReference.java:548)
at IceInternal.RequestHandlerFactory.getRequestHandler(RequestHandlerFactory.java:73)
at IceInternal.RoutableReference.getRequestHandler(RoutableReference.java:502)
at Ice.ObjectPrxHelperBase.__getRequestHandler(ObjectPrxHelperBase.java:2686)
at IceInternal.ProxyOutgoingAsyncBase.invokeImpl(ProxyOutgoingAsyncBase.java:203)
at IceInternal.OutgoingAsync.invoke(OutgoingAsync.java:182)
at Ice.ObjectPrxHelperBase.begin_ice_isA(ObjectPrxHelperBase.java:288)
… 23 more
Exception in thread “Connect to OMERO”

Thanks for the additional information. That’s strange that you get the SSL error only with the IJ plugin but not with Insight. The SSL error usually happens when there’s no SSL certificate setup on the server side. Your OMERO admin could use GitHub - ome/omero-certificates: OMERO server certificate management plugin to do that. This should solve the problem.
Kind Regards,
Dominik

Thanks a lot. I’ll pass that on. Best, John

Hi Dominik,

I was able to install that plugin, but unfortunately it didn’t clear up the problem. Looking at my server I can do this:

$ omero certificates --help
usage: /opt/omero/OMERO.venv.py36/bin/omero certificates [-h] [–verbose]

OMERO server certificate management

Creates self-signed certificates and adds IceSSL configuration properties to
the OMERO.server configuration to enable use of the certificates.

The OMERODIR environment variable must be set to the location of OMERO.server.

OMERO configuration properties

omero.glacier2.IceSSL.DefaultDir: The directory for storing certificates,
defaults to {omero.data.dir}/certs

The remaining properties should only be modified by advanced users. If you do
not know what these are leave them unchanged.

omero.certificates.commonname: The certificate subject CommonName
omero.certificates.owner: The certificate subject excluding CommonName
omero.certificates.key: Name of the key file
omero.glacier2.IceSSL.CertFile: PKCS12 file name
omero.glacier2.IceSSL.CAs: Certificate file name
omero.glacier2.IceSSL.Password: PKCS12 password
omero.glacier2.IceSSL.Ciphers: IceSSL ciphers
omero.glacier2.IceSSL.ProtocolVersionMax: Maximum SSL/TLS protocol
omero.glacier2.IceSSL.Protocols: SSL/TLS protocols

////// If I try to log on to omero thru imagej I still get the same errors as above:

Failed to log onto OMERO.
Reason: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
OMERO address: 10.224.1.143
User Name: luser – Password: **********************
Ice.SecurityException
reason = “IceSSL: handshake error”
at IceInternal.AsyncResultI.__wait(AsyncResultI.java:276)

etc…

I’ve verified again that the same credentials work to open the omero.insight tool to log on to omero.

thanks again for your time, John

Hi John,
I have to admit I’m running out of ideas. Does this also happen with a complete fresh Fiji and the plugin? Maybe even try the “no JRE” variant. By the way, at least having setup omero-certificates isn’t a wasted effort, it will prevent potential SSL issues with Insight or scripts in future.
Kind Regards,
Dominik

I tried a fresh download of fiji with the newest plugin from ome and it works now. I thought I had the latest version fiji by looking at the version number, but I guess not. Thanks for your help! -John

1 Like

That’s good news! There must have been something in your previous Fiji installation then which messed with SSL, maybe a jar from another plugin or an older bundled Java.
Regards,
Dominik