Omero Figure export, gives the error IceSSL: unable to set ciphers using `HIGH:ADH:@SECLEVEL=0'

OMERO.server and OMERO.web are installed in an Ubuntu 18.04, using the installation guide for 5.5.1 version.
Everything works as expected but the pluging OMERO.figure gives an error when trying to export a figure.
The error is as follows:

Traceback (most recent call last):
  File "/opt/omero/web/OMERO.web/lib/python/omeroweb/webclient/views.py", line 4382, in run_script
    sId, inputMap, None, conn.SERVICE_OPTS)
  File "/opt/omero/web/OMERO.web/lib/python/omero/gateway/__init__.py", line 4703, in __call__
    return self.handle_exception(e, *args, **kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omeroweb/webclient/webclient_gateway.py", line 2127, in handle_exception
    e, *args, **kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omero/gateway/__init__.py", line 4700, in __call__
    return self.f(*args, **kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omero_api_IScript_ice.py", line 935, in runScript
    return _M_omero.api.IScript._op_runScript.invoke(self, ((scriptID, inputs, waitSecs), _ctx))
InternalException: exception ::omero::InternalException
{
    serverStackTrace = Traceback (most recent call last):
  File "/home/omero/OMERO.server/lib/python/omero/util/decorators.py", line 68, in exc_handler
    rv = func(*args, **kwargs)
  File "/home/omero/OMERO.server/lib/python/omero/processor.py", line 907, in parseJob
    client = self.user_client("OMERO.parseJob")
  File "/home/omero/OMERO.server/lib/python/omero/processor.py", line 790, in user_client
    client = omero.client(args)
  File "/home/omero/OMERO.server/lib/python/omero/__init__.py", line 67, in client
    return omero.clients.BaseClient(*args, **kwargs)
  File "/home/omero/OMERO.server/lib/python/omero/clients.py", line 152, in __init__
    self._initData(id)
  File "/home/omero/OMERO.server/lib/python/omero/clients.py", line 278, in _initData
    self.__ic = Ice.initialize(id)
  File "/usr/local/lib/python2.7/dist-packages/Ice.py", line 705, in initialize
    communicator = IcePy.Communicator(args, data)
PluginInitializationException: exception ::Ice::PluginInitializationException
{
    reason = IceSSL: unable to set ciphers using `HIGH:ADH:@SECLEVEL=0':
invalid command
}

    serverExceptionClass = 
    message = Internal exception
}

I assume that it has something to do with @SECLEVEL and SSL issues.
OMERO.server diagnostics:


================================================================================
OMERO Diagnostics (admin) 5.5.1-ice36-b122
================================================================================
        
Commands:   java -version                  1.8.0     (/usr/bin/java)
Commands:   python -V                      2.7.15    (/usr/bin/python)
Commands:   icegridnode --version          3.6.4     (/opt/Ice-3.6.4/bin/icegridnode -- 2 others)
Commands:   icegridadmin --version         3.6.4     (/opt/Ice-3.6.4/bin/icegridadmin -- 2 others)
Commands:   psql --version                 11.4      (/usr/bin/psql)
Commands:   openssl version                1.1.111   (/usr/bin/openssl)

Server:     icegridnode                    running
Server:     Blitz-0                        active (pid = 19611, enabled)
Server:     DropBox                        inactive (disabled)
Server:     FileServer                     active (pid = 19632, enabled)
Server:     Indexer-0                      active (pid = 19633, enabled)
Server:     MonitorServer                  active (pid = 19635, enabled)
Server:     OMERO.Glacier2                 active (pid = 19636, enabled)
Server:     OMERO.IceStorm                 active (pid = 19638, enabled)
Server:     PixelData-0                    active (pid = 19648, enabled)
Server:     Processor-0                    active (pid = 19650, enabled)
Server:     Tables-0                       active (pid = 19665, enabled)
Server:     TestDropBox                    inactive (enabled)

