We're Hiring!

Upgrade Database

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Upgrade Database

Postby Lipplab » Wed Mar 23, 2016 3:34 pm

Dear all,

I've updated with homebrew our omero server from 5.1.4 to 5.2.2 on a MacOS 10.10 system.

I wanted to upgrade the database but it failed.
The error message is:
ome-www:bin benjaminS$ psql -h localhost -U omeroDBuser omeroDB < sql/psql/OMERO5.2__1/OMERO5.1__0.sql
-bash: sql/psql/OMERO5.2__1/OMERO5.1__0.sql: No such file or directory

I've checked the files, they 're not missing.
the brew info gives me
Code: Select all
ome-www:omero benjaminS$ brew info omero
ome/alt/omero: stable 5.2.2
http://www.openmicroscopy.org/site/products/omero
/usr/local/Cellar/omero/omero_distold (6,655 files, 750.7M)
  Built from source
/usr/local/Cellar/omero/omero_old_5_1_4 (8,083 files, 862.2M)
  Built from source
/usr/local/Cellar/omero/omerodistold_5_0_0 (7,621 files, 2.4G)
  Built from source
/usr/local/Cellar/omero/omerodistold_5_0_1 (6,650 files, 1.7G)
  Built from source
/usr/local/Cellar/omero/omerodistold_5_0_2 (6,667 files, 5.4G)
  Built from source
/usr/local/Cellar/omero/5.2.2 (3,789 files, 225.3M) *
  Built from source
From: https://github.com/ome/homebrew-alt/blob/master/Formula/omero.rb
==> Dependencies
Build: pkg-config ✔
Required: hdf5 ✔, jpeg ✔, zeroc-ice35 ✔
Recommended: ccache ✔, mplayer ✔
Optional: nginx ✘
==> Options
--with-cpp
   Build OmeroCpp libraries.
--with-nginx
   Build with nginx support
--without-ccache
   Build without ccache support
--without-mplayer
   Build without mplayer support
==> Caveats

For non-homebrew Python, you need to set your PYTHONPATH:
export PYTHONPATH=/usr/local/Cellar/omero/5.2.2/lib/python:$PYTHONPATH

To finish the installation, execute omero_python_deps in your
shell:
  ./usr/local/Cellar/omero/5.2.2/bin/omero_python_deps


the Blitz-log gives me the message to upgrade my database
Code: Select all
Caused by: ome.conditions.InternalException:
***************************************************************************************
DB version (OMERO5.1__1) does not match omero.properties (OMERO5.2__0). Please apply a db upgrade.
See http://www.openmicroscopy.org/site/support/omero5.2/sysadmins/server-upgrade.html
***************************************************************************************

   at ome.services.util.DBPatchCheck.start(DBPatchCheck.java:71) ~[server.jar:na]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_55]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_55]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_55]
   at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_55]
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1527) ~[spring-beans.jar:3.0.1.RELEASE]
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1468) ~[spring-beans.jar:3.0.1.RELEASE]
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1400) ~[spring-beans.jar:3.0.1.RELEASE]
   ... 67 common frames omitted
ome-www:log benjaminS$ psql -h localhost -U omeroDBuser omeroDB < sql/psql/OMERO5.2__0/OMERO5.1__1
-bash: sql/psql/OMERO5.2__0/OMERO5.1__1: No such file or directory
ome-www:log benjaminS$ psql -h localhost -U omeroDBuser omeroDB < sql/psql/OMERO5.2__0/OMERO5.1__1.sql
-bash: sql/psql/OMERO5.2__0/OMERO5.1__1.sql: No such file or directory
ome-www:log benjaminS$ psql -h localhost -U omeroDBuser omeroDB < sql/psql/OMERO5.1__1/OMERO5.0__0.sql


Could it be that there're some read/write problems?
I thought to find a solution without pg_restore

Thanks Julia
Lipplab
 
Posts: 54
Joined: Thu Sep 12, 2013 9:56 am

Re: Upgrade Database

Postby sbesson » Wed Mar 23, 2016 3:54 pm

Hi Julia,

the database upgrade did not happen because you need to either run the psql command from the main server directory or pass the full path to the upgrade script e.g.:

Code: Select all
psql -h localhost -U omeroDBuser omeroDB < /usr/local/Cellar/omero/5.2.2/sql/psql/OMERO5.2__1/OMERO5.1__0.sql


Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Upgrade Database

Postby Lipplab » Thu Mar 24, 2016 8:28 am

Dear Sebastien,

Thanks a lot. The server is running on 5.2.2.
I'm sorry. Sometimes it is such a stupid thing.

Have a nice day ;)
Lipplab
 
Posts: 54
Joined: Thu Sep 12, 2013 9:56 am

Re: Upgrade Database

Postby sbesson » Thu Mar 24, 2016 9:07 am

No worries,

glad to hear the upgrade went well and the server is now running.

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest