[ome-devel] How to migrate OMERO.figure

Douglas Russell douglas.russell at bioch.ox.ac.uk
Wed Nov 26 14:12:20 GMT 2014


Ok, I see the problem which I would consider a bug as I would not expect
different behaviour in these two cases.

Check this out:

Run `$OMERO_PREFIX/bin/omero web config apache`

Results: OMERO.server is used in paths.

Run `cd $OMERO_PREFIX && bin/omero web config apache`

Results: OMERO.server-5.0.5-blabla is used in paths.

Personally I have $OMERO_PREFIX/bin added to my local path so I would
always just do the following, so I've never seen this behaviour before.

`omero web config apache`

Cheers,

Douglas



On 26 November 2014 at 14:02, Christophe TREFOIS <christophe.trefois at uni.lu>
wrote:

>  Hi Doug,
>
>   0 [15:00:36] omerou at lcsbomero(uni,DomU) localadmin> echo $OMERO_PREFIX
>  /var/lib/apps/OMERO/OMERO.server
>
>  and OMERO.server is a symlink to the actual version.
>
>  However, when running bin/omero web config apache from within
> OMERO.server the result contains the actual path, not the symlink.
>
>  eg
>
>  cd $OMERO_PREFIX
> bin/omero web config apache
>
>  output contains OMERO.server-5.0.5-blabla rather than OMERO.server.
>
>  Did we miss something here?
>
>  Best,
>
>
>  On 26 Nov 2014, at 14:38, Douglas Russell <douglas.russell at bioch.ox.ac.uk>
> wrote:
>
>  Hi Chris,
>
>  Looking at what happened, I think maybe you are using an OMERO_PREFIX
> (or possibly OMERO_HOME) that points to the specific server directory (OMERO.server-5.0.6-blalba)
> rather than the symlink OMERO.server. Might want to check that to avoid
> being bitten again later.
>
>  Cheers,
>
>  Douglas
>
> On 26 November 2014 at 11:55, Christophe TREFOIS <
> christophe.trefois at uni.lu> wrote:
>
>> Hi Will,
>>
>>  Thank you! It turns out that when you do bin/omero web config apache
>> from OMERO.server he will generate using the target folder, e.g.
>> OMERO.server-5.0.6-blalba and not OMERO.server. For small updates I had not
>> deemed necessary to re-create the web config file for apache. So in fact,
>> we were running 5.0.6 core on 5.0.5 web files which could not work
>> obviously.
>>
>>  I have now replaced all special instances in the apache conf with
>> OMERO.server which should then always take the new files instead.
>>
>>  Consequently, csrf is loaded now and Figure works again!
>>
>>  Looking forward to new updates soon :)
>>
>>  Kind Regards,
>>
>>>>  Christophe
>>
>>  On 25 Nov 2014, at 18:00, William Moore <will at lifesci.dundee.ac.uk>
>> wrote:
>>
>>  Hi Christophe,
>>
>>   I don't know why the ome.csrf.js is returning a 404.
>> Presumably the rest of your OMERO 5.0.6 web client is working OK? If so,
>> this should
>> all be using the same ome.csrf.js from the same location.
>>
>>  Can you confirm that the rest of your OMERO.web 5.0.6 is working OK?
>> Can you access the file directly at
>>  <your-server>/static/webgateway/js/ome.csrf.js ?
>>
>>  E.g.
>> http://trout.openmicroscopy.org/merge/static/webgateway/js/ome.csrf.js
>>
>>  Can you check the header of your OMERO.figure html page and see if the
>> csrf.js script url
>> matches the url in the header of your other OMERO.web pages?
>>
>>  You should see these two lines together in all the pages:
>>
>>  <script type="text/javascript"
>> src="/static/3rdparty/jquery-1.7.2.js"></script>
>> <script type="text/javascript"
>> src="/static/webgateway/js/ome.csrf.js"></script>
>>
>>   Hopefully you can figure out why this is failing to load in
>> OMERO.figure.
>>
>>   Regards,
>>
>>    Will.
>>
>>
>>
>>  On 25 Nov 2014, at 16:30, Christophe TREFOIS <christophe.trefois at uni.lu>
>> wrote:
>>
>>  Hi Will,
>>
>>  You are correct. I get a 403 Denied error, and upon further inspection
>> I get a 404 on ome.csrf.js.
>>
>>  I guess I am missing that file, but I’m not sure why…
>>
>>  Could you elucidate?
>>
>>  Thank you,
>>
>>>> Christophe
>>
>>
>>   On 18 Nov 2014, at 17:41, William Moore <will at lifesci.dundee.ac.uk>
>> wrote:
>>
>>  Hi Christophe,
>>
>>   It sounds like POST requests were failing, possibly due to the upgrade
>> to 5.0.6 where the server now protects against csrf attacks.
>>
>>  It may be that OMERO.figure was not adding the csrf token to these
>> POSTs.
>> Is it possible that the OMERO.figure page was not refreshed after
>> upgrading OMERO?
>> This would mean that the required ome.csrf.js Javascript file wouldn't
>> have been loaded.
>> Or maybe something else is failing here.
>>
>>  I'm afraid there's no real error handling for the AJAX calls within
>> OMERO.figure yet, but
>> you may be able to get more details from the browser console.
>> I don't know what browser you're on, but all modern browsers will have
>> some developer tools
>> that allow you to see AJAX or other errors, usually under the Console or
>> Network tabs.
>> You can see response codes, error messages etc.
>>
>>  If you have an opportunity to try the upgrade again sometime, hopefully
>> a full refresh of the page
>> will fix the issue, or if not then let us know if you can get any more
>> error info.
>>
>>   Thanks,
>>
>>     Will.
>>
>>
>>
>>  On 18 Nov 2014, at 16:19, Christophe TREFOIS <christophe.trefois at uni.lu>
>> wrote:
>>
>>   Hi Will,
>>
>>  What happened was that when I click Export PDF, nothing happened. There
>> were also no activities in the main OMEROweb.
>>  Further, when clicking “Save”, nothing happened at all, eg nothing was
>> saved.
>>
>>  I quickly returned to 5.0.5 then, as this is our prod env and I did not
>> want to leave it “not working” for a longer while.
>>
>>  Also, do you have any instructions on putting the plugin centrally?
>> How about the export to pdf.py, is it also possible to put it in a central
>> place?
>>  Is this a valid approach for all plugins? If there is a dev doc I have
>> overseen, please forgive J
>>
>>  Thank you for your help,
>>
>>  --
>>  Christophe
>>
>>   *From:* William Moore [mailto:will at lifesci.dundee.ac.uk]
>> *Sent:* mardi 18 novembre 2014 00:11
>> *To:* Christophe TREFOIS
>> *Cc:* ome-devel at lists.openmicroscopy.org.uk
>> *Subject:* Re: [ome-devel] How to migrate OMERO.figure
>>
>>  Hi Christophe,
>>
>>    How does the PDF generation fail?
>>
>>   If the "Export PDF" button is enabled then the script has been found.
>>   If you click this but the blue 'Download' button never appears, you
>> can go to the main webclient
>>   and click on the 'Activities' button (beside the top-right search
>> field) to see more
>>   details on all scripts.
>>
>>
>>   You may prefer to put the /figure app in a separate location, in any
>> directory that's on your $PYTHONPATH
>>   then you won't have to move it on each OMERO upgrade.
>>
>>   Anyway, let me know if you have any more details on what's failing,
>>
>>    Cheers,
>>
>>      Will.
>>
>>
>>
>>   On 17 Nov 2014, at 22:34, Christophe TREFOIS <christophe.trefois at uni.lu>
>> wrote:
>>
>>
>>   Dear Will,
>>
>>   Do you know how to properly migrate OMERO.figure from 5.0.5 – 5.0.6 ?
>>
>>   It seems I copied over content from lib/python/omeroweb/figure and
>> re-imported the .py script.
>>
>>   Yet, I can’t seem to save or to generate PDFs any Figure in 5.0.6 then.
>>
>>   Reverting back 5.0.5 seems to work.
>>
>>   Any suggestions?
>>
>>   Kind Regards,
>>
>>   --
>>   Christophe
>>  _______________________________________________
>> ome-devel mailing list
>> ome-devel at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ome-devel mailing list
>> ome-devel at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20141126/2a015fdf/attachment-0001.html>


More information about the ome-devel mailing list