Page 1 of 1

Omero server not starting

PostPosted: Fri Sep 06, 2013 2:35 pm
by Jon Hemphill
I'm installing Omero on a Windows 7 box, and after configuring all the software, when I start the server (bin\omero admin start) it comes back with the message "Failed to startup some components after 300 seconds".
Code: Select all
C:\OMERO.server>bin\omero admin start
No descriptor given. Using etc\grid\windefault.xml
Installing OMERO.master Windows service.
Successfully installed OMERO.master Windows service.
Starting OMERO.master Windows service.
Waiting on startup. Use CTRL-C to exit
.............................
Failed to startup some components after 300 seconds
Calling "stop" on remaining components
OMERO.master service deleted.
Waiting on shutdown. Use CTRL-C to exit
......


So, I then run the diagnostic (bin\omero admin diagnostics) and I get the following:
Code: Select all
c:\OMERO.server>bin\omero admin diagnostics

================================================================================
OMERO Diagnostics 4.4.8p1-ice34-b304
================================================================================

Commands:   java -version                  1.7.0     (C:\Windows\system32\java.EXE)
Commands:   python -V                      2.6.6     (C:\Python26\python.EXE)
Commands:   icegridnode --version          3.4.2     (C:\Ice-3.4.2\bin\icegridnode.EXE -- 2 others)
Commands:   icegridadmin --version         3.4.2     (C:\Ice-3.4.2\bin\icegridadmin.EXE -- 2 others)
Commands:   psql --version                 9.2.4     (C:\Program Files (x86)\PostgreSQL\9.2\bin\psql.EXE)

Server:     icegridnode                    not started

Cannot list deployed applications.

Log dir:    c:\OMERO.server\var\log        exists

Log files:  Blitz-0.log                    156.0 KB      errors=21   warnings=0
Log files:  DropBox.log                    10.0 KB       errors=14   warnings=7
Log files:  FileServer.log                 2.0 KB
Log files:  Indexer-0.log                  169.0 KB      errors=21   warnings=0
Log files:  MonitorServer.log              2.0 KB
Log files:  OMEROweb.log                   n/a
Log files:  PixelData-0.log                169.0 KB      errors=21   warnings=0
Log files:  Processor-0.log                104.0 KB      errors=28   warnings=56
Log files:  Tables-0.log                   n/a
Log files:  TestDropBox.log                n/a
Log files:  master.err                     0.0 KB
Log files:  master.out                     0.0 KB
Log files:  Total size                     0.62 MB


Environment:OMERO_HOME=(unset)
Environment:OMERO_NODE=(unset)
Environment:OMERO_MASTER=(unset)
Environment:PATH=C:\Python26;C:\Python26\Lib\site-packages\PyQt4;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Lenovo;C:\Python26;C:\Python26\DLLs;C:\
Python26\Scripts;C:\Python26\gnuplot\bin;C:\Python26\Lib\site-packages\vtk;C:\Program Files (x86)\pythonxy\console;C:\Pr
ogram Files (x86)\pythonxy\SciTE-2.26;C:\Program Files (x86)\pythonxy\mingw\bin;C:\Ice-3.4.2\bin;C:\Python26;C:\Python26
\Lib\site-packages\PyQt4;C:\Windows\System32;C:\Ice-3.4.2\bin\x64;C:\Ice-3.4.2\bin;C:\Program Files (x86)\PostgreSQL\9.2
\bin
Environment:ICE_HOME=(unset)
Environment:LD_LIBRARY_PATH=(unset)
Environment:DYLD_LIBRARY_PATH=(unset)

OMERO data dir: 'C:\\OMERO'     Exists? True    Is writable? True
OMERO.web status... [NOT STARTED]


I've been looking through the logs and in the Blitz-0.log file there's a FATAL message about ome.services.util.DBPatchCheck - "Error connecting to the database table dbpatch. You may need to bootstrap. See http://www.openmicroscopy.org/site/supp ... er/upgrade. Looking at the site I'm not able to find out why this is happening.

Does anyone have any suggestions? I've check around the forum with other issues of the server not starting, but nothing was really close to the issue I'm having.

Thanks!

Re: Omero server not starting

PostPosted: Fri Sep 06, 2013 3:29 pm
by kennethgillen
Hi Jon,

Can you double check the database setup script steps from the installation have been followed?

http://www.openmicroscopy.org/site/support/omero4/sysadmins/windows/server-installation.html#installation

I'm sure I've seen this before when the database has been created, but the setup script hasn't been ran.

Best,

Kenny

Re: Omero server not starting

PostPosted: Fri Sep 06, 2013 7:06 pm
by Jon Hemphill
kennethgillen wrote:Can you double check the database setup script steps from the installation have been followed?


I checked the configuration with bin\omero config get and confirmed the details by manually connecting to the database through the psql command and I'm able to get in.

One thing I'm curious about, on the output of the 'config get' it shows the omero.data.dir being C:\\OMERO, shouldn't it be C:\OMERO instead?

I've also ran the db script file and if I remember correctly there were no issues that popped up.

Thanks.

Re: Omero server not starting

PostPosted: Mon Sep 09, 2013 10:44 am
by bpindelski
Hi Jon,

Answering your second question first: it is fine to see \\ in the binary repository path. This way the backslash character is itself "escaped' by another backslash, and so will be treated as a path separator. This is caused by Python - the programming language used in OMERO.server - when handling strings representing file system paths.