Log dir:    /home/omero/OMERO.server/var/log exists
Log files:  Blitz-0.log                    144.0 MB      errors=412  warnings=2626
Log files:  DropBox.log                    18.0 KB       errors=34   warnings=0   
Log files:  FileServer.log                 5.0 KB       
Log files:  Indexer-0.log                  118.0 KB      errors=5    warnings=44  
Log files:  MonitorServer.log              5.0 KB       
Log files:  PixelData-0.log                625.0 KB      errors=79   warnings=160 
Log files:  Processor-0.log                392.0 KB      errors=0    warnings=357 
Log files:  Tables-0.log                   29.0 KB       errors=0    warnings=11  
Log files:  TestDropBox.log                n/a
Log files:  master.err                     2.0 MB        errors=0    warnings=18  
Log files:  master.out                     empty
Log files:  Total size                     148.37 MB


Environment:OMERO_HOME=(unset)             
Environment:OMERO_NODE=(unset)             
Environment:OMERO_MASTER=(unset)           
Environment:OMERO_USERDIR=(unset)          
Environment:OMERO_TMPDIR=(unset)           
Environment:PATH=/home/omero/bin:/home/omero/.local/bin:/opt/Ice-3.6.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 
Environment:PYTHONPATH=(unset)             
Environment:ICE_HOME=/opt/Ice-3.6.4        
Environment:LD_LIBRARY_PATH=(unset)        
Environment:DYLD_LIBRARY_PATH=/opt/Ice-3.6.4/lib 

OMERO SSL port:4064                           
OMERO TCP port:4063                           
OMERO data dir:'/omero'                       Exists? True	Is writable? True
OMERO temp dir:'/home/omero/omero/tmp'        Exists? True	Is writable? True   (Size: 0)

JVM settings: Blitz-${index}                -Xmx5048m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Indexer-${index}              -Xmx3365m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: PixelData-${index}            -Xmx5048m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Repository-${index}           -Xmx3365m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions

OMERO.web diagnostics:

================================================================================
OMERO Diagnostics (web) 5.5.1-ice36-b122
================================================================================
        
OMERO.web status... [RUNNING] (PID 18705)
Django version: 1.8.19

Log dir:    /home/omero/OMERO.py/var/log   exists
Log file :  OMEROweb.log                   5.0 MB        errors=86   warnings=125 

Error on Blitz-0.log:

2019-07-11 15:18:52,171 ERROR [     ome.services.blitz.util.ParamsCache] (1-thread-3) Failed to load params for 17
omero.InternalException: null
        at sun.reflect.GeneratedConstructorAccessor186.newInstance(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_212]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_212]
        at java.lang.Class.newInstance(Class.java:442) ~[na:1.8.0_212]
        at IceInternal.BasicStream.createUserException(BasicStream.java:2779) ~[ice.jar:na]
        at IceInternal.BasicStream.access$300(BasicStream.java:14) ~[ice.jar:na]
        at IceInternal.BasicStream$EncapsDecoder11.throwException(BasicStream.java:3614) ~[ice.jar:na]
        at IceInternal.BasicStream.throwException(BasicStream.java:2291) ~[ice.jar:na]
        at IceInternal.OutgoingAsync.throwUserException(OutgoingAsync.java:399) ~[ice.jar:na]
        at omero.grid.InteractiveProcessorPrxHelper.end_params(InteractiveProcessorPrxHelper.java:874) ~[omero-blitz.jar:5.5.3]
        at omero.grid.InteractiveProcessorPrxHelper.params(InteractiveProcessorPrxHelper.java:761) ~[omero-blitz.jar:5.5.3]
        at omero.grid.InteractiveProcessorPrxHelper.params(InteractiveProcessorPrxHelper.java:754) ~[omero-blitz.jar:5.5.3]
        at omero.grid.ParamsHelper.generateScriptParams(ParamsHelper.java:153) ~[omero-blitz.jar:5.5.3]
        at ome.services.blitz.util.ParamsCache$Loader.createParams(ParamsCache.java:304) ~[omero-blitz.jar:5.5.3]
        at ome.services.blitz.util.ParamsCache._load(ParamsCache.java:217) [omero-blitz.jar:5.5.3]
        at ome.services.blitz.util.ParamsCache.lookupAll(ParamsCache.java:181) [omero-blitz.jar:5.5.3]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
        at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:265) [spring-core.jar:4.3.22.RELEASE]
        at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:257) [spring-context-support.jar:4.3.22.RELEASE]
        at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:75) [spring-context-support.jar:4.3.22.RELEASE]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_212]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_212]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]

