[ome-devel] Problem when setting omero.data.dir in omero.properties file

Josh Moore josh at glencoesoftware.com
Thu Aug 30 07:27:58 BST 2012


On Aug 29, 2012, at 5:07 PM, Luca Lianas wrote:

> Hi Josh,
> 
> just to be clear, even if I'm building the server from the source code
> downloaded from the git repository, I still have to use the 'omero config'
> system in order to set up the omero.data.dir variable?
> If so, why can I update all the other variables and even add new ones by
> changing the etc/omero.properties file skipping the 'omero config' system?
> 
> Right now I noticed a strange behaviour...
> I created the /OMERO directory in order to start the server even if in my
> etc/omero.properties I set the omero.data.dir variable to
> /opt/omero_4.4/data (I wanted to check the value of the omero.data.dir
> using the python API).
> After the server started, the FullText directory was created under the
> /opt/omero_4.4/data/ directory not the /OMERO/ one.
> In summary, after a build from scratch using the source code, server won't
> start if I don't create the /OMERO directory or don't use the 'omero
> config' to set up a new omero.data.dir (FATAL: OMERO directory does not
> exist: /OMERO), but if I create the /OMERO dir the server uses the
> directory specified as the omero.data.dir into the etc/omero.properties
> file.... This IS weird :)

Ah, now I understand what you're saying. So, the reason is: `bin/omero config` is Python-based. Reading defaults from etc/omero.properties is Java-based. I'd prefer not to make `bin/omero admin` also call Java, so perhaps the most straight-forward option is to mention in etc/omero.properties that omero.data.dir is NOT settable via .properties. Or I can hard-code those values in Ice, then we'll have them available in every language. Hmmm....that will take some more consideration. I filed a ticket[1] and CC'd you. Thanks for pointing this out!

~J.

> Thanks,
> Luca

[1] https://trac.openmicroscopy.org.uk/ome/ticket/9562


> 2012/8/29 Josh Moore <josh at glencoesoftware.com>
> 
>> 
>> On Aug 29, 2012, at 3:21 PM, Luca Lianas wrote:
>> 
>>> Hi everyone,
>>> 
>>> since OMERO version  4.3, I can't set the omero.data.dir parameter using
>>> the omero.properties file.
>> 
>> Correct. etc/omero.properties only shows the defaults and is mostly for
>> documentation. It gets copied into blitz.jar (for the version number) but
>> otherwise is overwritten by the `omero config` system.
>> 
>> Cheers,
>> ~Josh.
>> 
>>> Even if I change the value of this variable, when the server starts it
>>> looks for the default /OMERO directory in the file system.
>>> 
>>> In  my omero.properties file I have
>>> 
>>> ...
>>> omero.data.dir=/opt/omero_4.4/data/
>>> ...
>>> 
>>> but when I run
>>> 
>>> ./dist/bin/omero admin start
>>> 
>>> I get
>>> ...
>>> FATAL: OMERO directory does not exist: /OMERO
>>> 
>>> and when looking at the omero.properties file into the generated
>> blitz.jar
>>> I find
>>> 
>>> ...
>>> omero.data.dir=/opt/omero_4.4/data/
>>> ...
>>> (and this is weird...)
>>> 
>>> of course, using the
>>> 
>>> ./dist/bin/omero config set omero.data.dir /opt/omero_4.4/data/
>>> 
>>> fixes the problem.
>>> 
>>> It seems that the only parameter affected by this problem is the
>>> omero.data.dir, I never experienced problems with DB config parameters
>> and
>>> other variables in the omero.properties file (I also added some new vars
>>> and everything was fine).
>> 
>>> Luca
>> 
>> 
> 
> 
> -- 
> Luca Lianas
> Data Fusion - Healthcare Flows
> CRS4 - Centro di Ricerche, Sviluppo e Studi Superiori della Sardegna
> POLARIS, Edificio 1, 09010 PULA (CA - Italy)
> 
> 
> Phone: 070/9250266
> Email: luca.lianas at crs4.it
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel



More information about the ome-devel mailing list