We're Hiring!

Problems with upgrading 5.1.2 to 5.2

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: Problems with upgrading 5.1.2 to 5.2

Postby phm » Fri Nov 06, 2015 4:17 pm

atarkowska wrote:Philippe, Do you have nginx available for you? it does not need to be on the same box.

Ola


Yes I have nginx 1.8.0-1 installed.

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

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Fri Nov 06, 2015 4:26 pm

Would you like to try http://www.openmicroscopy.org/site/supp ... nginx.html ? Just make sure gunicorn is instilled in python 2.7

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Fri Nov 06, 2015 4:41 pm

atarkowska wrote:Would you like to try http://www.openmicroscopy.org/site/supp ... nginx.html ? Just make sure gunicorn is instilled in python 2.7

Ola


Hi Ola,

I did the nginx configuration for omero, gunicorn is in python 2.7
I stopped apache
Then start nginx
Code: Select all

/etc/init.d/nginx start
Démarrage de nginx :                                       [  OK  ]

set wsgi_tcp for omero web
Code: Select all
omero config set omero.web.application_server wsgi-tcp

setup omero.conf web for nginx
Code: Select all
omero web config nginx > omero.conf

more /etc/nginx/conf.d/omero.conf
Code: Select all
upstream omeroweb_omero {
    server 127.0.0.1:4080 fail_timeout=0;
}

server {
    listen 80;
    server_name $hostname;

    sendfile on;
    client_max_body_size 0;

    # 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_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;
server {
    listen 80;
    server_name $hostname;

    sendfile on;
    client_max_body_size 0;

    # 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_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;
    }

}

When I try to connect to the server :
Code: Select all
Page Web inaccessible

ERR_CONNECTION_REFUSED


But I can connect to other services of the web server, Webmin for example.

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

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Sat Nov 07, 2015 12:17 am

Hi Philippe,
Did you notice the duplicates in omero.conf?
There is server defined twice, second ovewrote part of the last bit of location.

According to the order of commands above, did you reloaded/restarted nginx after applying omero config? If there were duplicates I have an impression that omero.conf hasn't been loaded.

Once you clean it up and still cannot connect, could you give output of
Code: Select all
ps aux | grep gunicorn
and attach nginx logs and OMEROweb.log, please?

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Mon Nov 09, 2015 9:26 am

atarkowska wrote:Hi Philippe,
Did you notice the duplicates in omero.conf?
There is server defined twice, second ovewrote part of the last bit of location.

Hi Ola,
The duplicates come from a bad copy paste
According to the order of commands above, did you reloaded/restarted nginx after applying omero config? If there were duplicates I have an impression that omero.conf hasn't been loaded.

Once you clean it up and still cannot connect, could you give output of
Code: Select all
ps aux | grep gunicorn
and attach nginx logs and OMEROweb.log, please?

Ola


Code: Select all
ps aux | grep gunicorn
root      2847  0.0  0.0 103324   900 pts/0    S+   10:20   0:00 grep gunicorn
omero    31497  0.0  0.0 203764 11036 ?        S    Nov06   0:36 /opt/rh/python27/root/usr/bin/python2 /opt/rh/python27/root/usr/bin/gunicorn -D -p /opt/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero    31502  0.0  0.2 306456 72616 ?        S    Nov06   0:05 /opt/rh/python27/root/usr/bin/python2 /opt/rh/python27/root/usr/bin/gunicorn -D -p /opt/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero    31503  0.0  0.2 306464 72616 ?        S    Nov06   0:04 /opt/rh/python27/root/usr/bin/python2 /opt/rh/python27/root/usr/bin/gunicorn -D -p /opt/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero    31508  0.0  0.2 306456 72636 ?        S    Nov06   0:04 /opt/rh/python27/root/usr/bin/python2 /opt/rh/python27/root/usr/bin/gunicorn -D -p /opt/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero    31513  0.0  0.2 306468 72628 ?        S    Nov06   0:04 /opt/rh/python27/root/usr/bin/python2 /opt/rh/python27/root/usr/bin/gunicorn -D -p /opt/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero    31518  0.0  0.2 306476 72624 ?        S    Nov06   0:04 /opt/rh/python27/root/usr/bin/python2 /opt/rh/python27/root/usr/bin/gunicorn -D -p /opt/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application

The nginx error log is empty, however the owner is adm ???
Code: Select all
ls -l /var/log/nginx/
total 4
-rw-------. 1 nginx root   0 16 avril  2015 access.log
-rw-r-----. 1 nginx adm    0  7 nov.  03:33 error.log
-rw-------. 1 root  root 530  6 nov.  17:28 error.log-20151107

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

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Mon Nov 09, 2015 10:34 am

Hi Phillipe,

Gunicorn processes looks fine. Is nginx actually running?

Could you restart nginx and past output of

Code: Select all
curl -IL http://hostname


did anything appear in nginx logs?

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Mon Nov 09, 2015 11:28 am

atarkowska wrote:Hi Phillipe,

Gunicorn processes looks fine. Is nginx actually running?

Could you restart nginx and past output of

Code: Select all
curl -IL http://hostname


did anything appear in nginx logs?

Ola

Hi Ola,
Code: Select all
/etc/init.d/nginx restart
Arrêt de nginx :                                           [  OK  ]
Démarrage de nginx :                                       [  OK  ]

Code: Select all
curl -IL http://omero.college-de-france.fr
HTTP/1.1 404 Not Found
Server: nginx/1.8.0
Date: Mon, 09 Nov 2015 11:24:38 GMT
Content-Type: text/html
Content-Length: 168
Connection: keep-alive

