Page 1 of 3

Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Tue Sep 29, 2015 1:15 pm
by Lipplab
Hello guys,
I tried to upgrade my omero server with the brew option .
It didn't work out really. I couldn't update my database.
I want to know if it is possible to go back and restart the installation?

What I did:
I stopped omero with omero admin stop, than dumped my omero database, mv omero5.0.2 to omero5.0.2old.
I run brew doctor which said that i have to update Xcode ext.
I updated Xcode ext.
Next I run brew update, brew upgrade.

The folder 5.1.3 is missing in the omero folder path use/local/Cellar/omero.
It is located in the gmp folder.
I'm not able to update the omerodatabase, because the the file is not found.
I don't know what are the next steps?
What should I do know?


ome-www:local benjaminS$ psql -h localhost -U omeroDBuser omeroDB <sql/psql/OMERO5.1_1/OMERO5.0_0.sql
-bash: sql/psql/OMERO5.1_1/OMERO5.0_0.sql: No such file or directory

my database looks like this now:
ome-www:5.1.3 benjaminS$ psql -l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+-------------+----------+-------------+-------------+-------------------------
omeroDB | omeroDBuser | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 |
postgres | benjaminS | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 |
template0 | benjaminS | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | =c/benjaminS +
| | | | | benjaminS=CTc/benjaminS
template1 | benjaminS | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | =c/benjaminS +
| | | | | benjaminS=CTc/benjaminS
(4 rows)


ome-www:Cellar benjaminS$ brew info omero
ome/alt/omero: stable 5.1.3
http://www.openmicroscopy.org/site/products/omero
/usr/local/Cellar/omero/omero_distold (6655 files, 766M)
Built from source
/usr/local/Cellar/omero/omerodistold_5_0_0 (7621 files, 2,4G)
Built from source
/usr/local/Cellar/omero/omerodistold_5_0_1 (6650 files, 1,7G)
Built from source
/usr/local/Cellar/omero/omerodistold_5_0_2 (6667 files, 5,4G)
Built from source
From: https://github.com/ome/homebrew-alt/blo ... a/omero.rb
==> Dependencies
Build: pkg-config ✔
Required: hdf5 ✔, jpeg ✔, zeroc-ice35 ✔
Recommended: ccache ✔, mplayer ✔
Optional: nginx ✘
==> Options
--with-cpp
Build OmeroCpp libraries.
--with-ice34
Use Ice 3.4.
--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.1.3/lib/python:$PYTHONPATH

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

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Tue Sep 29, 2015 1:30 pm
by sbesson
Hi,

the upgrade scripts should be bundled with the installed server. Could you try running the following command:

Code: Select all
ome-www:local benjaminS$ psql -h localhost -U omeroDBuser omeroDB < $(brew --prefix omero)/sql/psql/OMERO5.1_1/OMERO5.0_0.sql


and let us know if this works.

Best,
Sebastien

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Tue Sep 29, 2015 1:48 pm
by Lipplab
Hello Sebastien,

Thank you for your fast reply.
I run the command but there is still an error message.

What i also tried to do is to run brew install omero.. because i didn't want to install omero 5.1.4.0.

kind regards
Julia

drwxr-xr-x 3 benjaminS admin 102 5 Feb 2014 man
-rw-r--r-- 1 benjaminS admin 290953 5 Feb 2014 OMERO5.0__0.sql
drwxr-xr-x 6 benjaminS admin 204 5 Feb 2014 var
-rw-r--r-- 1 benjaminS admin 1241 29 Sep 09:48 LICENSE.txt
-rw-r--r-- 1 benjaminS admin 1103 29 Sep 09:48 CONTRIBUTING.md
-rw-r--r-- 1 benjaminS admin 3161 29 Sep 09:48 CODEOFCONDUCT.md
-rw-r--r-- 1 benjaminS admin 23801 29 Sep 09:48 SUPPORTERS.md
-rw-r--r-- 1 benjaminS admin 2134 29 Sep 09:48 README.md
drwxr-xr-x 11 benjaminS admin 374 29 Sep 09:48 Library
drwxr-xr-x 3 benjaminS admin 102 29 Sep 10:03 Frameworks
drwxr-xr-x 34 benjaminS admin 1156 29 Sep 10:36 Cellar
drwxr-xr-x 4 benjaminS admin 136 29 Sep 11:21 etc
drwxr-xr-x 15 benjaminS admin 510 29 Sep 14:55 share
drwxr-xr-x 225 benjaminS admin 7650 29 Sep 14:55 lib
drwxr-xr-x 150 benjaminS admin 5100 29 Sep 14:55 include
drwxr-xr-x 193 benjaminS admin 6562 29 Sep 14:55 bin
drwxr-xr-x 34 benjaminS admin 1156 29 Sep 14:55 opt
ome-www:local benjaminS$ psql -h localhost -U omeroDBuser omeroDB < $(brew --prefix omero)/sql/psql/OMERO5.1_1/OMERO5.0_0.sql
-bash: /usr/local/Cellar/omero/5.1.3/sql/psql/OMERO5.1_1/OMERO5.0_0.sql: No such file or directory
ome-www:local benjaminS$ pwd
/usr/local

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Tue Sep 29, 2015 2:03 pm
by sbesson
Hi Julia,

