We're Hiring!

Omero don't start after upgrade

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.

Re: Omero don't start after upgrade

Postby kennethgillen » Thu Dec 14, 2017 2:36 pm

Hi Philippe,

I notice you've configured OMERO to the `/omero` folder at the NGINX level, but don't see a corresponding `omero.web.prefix` entry in your OMERO.py/bin/omero config get output.

Since I can see from the NGINX error log: OMERO.web requesting the default `/static/webgateway/` for statics, referred from the configured-at-NGINX `/omero/webclient` of your webclient.

Search for "Prefix" at https://docs.openmicroscopy.org/omero/5 ... l-web.html

Did you forget to migrate this config from the older version of OMERO.py?

After you (re?) apply those 2x config settings, you'll need to restart OMERO.web.

Let us know how you get on with that.

Best,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Omero don't start after upgrade

Postby phm » Thu Dec 14, 2017 4:02 pm

kennethgillen wrote:Hi Philippe,

I notice you've configured OMERO to the `/omero` folder at the NGINX level, but don't see a corresponding `omero.web.prefix` entry in your OMERO.py/bin/omero config get output.

Since I can see from the NGINX error log: OMERO.web requesting the default `/static/webgateway/` for statics, referred from the configured-at-NGINX `/omero/webclient` of your webclient.

Search for "Prefix" at https://docs.openmicroscopy.org/omero/5 ... l-web.html

Did you forget to migrate this config from the older version of OMERO.py?

After you (re?) apply those 2x config settings, you'll need to restart OMERO.web.

Let us know how you get on with that.

Best,

Kenny

Hi Kenny,
I changed the prefix as you mentioned. However, it didn't solve the problem.
Code: Select all
omero@omero:~$>OMERO.py/bin/omero config get
omero.web.application_server=wsgi-tcp
omero.web.prefix=/omero
omero.web.static_url=/omero/static/


I recover my old omero nginx config file, because in the omero.py generated there is no mention about https connexion??
My old working config file is :

Code: Select all
upstream omeroweb_omero {
    server 127.0.0.1:4080 fail_timeout=0;
}

server {
    listen 80;
    server_name omero.college-de-france.fr;
    rewrite   ^ https://$server_name$request_uri? permanent;
}

server {

    listen              443 default ssl;

    server_name         omero.college-de-france.fr;
    keepalive_timeout   70;
    ssl                 on;
    ssl_certificate    /etc/nginx/omero.college-de-france.fr.crt;
    ssl_certificate_key   /etc/nginx/omero.college-de-france.fr.key;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;

    sendfile on;
    client_max_body_size 0;
    send_timeout 60s;

    # maintenance page serve from here
    location @maintenance_omero {
        root /opt/OMERO.server/etc/templates/error;
        try_files $uri /maintainance.html =502;
    }

    # weblitz django apps serve media from here
    location /omero/static {
        alias /opt/OMERO.server/lib/python/omeroweb/static;
    }

    location @proxy_to_app_omero {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://omeroweb_omero;
    }

    location /omero {

        error_page 502 @maintenance_omero;
        # checks for static file, if not found proxy to app
        try_files $uri @proxy_to_app_omero;
    }

}


But when I try to start the nginx server I got this message :

Code: Select all
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
omero@omero:~$>systemctl status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since jeu. 2017-12-14 17:01:37 CET; 16s ago
  Process: 14667 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 17138 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
  Process: 17136 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 14669 (code=exited, status=0/SUCCESS)


Do you have any idea ?

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Omero don't start after upgrade

Postby kennethgillen » Thu Dec 14, 2017 4:20 pm

omero.py generated there is no mention about https connexion??


Hi Philippe,

An OMERO.web distribution won't know anything about the custom changes you need to do to your own server's NGINX config, like adding the SSL clauses.

It will only generate the most recent version of working config that we distribute, and you must merge in your own custom changes to that.

That's described at https://docs.openmicroscopy.org/omero/5 ... grade.html

You can test your NGINX config before restarting with
Code: Select all
nginx -t


That will tell you what's wrong with the config.

It would be helpful to see your most recent NGINX logs (access and error) along with the `omero.web/bin/omero config get` output.

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Omero don't start after upgrade

Postby phm » Fri Dec 15, 2017 9:32 am

kennethgillen wrote:
omero.py generated there is no mention about https connexion??


Hi Philippe,

An OMERO.web distribution won't know anything about the custom changes you need to do to your own server's NGINX config, like adding the SSL clauses.

It will only generate the most recent version of working config that we distribute, and you must merge in your own custom changes to that.

That's described at https://docs.openmicroscopy.org/omero/5 ... grade.html

You can test your NGINX config before restarting with
Code: Select all
nginx -t


That will tell you what's wrong with the config.

It would be helpful to see your most recent NGINX logs (access and error) along with the `omero.web/bin/omero config get` output.

Kenny


Hi,
Finally, I success to restart nginx server with a "fresh" config and recover from a backup of omero config file, modify some sentences etc... And now everything is working ouf ....
May be in the future a good thing will be to have a script to do the upgrade :roll:
Thanks a lot for the help

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Omero don't start after upgrade

Postby kennethgillen » Fri Dec 15, 2017 10:21 am

Hi Philippe,

We are very pleased to hear of your success!!

Tips that may help in the future:

* if you make your /etc/nginx/conf.d/ a "git" repository, you can always "git commit" a good version, then "git checkout" the previous working version after making a changes, and e.g. run "git diff" to see what changed when you did make a change to the file.

As you say, a bash script which automates unzipping the new OMERO-distribution, backing up the config files, copying the config files and starting up is a nice thing to have. Especially if you have deployed Web and Server separately.

Before OME started configuring our infrastructure as code (via Ansible), I used a script much like https://gist.github.com/kennethgillen/6 ... 97c040078c - you could potentially base a script for your own deployment around that example.

All the best,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Previous

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest