Page 1 of 1

Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and css

PostPosted: Thu Jan 07, 2016 5:47 pm
by xkunes
There is no images and css on omero web pages (Not Found:...).
If I turn ON the debug mode, than it is working.

Even the "setenforce 0" dos not help. Could it be a directory restrictions, nginx wrong setting or a wrong setting of omero.web.static_url?

(because the: setsebool -P httpd_read_user_content 1, setsebool -P httpd_enable_homedirs 1 - didn't helps.)

It is after upgrade on Centos 6 with python 2.7, Django 1.8, NGINX, gunicorn. According to the manual.
(nginx.log is OK)

OMEROweb.log:
Code: Select all
2016-01-07 17:31:48,292  INFO [                omeroweb.webclient.views] (proc.11521) <module>():104 INIT '11521'
2016-01-07 17:31:48,429 WARNI [                          django.request] (proc.11521) get_response():170 Not Found: /static/webgateway/css/reset.css
2016-01-07 17:31:48,430 WARNI [                 omeroweb.feedback.views] (proc.11521) handler404():185 Not Found: /static/webgateway/css/reset.css
2016-01-07 17:31:48,442 WARNI [                          django.request] (proc.11521) get_response():170 Not Found: /static/webclient/css/dusty.css
.....
2016-01-07 17:32:46,375 WARNI [                 omeroweb.feedback.views] (proc.11514) handler404():185 Not Found: /static/webgateway/img/OME_logo_grey_110.png


bin/omero config get:
Code: Select all
omero.data.dir=/home/omero/OMERODATA
omero.db.name=omero_database
omero.db.pass=********
omero.db.user=db_user
omero.web.application_server=wsgi-tcp
omero.web.application_server.port=4080
omero.web.debug=false
omero.web.static_url=/static/


NGINX is set according the manula (it is testing installetion):
Code: Select all
upstream omeroweb {
    server localhost:4080 fail_timeout=0;
}

server {
    listen 80;
    server_name $hostname;
    sendfile on;
    client_max_body_size 0;

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

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

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

    location / {
        error_page 502 @maintenance;
        # checks for static file, if not found proxy to app
        try_files $uri @proxy_to_app;
    }

}


bin/omero admin diagnostics:
Code: Select all
================================================================================
OMERO Diagnostics 5.2.1-ice35-b15                                               
================================================================================
                                                                               
Commands:   java -version                  1.8.0     (/usr/bin/java)           
Commands:   python -V                      2.7.11    (/home/omero/omeroenv/bin/python -- 2 others)                                                                                           
Commands:   icegridnode --version          3.5.1     (/opt/Ice-3.5.1/bin/icegridnode -- 2 others)                                                                                             
Commands:   icegridadmin --version         3.5.1     (/opt/Ice-3.5.1/bin/icegridadmin -- 2 others)                                                                                           
Commands:   psql --version                 8.4.20    (/usr/bin/psql)                           

Server:     icegridnode                    running
Server:     Blitz-0                        active (pid = 10337, enabled)
Server:     DropBox                        active (pid = 10359, enabled)
Server:     FileServer                     active (pid = 10349, enabled)
Server:     Indexer-0                      active (pid = 10357, enabled)
Server:     MonitorServer                  active (pid = 10354, enabled)
Server:     OMERO.Glacier2                 active (pid = 10352, enabled)
Server:     OMERO.IceStorm                 active (pid = 10361, enabled)
Server:     PixelData-0                    active (pid = 10365, enabled)
Server:     Processor-0                    active (pid = 10368, enabled)
Server:     Tables-0                       inactive (disabled)         
Server:     TestDropBox                    inactive (enabled)           

Log dir:    /home/omero/OMERO.server-5.2.1-ice35-b15/var/log exists
Log files:  Blitz-0.log                    4.0 MB        errors=147  warnings=815
Log files:  DropBox.log                    16.0 KB       errors=0    warnings=6   
Log files:  FileServer.log                 2.0 KB                                 
Log files:  Indexer-0.log                  287.0 KB      errors=52   warnings=819
Log files:  MonitorServer.log              9.0 KB                                 
Log files:  OMEROweb.lock                  0.0 KB                                 
Log files:  OMEROweb.log                   560.0 KB      errors=2    warnings=1636
Log files:  OMEROweb_brokenrequest.lock    0.0 KB                                 
Log files:  OMEROweb_brokenrequest.log     147.0 KB      errors=0    warnings=801
Log files:  PixelData-0.log                279.0 KB      errors=39   warnings=812
Log files:  Processor-0.log                411.0 KB      errors=112  warnings=5
Log files:  Tables-0.log                   n/a
Log files:  TestDropBox.log                n/a
Log files:  master.err                     3.0 KB        errors=7    warnings=9
Log files:  master.out                     0.0 KB
Log files:  Total size                     6.71 MB


Environment:OMERO_HOME=(unset)
Environment:OMERO_NODE=(unset)
Environment:OMERO_MASTER=(unset)
Environment:OMERO_USERDIR=(unset)
Environment:OMERO_TMPDIR=(unset)
Environment:PATH=/opt/Ice-3.5.1/bin:/home/omero/omeroenv/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
Environment:PYTHONPATH=/opt/Ice-3.5.1/python:
Environment:ICE_HOME=(unset)
Environment:LD_LIBRARY_PATH=(unset)
Environment:DYLD_LIBRARY_PATH=(unset)

OMERO SSL port:4064
OMERO TCP port:4063
OMERO data dir:'/home/omero/OMERODATA'        Exists? True      Is writable? True
OMERO temp dir:'/home/omero/omero/tmp'        Exists? True      Is writable? True   (Size: 0)

JVM settings: Blitz-${index}                -Xmx602m -XX:MaxPermSize=512m -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Indexer-${index}              -Xmx401m -XX:MaxPermSize=512m -XX:+IgnoreUnrecognizedVMOptions
JVM settings: PixelData-${index}            -Xmx602m -XX:MaxPermSize=512m -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Repository-${index}           -Xmx401m -XX:MaxPermSize=512m -XX:+IgnoreUnrecognizedVMOptions

OMERO.web status... [RUNNING] (PID 11508)
Django version: 1.8.8

Thanks for a help!!

Re: Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and cs

PostPosted: Thu Jan 07, 2016 5:56 pm
by atarkowska
Hi,

Could show me the output of:
Code: Select all
ps aux | grep django.pid
bin/omero web status


Could you also check what nginx access log says about statics? What permissions are on /home/omero/OMERO.server/lib/python/omeroweb/static?

Ola

Re: Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and cs

PostPosted: Tue Jan 12, 2016 10:42 am
by xkunes
ps aux | grep django.pid
Code: Select all
omero     2777  0.0  0.3 205820 11892 ?        S    11:27   0:00 /home/omero/omeroenv/bin/python2.7 /home/omero/omeroenv/bin/gunicorn -D -p /home/omero/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero     2793  1.0  2.0 326044 79772 ?        S    11:27   0:01 /home/omero/omeroenv/bin/python2.7 /home/omero/omeroenv/bin/gunicorn -D -p /home/omero/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero     2794  1.1  2.0 326348 79968 ?        S    11:27   0:01 /home/omero/omeroenv/bin/python2.7 /home/omero/omeroenv/bin/gunicorn -D -p /home/omero/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero     2795  1.0  2.0 326060 79792 ?        S    11:27   0:01 /home/omero/omeroenv/bin/python2.7 /home/omero/omeroenv/bin/gunicorn -D -p /home/omero/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero     2796  1.0  2.0 326340 79876 ?        S    11:27   0:01 /home/omero/omeroenv/bin/python2.7 /home/omero/omeroenv/bin/gunicorn -D -p /home/omero/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
omero     2797  1.1  2.0 326436 80072 ?        S    11:27   0:01 /home/omero/omeroenv/bin/python2.7 /home/omero/omeroenv/bin/gunicorn -D -p /home/omero/OMERO.server/var/django.pid --bind 127.0.0.1:4080 --workers 5 --worker-connections 1000 --max-requests 0 omeroweb.wsgi:application
root      3509  0.0  0.0 103312   904 pts/1    S+   11:29   0:00 grep django.pi


bin/omero web status
Code: Select all
OMERO.web status... [RUNNING] (PID 2777)


/home/omero/OMERO.server/lib/python/omeroweb/static:
(I have added the nginx groupe access)
ls -l:
Code: Select all
drwxrwxr-x. 7 omero nginx  4096 Jan 12 11:27 static


There is no error at the nginx access log (/var/log/nginx/access.log), just an info:
Code: Select all
127.0.0.1 - - [12/Jan/2016:11:28:32 +0100] "GET /favicon.ico HTTP/1.1" 404 168 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" "-"

Re: Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and cs

PostPosted: Tue Jan 12, 2016 10:59 am
by atarkowska
Hi,

I don't see any obvious configure issues in your setup, did you checked permission on all patent directories? You may try
Code: Select all
chmod -R a+X /home/omero/
then restart OMERO and OMERO.web

Ola

Re: Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and cs

PostPosted: Tue Jan 12, 2016 11:32 am
by xkunes
Hi,
no change :-/.

I am to not able to find any error too :-/, it is working only at the debug mode.

Re: Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and cs

PostPosted: Tue Jan 12, 2016 11:40 am
by atarkowska
Which url you are accessing? Are you testing through the domain binded to your nginx http://your_host/webclient or upstream app directly http://localhost:4080/webclient. You won't ever seen statics if you directly access dynamic content served from upstream up (gunicorn). Your request has to go through nginx. That will be logged in nginx access log.

Ola

Re: Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and cs

PostPosted: Tue Jan 12, 2016 12:09 pm
by xkunes
OK,
it seams that this will be the problem :-/.

I am using the localhost:4080, because the localhost/webclient/ dos not work (error 404) now, and I do not understand how the new nginx configuration has to work. (I am not so familiar with the nginx configuration.)

Specially if I need to have the server at https, and a wiki running there too. :-/

I have to check the nginx configuration.

Re: Upgrade to 5.2.1 from 5.1 on Centos 6 - no images and cs

PostPosted: Tue Jan 12, 2016 12:33 pm
by xkunes
I have found the problem with the nginx configuration ... a standard ngnix configuration file default.conf has been enabled, and I didn't mentioned it.

I am not using this file name now, and the file has been enabled during the update.

Now is the localhost/webclient address working and the omero server web is working too ;-).


Thanks a lot for the help.

Michal