apologies, you should replace underscores by double underscores in the upgrade command

Code: Select all
psql -h localhost -U omeroDBuser omeroDB < $(brew --prefix omero)/sql/psql/OMERO5.1__1/OMERO5.0__0.sql


Best,
Sebastien

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Tue Sep 29, 2015 2:09 pm
by Lipplab
Hi Sebastien,

same error again.

/usr/local
ome-www:local benjaminS$ psql -h localhost -U omeroDBuser omeroDB < $(brew --prefix omero)/sql/psql/OMERO5.1__1/OMERO5.0__0.sql
-bash: /usr/local/Cellar/omero/5.1.3/sql/psql/OMERO5.1__1/OMERO5.0__0.sql: No such file or directory
ome-www:local benjaminS$

Julia

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Tue Sep 29, 2015 3:34 pm
by sbesson
Hi Julia,

Can you paste the output of:

Code: Select all
$ ls -alh /usr/local/Cellar/omero
$ ls -alh /usr/local/Cellar/omero/5.1.3/


Best,
Sebastien

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Wed Sep 30, 2015 6:56 am
by Lipplab
Hi Sebastien,

the problem is that the folder 5.1.3 is not located in the omero folder...
it is located in the gmp folder.
Maybe i did something wrong. because brew doctor said that isomer files are not correctly linked and i used brew prune to remove bad system links.

i didn't copy the config.xml file yet. Should I move the 5.1.3 folder from bmp to the omero folder copy the config file and reinstall omero with brew reinstall omero?

many thanks
Julia

as normal user the command didn't work, i don't know why but
it is working as a root user

sh-3.2# ls -alh /usr/local/Cellar/gmp
total 0
drwxr-xr-x 4 benjaminS admin 136B 5 Jun 2014 .
drwxr-xr-x 34 benjaminS admin 1,1K 29 Sep 10:36 ..
drwxr-xr-x 10 benjaminS admin 340B 4 Feb 2014 5.1.3
drwxr-xr-x 11 benjaminS admin 374B 5 Jun 2014 6.0.0a
sh-3.2# ls -alh /usr/local/Cellar/omero
total 6045136
drwxr-xr-x 14 benjaminS admin 476B 29 Sep 13:40 .
drwxr-xr-x 34 benjaminS admin 1,1K 29 Sep 10:36 ..
-rw-r--r--@ 1 benjaminS admin 6,0K 10 Jun 2014 .DS_Store
-rw-r--r-- 1 benjaminS admin 193M 22 Apr 2014 omero500to501.dump
-rw-r--r-- 1 benjaminS admin 299M 5 Jun 2014 omeroDBdump05june2014.dump
-rw-r--r-- 1 benjaminS admin 452M 14 Dez 2014 omeroDBdump14dez2014
-rw-r--r-- 1 benjaminS admin 452M 14 Dez 2014 omeroDBdump14dez2014.dump
-rw-r--r-- 1 benjaminS admin 313M 24 Jun 2014 omeroDBdump24june2014.dump
-rw-r--r-- 1 benjaminS admin 622M 25 Sep 15:12 omeroDBdump25sep2015.dump
-rw-r--r-- 1 benjaminS admin 622M 29 Sep 08:53 omeroDBdump29sep2015.dump
drwxr-xr-x 12 benjaminS admin 408B 5 Feb 2014 omero_distold
drwxr-xr-x 12 benjaminS admin 408B 26 Mär 2014 omerodistold_5_0_0
drwxr-xr-x 13 benjaminS admin 442B 5 Jun 2014 omerodistold_5_0_1
drwxr-xr-x 13 benjaminS admin 442B 10 Jun 2014 omerodistold_5_0_2
sh-3.2# ls -alh /usr/local/Cellar/gmp/5.1.3
total 2184
drwxr-xr-x 10 benjaminS admin 340B 4 Feb 2014 .
drwxr-xr-x 4 benjaminS admin 136B 5 Jun 2014 ..
-rw-r--r-- 1 benjaminS admin 2,8K 30 Sep 2013 AUTHORS
-rw-r--r-- 1 benjaminS admin 34K 30 Sep 2013 COPYING
-rw-r--r-- 1 benjaminS admin 1,0M 30 Sep 2013 ChangeLog
-rw-r--r-- 1 benjaminS admin 241B 4 Feb 2014 INSTALL_RECEIPT.json
-rw-r--r-- 1 benjaminS admin 30K 30 Sep 2013 NEWS
-rw-r--r-- 1 benjaminS admin 3,9K 30 Sep 2013 README
drwxr-xr-x 4 benjaminS admin 136B 5 Dez 2013 include
drwxr-xr-x 8 benjaminS admin 272B 5 Dez 2013 lib
sh-3.2#

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Wed Sep 30, 2015 9:04 am
by sbesson
Hi Julia,

