Page 5 of 5

Re: Problems with upgrading 5.1.2 to 5.2

PostPosted: Thu Nov 12, 2015 10:34 am
by atarkowska
Hi Philippe,

What is exactly not working, did you test nginx without omero config, do you see welcome page?

If for some reason you cannot install nginx then your only option is to upgrade apache to 2.4 and then you will be able to
Code: Select all
yum install mod_wsgi

Ola

Re: Problems with upgrading 5.1.2 to 5.2

PostPosted: Thu Nov 12, 2015 11:44 am
by phm
atarkowska wrote:Hi Philippe,

What is exactly not working, did you test nginx without omero config, do you see welcome page?

If for some reason you cannot install nginx then your only option is to upgrade apache to 2.4 and then you will be able to
Code: Select all
yum install mod_wsgi

Ola

Hi Ola,

Nginx is working on localhost without omero.conf.
http://127.0.0.1/
Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

It's seems that nginx do not read the omero.conf "correctly"
https//127.0.0.1/omero
no connexion

the nginx access.log
Code: Select all
tail /var/log/nginx/access.log
127.0.0.1 - - [12/Nov/2015:12:28:36 +0100] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" "-"
127.0.0.1 - - [12/Nov/2015:12:28:36 +0100] "GET /favicon.ico HTTP/1.1" 200 1128 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" "-"
127.0.0.1 - - [12/Nov/2015:12:46:11 +0100] "GET /omero HTTP/1.1" 404 168 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" "-"
[root@omero omero]# tail /var/log/nginx/error.log
2015/11/12 12:46:11 [error] 32108#0: *1 open() "/usr/share/nginx/html/omero" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /omero HTTP/1.1", host: "127.0.0.1"


tail /opt/OMERO.server/var/log/OMEROweb.log

2015-11-12 08:49:12,558 WARNI [ py.warnings] (proc.26666) <module>:9 /opt/OMERO.server/lib/python/pipeline/utils.py:11: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils import importlib

2015-11-12 11:32:02,391 WARNI [ py.warnings] (proc.31834) <module>:9 /opt/OMERO.server/lib/python/pipeline/utils.py:11: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils import importlib

2015-11-12 11:37:22,870 WARNI [ py.warnings] (proc.32025) <module>:9 /opt/OMERO.server/lib/python/pipeline/utils.py:11: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils import importlib


However, the server listen at 80 not 4080 in omero.conf
Code: Select all
more /etc/nginx/conf.d/omero.conf
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;
    }

}


Philippe

Re: Problems with upgrading 5.1.2 to 5.2

PostPosted: Thu Nov 12, 2015 12:18 pm
by phm
Hi Ola,

The nginx error.log comes from http:// request and I have nothing in access.log or erroe.log for https:// request ???


Philippe

Re: Problems with upgrading 5.1.2 to 5.2

PostPosted: Thu Nov 12, 2015 1:57 pm
by atarkowska
Hi Philippe,

I am sorry for all troubles you are facing with 5.2 upgrade. IF your server has multiple host, you need to bind your host name

Code: Select all
server {
    listen 80;
    server_name omero.college-de-france.fr;
...


Your config allows to listen only on port 80 (http). If you wish to use ssl you need to allow listen on 443. This is only an example, please refer to nginx doc https://www.nginx.com/resources/wiki/:

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


server {
    listen               80 default;
    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;

    ssl                 on;
    ssl_certificate    /etc/cert/...
    ssl_certificate_key   /etc/cert/...
    ssl_protocols ...
    (...and some other ssl params...)

    sendfile on;
    client_max_body_size 0;

    ...
}


I hope it will work now ;-)

Ola

Re: Problems with upgrading 5.1.2 to 5.2

PostPosted: Thu Nov 12, 2015 2:16 pm
by phm
atarkowska wrote:Hi Philippe,

I am sorry for all troubles you are facing with 5.2 upgrade. IF your server has multiple host, you need to bind your host name

Code: Select all
server {
    listen 80;
    server_name omero.college-de-france.fr;
...


Your config allows to listen only on port 80 (http). If you wish to use ssl you need to allow listen on 443. This is only an example, please refer to nginx doc https://www.nginx.com/resources/wiki/:

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


server {
    listen               80 default;
    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;

    ssl                 on;
    ssl_certificate    /etc/cert/...
    ssl_certificate_key   /etc/cert/...
    ssl_protocols ...
    (...and some other ssl params...)

    sendfile on;
    client_max_body_size 0;

    ...
}


I hope it will work now ;-)

Ola


Hi Ola,

Thanks for the infos, now omero web is working !!!
Thanks a lot
PS I was trying to install apache 2.4 ...... :(
Philippe

Re: Problems with upgrading 5.1.2 to 5.2

PostPosted: Thu Nov 12, 2015 2:24 pm
by atarkowska
I am glade is running now.

Ola