Coming back to the missing dbpatch table... To further debug your installation, could you please provide the output of the following commands (executed in the PSQL command prompt as the OMERO DB user):
- select * from dbpatch;
- \l
- \d (this should show you all the tables that OMERO.server uses - around 130, so don't paste them all here).

Was the database in a clean (i.e. no relations) state before scaffolding it with "bin\omero db script"? If there is a previous schema present, the new one can't be applied until the DB is dropped and recreated.

Regards,
Blazej

Re: Omero server not starting

PostPosted: Mon Sep 09, 2013 2:56 pm
by Jon Hemphill
bpindelski wrote:- select * from dbpatch;

Well, this could be a big problem. I'm getting the error "permission denied for relation dbpatch" :(

bpindelski wrote:- \l

Code: Select all
omero_database=> \l
                                                   List of databases
      Name      |  Owner   | Encoding |          Collate           |           Ctype            |   Access privileges
----------------+----------+----------+----------------------------+----------------------------+-----------------------
omero_database | omero    | UTF8     | English_United States.1252 | English_United States.1252 |
postgres       | postgres | UTF8     | English_United States.1252 | English_United States.1252 |
template0      | postgres | UTF8     | English_United States.1252 | English_United States.1252 | =c/postgres          +
                |          |          |                            |                            | postgres=CTc/postgres
template1      | postgres | UTF8     | English_United States.1252 | English_United States.1252 | =c/postgres          +
                |          |          |                            |                            | postgres=CTc/postgres
(4 rows)]


bpindelski wrote:- \d (this should show you all the tables that OMERO.server uses - around 130, so don't paste them all here).

Actually, it shows 230 rows. Here are a few from the top.
Code: Select all
omero_database=> \d
                                List of relations
Schema |                       Name                       |   Type   |  Owner
--------+--------------------------------------------------+----------+----------
public | _lock_ids                                        | table    | postgres
public | _lock_seq                                        | sequence | postgres
public | acquisitionmode                                  | table    | postgres
public | annotation                                       | table    | postgres
public | annotationannotationlink                         | table    | postgres
public | arc                                              | table    | postgres
public | arctype                                          | table    | postgres
public | binning                                          | table    | postgres
public | channel                                          | table    | postgres
public | channelannotationlink                            | table    | postgres
public | channelbinding                                   | table    | postgres
public | codomainmapcontext                               | table    | postgres
public | configuration                                    | table    | postgres
public | contrastmethod                                   | table    | postgres
public | contraststretchingcontext                        | table    | postgres
public | correction                                       | table    | postgres
public | count_annotation_annotationlinks_by_owner        | view     | postgres
public | count_channel_annotationlinks_by_owner           | view     | postgres

Looking through the list, I do find dbpatch, but the owner is postgres. Should that be changed to the OMERO.server owner, (in my case omero)?

bpindelski wrote:Was the database in a clean (i.e. no relations) state before scaffolding it with "bin\omero db script"? If there is a previous schema present, the new one can't be applied until the DB is dropped and recreated.

Yes, this is a clean installation. No other useage for the database other than for the OMERO.server.
I think my big issue could be access to the db.patch. I did some checking and found if I were to use "GRANT ALL PRIVILEGES ON TABLE dbpatch TO omero;" that this could resolve that issue?

Jon Hemphill

Re: Omero server not starting

PostPosted: Mon Sep 09, 2013 6:32 pm
by kennethgillen
Hi Jon,

Many thanks for the detailed feedback and output.

I'd recommend that all OMERO schema object owners are the OMERO Postgres user. In this case, as you point out, the database objects are all owned by the Postgres service user, Postgres, rather than e.g. db_user.

I'd recommend following a course of action similar to the one you suggest, but instead of "Granting All" to one table, I'd recommend changing ownership of all the schema objects to your OMERO postgres user, (in the docs this is db_user).

You mention this is a fresh install I think, so if you've not had this running yet then I'd be tempted to just drop the database and run the database creation again.

You could create a large change script [1], but it's possibly less hassle to start with a fresh DB if you've not used it yet.

It might be that the DB boostrap script was run as the Postgres user rather than the OMERO Postgres user - this could set up the table permissions in that way.

If you're starting with a new DB, a sure-fire way to run the DB bootstrap script as the OMERO postgres user is to manually log in to the SQL Shell as the omero Postgres user, e.g. db_user, then running the script.

When logging into the SQL Shell launched from the Postgres GUI [2]

Code: Select all
Server [localhost]:
Database [postgres]: omero_database
Port [5432]:
Username [postgres]: db_user
Password for user db_user:
Welcome to psql 9.1.4, the PostgreSQL interactive terminal.

Type:  copyright for distribution terms
        h for help with SQL commands
        ? for help with psql commands
        g or terminate with semicolon to execute query
        q to quit



[1] http://stackoverflow.com/questions/1348126/modify-owner-on-all-tables-simultaneously-in-postgresql

[2] http://www.openmicroscopy.org/site/support/omero4/sysadmins/windows/server-installation.html

Please be in touch if that's still not helping.

Best,

Kenny

Re: Omero server not starting

PostPosted: Mon Sep 09, 2013 9:35 pm
by Jon Hemphill
I dropped/deleted the database and created a new one with the postgres as owner. I reconfigured using the postgres logon and I've finally have the OMERO.server running.

Thanks both Kenny and Blazej!!

Jon Hemphill