However, other web applications as Webmin or Dell Open Manage are working. It seems that the omero web configuration is not correct.

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

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Mon Nov 09, 2015 11:39 am

Could you show me the output of

Code: Select all
curl -IL http://omero.college-de-france.fr/omero


is there really nothing in the log?

are your Webmin or Dell Open Manage deployed using nginx or they were originally deployed with apache?

could you show me the header of Webmin response? Just curl -IL http://Webmin_url ?

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Problems with upgrading 5.1.2 to 5.2

Postby phm » Mon Nov 09, 2015 11:45 am

manics wrote:Yes, it sounds like an invalid config. Could you paste the output of
Code: Select all
omero config get --hide-password


Thanks, Simon

Hi Simon,
Code: Select all
omero config get
omero.data.dir=/OMERO
omero.db.name=omero_database
omero.db.pass=OmErO@2014!
omero.db.user=db_omero
omero.jvmcfg.percent.blitz=20
omero.jvmcfg.system_memory=32000
omero.mail.config=true
omero.mail.host=smtp.college-de-france.fr
omero.mail.password=LiSaSaM2000
omero.mail.port=25
omero.mail.username=philippe.mailly@college-de-france.fr
omero.web.admins=[["Philippe Mailly", "philippe.mailly@college-de-france.fr"]]
omero.web.application_server=wsgi-tcp
omero.web.apps=["figure"]
omero.web.debug=False
omero.web.login_logo=/omero/static/webclient/image/logo_CIRB.jpg
omero.web.prefix=/omero
omero.web.public.enabled=False
omero.web.session_cookie_age=86400
omero.web.session_expire_at_browser_close=True
omero.web.static_url=/omero/static/
omero.web.ui.top_links=[["Data", "webindex", {"title": "Browse Data via Projects, Tags etc"}], ["History", "history", {"title": "History"}], ["Help", "http://help.openmicroscopy.org/", {"target": "new", "title": "Open OMERO user guide in a new tab"}], ["Figure", "figure_index", {"title": "Fast figures from your OMERO images"}]]
[omero@omero ~]$ omero config get --hide-password
omero.data.dir=/OMERO
omero.db.name=omero_database
omero.db.pass=********
omero.db.user=db_omero
omero.jvmcfg.percent.blitz=20
omero.jvmcfg.system_memory=32000
omero.mail.config=true
omero.mail.host=smtp.college-de-france.fr
omero.mail.password=********
omero.mail.port=25
omero.mail.username=philippe.mailly@college-de-france.fr
omero.web.admins=[["Philippe Mailly", "philippe.mailly@college-de-france.fr"]]
omero.web.application_server=wsgi-tcp
omero.web.apps=["figure"]
omero.web.debug=False
omero.web.login_logo=/omero/static/webclient/image/logo_CIRB.jpg
omero.web.prefix=/omero
omero.web.public.enabled=False
omero.web.session_cookie_age=86400
omero.web.session_expire_at_browser_close=True
omero.web.static_url=/omero/static/
omero.web.ui.top_links=[["Data", "webindex", {"title": "Browse Data via Projects, Tags etc"}], ["History", "history", {"title": "History"}], ["Help", "http://help.openmicroscopy.org/", {"target": "new", "title": "Open OMERO user guide in a new tab"}], ["Figure", "figure_index", {"title": "Fast figures from your OMERO images"}]]

May be it come from that
Code: Select all
ls -l /etc/nginx/conf.d
total 20
-rw-r--r--. 1 root  root  1097 21 avril  2015 default.conf
-rw-r--r--. 1 root  root  1138 24 oct.   2014 default.conf.disabled
-rw-r--r--. 1 root  root  1097  5 août   2014 default.conf.org
-rw-r--r--. 1 root  root   427 21 avril  2015 example_ssl.conf
-rw-rw-r--. 1 omero omero  897  6 nov.  17:23 omero.conf

Then I change the rights
Code: Select all
chown root:root /etc/nginx/conf.d/omero.conf
[root@omero omero]# chmod g-w /etc/nginx/conf.d/omero.conf
[root@omero omero]# ls -l /etc/nginx/conf.d
total 20
-rw-r--r--. 1 root root 1097 21 avril  2015 default.conf
-rw-r--r--. 1 root root 1138 24 oct.   2014 default.conf.disabled
-rw-r--r--. 1 root root 1097  5 août   2014 default.conf.org
-rw-r--r--. 1 root root  427 21 avril  2015 example_ssl.conf
-rw-r--r--. 1 root root  897  6 nov.  17:23 omero.conf
[root@omero omero]# /etc/init.d/nginx restart
Arrêt de nginx :                                           [  OK  ]
Démarrage de nginx :                                       [  OK  ]
[root@omero omero]# more /var/log/nginx/error.log
2015/11/09 12:24:38 [error] 8038#0: *1 "/etc/nginx/html/index.html" is not found (2: No such file or directory), client: 192.168.188.21, server: omero.college-
de-france.fr, request: "HEAD / HTTP/1.1", host: "omero.college-de-france.fr"

ERR_CONNECTION_REFUSED
And
Code: Select all
ls /etc/nginx/html
ls: impossible d'accéder à /etc/nginx/html: Aucun fichier ou dossier de ce type


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

Re: Problems with upgrading 5.1.2 to 5.2

Postby atarkowska » Mon Nov 09, 2015 1:09 pm

Hi Phillipe, I think you responded to Simon's question from Thursday
Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

PreviousNext

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 2 guests

cron