looking at your directory listing the 5.1.3 folder under `/usr/local/Cellar/gmp` is not OMERO 5.1.3 but rather gmp 5.1.3. This likely means OMERO 5.1.3 is not installed at all in your Homebrew Cellar so you will have to install (or upgrade) it.

In terms of Homebrew workflow, I do not thing you need to manuallt move or rename any folder under `Cellar`. If a new formula is expected `brew upgrade` should minimally install the new version of the formula and update the symlinks under /usr/local/bin. Old formulas are only cleaned up if you call `brew cleanup`. Additionally, renaming folders under Cellar might have other unexpected side-effects on the Homebrew side.

I would expect the following workflow to allow an upgrade of Homebrew-installed OMERO (tested locally on a 5.1.3 OMERO):

Code: Select all
sbesson@ls30630:~ $ /usr/local/bin/omero admin start
Creating directory /usr/local/Cellar/omero/5.1.3/var
Creating /usr/local/Cellar/omero/5.1.3/var/master
Initializing /usr/local/Cellar/omero/5.1.3/var/log
Creating /usr/local/Cellar/omero/5.1.3/var/registry
No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit
sbesson@ls30630:~ $ /usr/local/bin/omero admin stop
Waiting on shutdown. Use CTRL-C to exit
.sbesson@ls30630:~ $ brew upgrade omero
==> Upgrading 1 outdated package, with result:
ome/alt/omero 5.1.4
==> Upgrading ome/alt/omero
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading http://downloads.openmicroscopy.org/omero/5.1.4/artifacts/openmicroscopy-5.1.4.zip
...
==> Summary
🍺  /usr/local/Cellar/omero/5.1.4: 6753 files, 230M, built in 6.2 minutes
sbesson@ls30630:~ $ cp /usr/local/Cellar/omero/5.1.3/etc/grid/config.xml /usr/local/Cellar/omero/5.1.4/etc/grid
sbesson@ls30630:~ $ /usr/local/bin/omero admin start
Creating directory /usr/local/Cellar/omero/5.1.4/var
Creating /usr/local/Cellar/omero/5.1.4/var/master
Initializing /usr/local/Cellar/omero/5.1.4/var/log
Creating /usr/local/Cellar/omero/5.1.4/var/registry
No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit
sbesson@ls30630:~ $


Could you try this workflow including the PSQL database upgrade step before copying the configuration file and let us know if this works?

Best,
Sebastien

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Wed Sep 30, 2015 12:55 pm
by Lipplab
Hey Sebastien,

till now brew upgrade omero, it is working. But I'm sorry.. is it bad to copy the configuration file before the upgrading of the database?
I'm sorry.. I aborted the upgrading of the database, because it took a little bit.
Should I reinstall omero and try it again?

Thanks Julia

It looked like this:

bash-3.2$ psql -h localhost -U omeroDBuser omeroDB < $(brew --prefix omero)/sql/psql/OMERO5.1__1/OMERO5.0__0.sql
BEGIN
CREATE FUNCTION
omero_assert_db_version
-------------------------

(1 row)

DROP FUNCTION
CREATE FUNCTION
assert_db_server_prerequisites
--------------------------------

(1 row)

DROP FUNCTION
INSERT 0 1
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
CREATE FUNCTION
upgrade_import_logs
---------------------

(1 row)

DROP FUNCTION
CREATE FUNCTION
CREATE DOMAIN
CREATE DOMAIN
CREATE DOMAIN
CREATE DOMAIN
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
UPDATE 1965
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE

Re: Upgrade from 5.0.2 to 5.1.3 with home-brew faild

PostPosted: Wed Sep 30, 2015 2:29 pm
by sbesson
Hi Julia,

no the exact order between both steps does not matter. The only important thing is to have both the configuration file copied and the database upgraded before the upgraded server is started.

At first glance, your database upgrade output looks good. How big is the database dump? For large databases, this step can easily takes a few hours.

Best,
Sebastien