I am not sure if something is missconfigured or is a problem with the Ciphers.
Thank you.

I wonder if this problem is specific to OMERO.figure or if it’s a more general problem with running scripts (as the error suggests). Can you run any other scripts from the webclient? E.g. select an image and Run scripts (cogs icon in top toolbar) > export scripts > Batch Image Export.
Also, can you run scripts from the OMERO.Insight client?
Regards,
Will.

While trying to run Batch Image Export, I got the same error:

Traceback (most recent call last):

  File "/home/omero/omerowebvenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/home/omero/OMERO.py/lib/python/omeroweb/decorators.py", line 486, in wrapped
    retval = f(request, *args, **kwargs)

  File "/home/omero/OMERO.py/lib/python/omeroweb/decorators.py", line 536, in wrapper
    context = f(request, *args, **kwargs)

  File "/home/omero/OMERO.py/lib/python/omeroweb/webclient/views.py", line 3603, in script_ui
    raise ex

InternalException: exception ::omero::InternalException
{
    serverStackTrace = Traceback (most recent call last):
  File "/home/omero/OMERO.server/lib/python/omero/util/decorators.py", line 68, in exc_handler
    rv = func(*args, **kwargs)
  File "/home/omero/OMERO.server/lib/python/omero/processor.py", line 907, in parseJob
    client = self.user_client("OMERO.parseJob")
  File "/home/omero/OMERO.server/lib/python/omero/processor.py", line 790, in user_client
    client = omero.client(args)
  File "/home/omero/OMERO.server/lib/python/omero/__init__.py", line 67, in client
    return omero.clients.BaseClient(*args, **kwargs)
  File "/home/omero/OMERO.server/lib/python/omero/clients.py", line 152, in __init__
    self._initData(id)
  File "/home/omero/OMERO.server/lib/python/omero/clients.py", line 278, in _initData
    self.__ic = Ice.initialize(id)
  File "/usr/local/lib/python2.7/dist-packages/Ice.py", line 705, in initialize
    communicator = IcePy.Communicator(args, data)
PluginInitializationException: exception ::Ice::PluginInitializationException
{
    reason = IceSSL: unable to set ciphers using `HIGH:ADH:@SECLEVEL=0':
invalid command
}

    serverExceptionClass = 
    message = Internal exception
}

OK, so changing the line 219 in OMERO.server/lib/python/omero/clients.py:

-self._optSetProp(id, prop, "HIGH:ADH:@SECLEVEL=0")
+elf._optSetProp(id, prop, " `ADH:!LOW:!MD5:!EXP:!3DES:@STRENGTH`")

according to here: https://doc.zeroc.com/ice/3.7/property-reference/icessl#id-.IceSSL.*v3.7-IceSSL.Ciphers
Although I am using ice 3.6.4.
After a a server restart everything works now.

Interesting, I tried installing OMERO.server-5.5.1-ice36-b122 on an Ubuntu 18.04.2 LTS system and it’s running scripts fine for me, including batch export. The OpenSSL version is 1.1.1 like yours and I set omero.glacier2.IceSSL.Ciphers to HIGH:ADH:@SECLEVEL=0 as at https://docs.openmicroscopy.org/omero/5.5.1/sysadmins/unix/server-ubuntu1804-ice36.html#patching-omero-server and https://docs.openmicroscopy.org/omero/5.5.1/sysadmins/troubleshooting.html#openssl-version. I wonder why you had to adjust code directly.