OMERO.web - intermittent 404 pages

Now I have a new problem. In the browser sometime I get page not found and sometime the page is displayed but I get this message :
Url: /omero/webclient/activities/?_=1569578878631
Resolver404: {u’path’: u’omero/webclient/activities/’, u’tried’: [, [ (None:None) ^(?i)webgateway/>], [ (None:None) ^(?i)webadmin/>], [ (None:None) ^(?i)webclient/>], [ (None:None) ^(?i)url/>], [ (None:None) ^(?i)feedback/>], [ (None:None) ^(?i)api/>], , ]}

It’s it possible that my databse is corruped ???
An other question omero-insight 5.56 is compatible with 5.5.1? when I try to connect to the serveur (5.5.1) with omero-insight (5.5.6) I have login / passsword incorrects?

Philippe

Hi Philippe,

yes, any Insight 5.5.x should be compatible with any 5.5.x server. Could you check the omeroinsight.log (usually in the ‘omero/log’ folder in your home directory) if there are more details about the login failure?

Regards,
Dominik

Hi Dominik,
Solved, the IT dept. blocked port 4064 !
By the way, the web browser part have some strange behaviors. I need to refresh page to get the right display, otherwise I have this message :
Go back to OMERO.web
Page not found. (404)
The requested object or URL was not found on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it.

And sometime this mesage:
Url: /omero/webclient/group_user_content/?url=/omero/webclient/userdata/&_=1569834600920
Resolver404: {u’path’: u’omero/webclient/group_user_content/’, u’tried’: [, [ (None:None) ^(?i)webgateway/>], [ (None:None) ^(?i)webadmin/>], [ (None:None) ^(?i)webclient/>], [ (None:None) ^(?i)url/>], [ (None:None) ^(?i)feedback/>], [ (None:None) ^(?i)api/>], , ]}

omero@omero:~$>tail OMERO.py/var/log/OMEROweb.log
2019-09-30 10:10:01,090 INFO [ omero.gateway] (proc.29338) close():1952 closed connection (uuid=30c5a07f-2bd8-4533-b0c8-0b363b4098ec)
2019-09-30 10:10:01,091 INFO [ omero.gateway] (proc.29337) connect():2239 created connection (uuid=30c5a07f-2bd8-4533-b0c8-0b363b4098ec)
2019-09-30 10:10:01,118 INFO [ omero.gateway] (proc.29337) close():1952 closed connection (uuid=30c5a07f-2bd8-4533-b0c8-0b363b4098ec)
2019-09-30 10:10:01,165 INFO [ omero.gateway] (proc.29337) connect():2239 created connection (uuid=30c5a07f-2bd8-4533-b0c8-0b363b4098ec)
2019-09-30 10:10:01,204 INFO [ omero.gateway] (proc.29337) close():1952 closed connection (uuid=30c5a07f-2bd8-4533-b0c8-0b363b4098ec)
2019-09-30 10:10:04,481 WARNI [ django.request] (proc.38431) get_response():170 Not Found: /omero/webclient/group_user_content/
2019-09-30 10:10:04,481 WARNI [ django.request] (proc.38431) get_response():170 HTTP 404 <WSGIRequest: GET ‘/omero/webclient/group_user_content/?url=/omero/webclient/userdata/&_=1569834600920’>
2019-09-30 10:10:04,481 WARNI [ omeroweb.feedback.views] (proc.38431) handler404():198 Not Found: /omero/webclient/group_user_content/
2019-09-30 10:11:01,599 INFO [ omero.gateway] (proc.29337) connect():2239 created connection (uuid=30c5a07f-2bd8-4533-b0c8-0b363b4098ec)
2019-09-30 10:11:01,602 INFO [ omero.gateway] (proc.29337) close():1952 closed connection (uuid=30c5a07f-2bd8-4533-b0c8-0b363b4098ec)

omero@omero:~$>OMERO.py/bin/omero web diagnostics

================================================================================
OMERO Diagnostics (web) 5.5.1-ice36-b122

OMERO.web status… [RUNNING] (PID 29332)
Django version: 1.8.19

Log dir: /home/omero/OMERO.py/var/log exists
Log file : OMEROweb.log 150.0 KB errors=10 warnings=404

Philippe

Hi,
More infos about 404 error, the brower inspector console show this log :

jstree.js:7069 [Deprecation] document.registerElement is deprecated and will be removed in M80, around February 2020. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 and https://developers.google.com/web/updates/2019/07/web-components-time-to-upgrade for more details.
(anonymous) @ jstree.js:7069
(anonymous) @ jstree.js:7072
(anonymous) @ jstree.js:11
(anonymous) @ jstree.js:13
jquery-1.11.1.js:9631 GET https://omero.college-de-france.fr/omero/webgateway/open_with/?=1570094943006 404 (NOT FOUND)
send @ jquery-1.11.1.js:9631
ajax @ jquery-1.11.1.js:9176
jQuery. @ jquery-1.11.1.js:9322
getJSON @ jquery-1.11.1.js:9305
(anonymous) @ (index):733
jquery-1.11.1.js:9631 GET https://omero.college-de-france.fr/omero/webclient/activities/?
=1570094943008 404 (NOT FOUND)
send @ jquery-1.11.1.js:9631
ajax @ jquery-1.11.1.js:9176
jQuery. @ jquery-1.11.1.js:9322
OME.activitiesUpdate @ (index):3078
OME.refreshActivities @ (index):3168
(anonymous) @ (index):3172
fire @ jquery-1.11.1.js:3119
fireWith @ jquery-1.11.1.js:3231
ready @ jquery-1.11.1.js:3443
completed @ jquery-1.11.1.js:3474
jquery-1.11.1.js:9631 GET https://omero.college-de-france.fr/omero/webclient/keepalive_ping/?_=1570094943010 404 (NOT FOUND)
send @ jquery-1.11.1.js:9631
ajax @ jquery-1.11.1.js:9176
jQuery. @ jquery-1.11.1.js:9322
(anonymous) @ (index):793
setInterval (async)
(anonymous) @ (index):792
fire @ jquery-1.11.1.js:3119
fireWith @ jquery-1.11.1.js:3231
ready @ jquery-1.11.1.js:3443
completed @ jquery-1.11.1.js:3474

???
Philippe

Hi Philippe,

I’m afraid I don’t know what’s causing those 404s.
It looks like sometimes Django is failing to create URLs “Resolver404” but in the last example the URLs are getting rendered OK but failing to load via jQuery.

In either case, it’s probably something wrong (or slow) with the install (rather than a software bug). It seems like your URLs are timing out when I try them just now.
Could you have a look at the OMERO.web and Blitz logs (attach the zips here if you’d like us to look).

Regards,
Will.

Hi Will,
May be I should re-install completly OMERO server ??

omero@omero:~/OMERO.py/var$>tail log/OMEROweb.log
2019-10-07 09:55:07,600 WARNI [ django.request] (proc.38433) get_response():170 HTTP 404 <WSGIRequest: GET ‘/omero/webclient/keepalive_ping/?=1570436347009’>
2019-10-07 09:55:07,600 WARNI [ omeroweb.feedback.views] (proc.38433) handler404():198 Not Found: /omero/webclient/keepalive_ping/
2019-10-07 09:56:07,621 INFO [ omero.gateway] (proc.03362) connect():2239 created connection (uuid=041b2f8d-fe59-4d8a-9f05-4af782f898ce)
2019-10-07 09:56:07,624 INFO [ omero.gateway] (proc.03362) close():1952 closed connection (uuid=041b2f8d-fe59-4d8a-9f05-4af782f898ce)
2019-10-07 09:57:07,599 WARNI [ django.request] (proc.38432) get_response():170 Not Found: /omero/webclient/keepalive_ping/
2019-10-07 09:57:07,599 WARNI [ django.request] (proc.38432) get_response():170 HTTP 404 <WSGIRequest: GET '/omero/webclient/keepalive_ping/?
=1570436347011’>
2019-10-07 09:57:07,600 WARNI [ omeroweb.feedback.views] (proc.38432) handler404():198 Not Found: /omero/webclient/keepalive_ping/
2019-10-07 09:58:07,596 WARNI [ django.request] (proc.38434) get_response():170 Not Found: /omero/webclient/keepalive_ping/
2019-10-07 09:58:07,596 WARNI [ django.request] (proc.38434) get_response():170 HTTP 404 <WSGIRequest: GET ‘/omero/webclient/keepalive_ping/?_=1570436347012’>
2019-10-07 09:58:07,597 WARNI [ omeroweb.feedback.views] (proc.38434) handler404():198 Not Found: /omero/webclient/keepalive_ping/

omero@omero:~/OMERO.server/var/log$>tail Blitz-0.log
2019-10-07 11:00:08,582 INFO [o.services.sessions.SessionContext$Count] (.Server-77) -Reference count: 041b2f8d-fe59-4d8a-9f05-4af782f898ce=0
2019-10-07 11:00:08,582 INFO [ omero.cmd.SessionI] (.Server-77) cleanupSelf(ServiceFactoryI(session-b156c89d-1269-462a-a038-a295345b5fe4/041b2f8d-fe59-4d8a-9f05-4af782f898ce)).
2019-10-07 11:00:13,001 INFO [ ome.services.blitz.fire.Ring] (1-thread-2) Checking cluster
2019-10-07 11:00:13,002 INFO [ ome.services.blitz.fire.Registry] (1-thread-2) Found 1 cluster node(s) : [ClusterNode/a4b6904b-2576-42c1-b7ef-98bbc3e703ea -t -e 1.1:tcp -h 192.168.202.21 -p 46877 -t 60000:tcp -h 192.168.188.21 -p 46877 -t 60000]
2019-10-07 11:00:13,003 INFO [ ome.services.blitz.fire.Ring] (1-thread-2) Got 1 cluster uuids : [a4b6904b-2576-42c1-b7ef-98bbc3e703ea]
2019-10-07 11:00:13,003 INFO [ ome.services.util.ServiceHandler] (1-thread-2) Executor.doWork – ome.security.basic.NodeProviderInDb.getManagerList
2019-10-07 11:00:13,003 INFO [ ome.services.util.ServiceHandler] (1-thread-2) Args: [null, InternalSF@1869081829]
2019-10-07 11:00:13,005 INFO [ ome.security.basic.EventHandler] (1-thread-2) Auth: user=0,group=0,event=null(Internal),sess=a4b6904b-2576-42c1-b7ef-98bbc3e703ea
2019-10-07 11:00:13,012 INFO [ org.perf4j.TimingLogger] (1-thread-2) start[1570438813003] time[8] tag[omero.call.success.ome.security.basic.NodeProviderInDb$1.doWork]
2019-10-07 11:00:13,012 INFO [ ome.services.util.ServiceHandler] (1-thread-2) Rslt: (a4b6904b-2576-42c1-b7ef-98bbc3e703ea)

Philippe

Hi Philippe,

Do those 404 pages ever work? If you try e.g. https://omero.college-de-france.fr/omero/webclient/keepalive_ping/ repeatedly, do you see it working sometimes and not others?
And when it fails, do you see a 404 (not found) page? For me there’s simply " omero.college-de-france.fr ’s server IP address could not be found." but you might have better luck locally?
Are you running your webclient at https://omero.college-de-france.fr/omero/webclient/ or some other URL? (I get nothing from that URL either).

Will

Hi Will,
If I “run” the url https://omero.college-de-france.fr/omero/webclient/login/?url=%2Fomero%2Fwebclient%2F, I obtain sometime the omero login page and sometime the “Page not found. (404)”. When I log into the omero web page, I got the omero page with Data, History etc… with the error :
Url: /omero/webclient/activities/?_=1570630964753
Resolver404: {u’path’: u’omero/webclient/activities/’, u’tried’: [, [ (None:None) ^(?i)webgateway/>], [ (None:None) ^(?i)webadmin/>], [ (None:None) ^(?i)webclient/>], [ (None:None) ^(?i)url/>], [ (None:None) ^(?i)feedback/>], [ (None:None) ^(?i)api/>], , ]}
I have no error message in omero web log …

And strangely the nginx log show :

2019/10/09 16:18:46 [error] 2572#0: *3711 open() “/usr/share/nginx/html/static/webgateway/css/reset.css” failed (2: No such file or directory), client: 192.168.188.18, server: omero.college-de-france.fr, request: “GET /static/webgateway/css/reset.css?_5.5.1-ice36-b122 HTTP/1.1”, host: “omero.college-de-france.fr”, referrer: “https://omero.college-de-france.fr/omero/webclient/active_group/?active_group=204&url=/omero/webclient/userdata/?experimenter=602
2019/10/09 16:18:46 [error] 2572#0: *3711 open() “/usr/share/nginx/html/static/webgateway/css/ome.body.css” failed (2: No such file or directory), client: 192.168.188.18, server: omero.college-de-france.fr, request: “GET /static/webgateway/css/ome.body.css?_5.5.1-ice36-b122 HTTP/1.1”, host: “omero.college-de-france.fr”, referrer: “https://omero.college-de-france.fr/omero/webclient/active_group/?active_group=204&url=/omero/webclient/userdata/?experimenter=602
2019/10/09 16:18:46 [error] 2572#0: *3730 open() “/usr/share/nginx/html/static/webclient/css/dusty.css” failed (2: No such file or directory), client: 192.168.188.18, server: omero.college-de-france.fr, request: “GET /static/webclient/css/dusty.css?_5.5.1-ice36-b122 HTTP/1.1”, host: “omero.college-de-france.fr”, referrer: “https://omero.college-de-france.fr/omero/webclient/active_group/?active_group=204&url=/omero/webclient/userdata/?experimenter=602
2019/10/09 16:18:46 [error] 2572#0: *3731 open() “/usr/share/nginx/html/static/feedback/css/layout.css” failed (2: No such file or directory), client: 192.168.188.18, server: omero.college-de-france.fr, request: “GET /static/feedback/css/layout.css HTTP/1.1”, host: “omero.college-de-france.fr”, referrer: “https://omero.college-de-france.fr/omero/webclient/active_group/?active_group=204&url=/omero/webclient/userdata/?experimenter=602

In my nginx omero.conf I have :

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 /home/omero/OMERO.py/etc/templates/error;
    try_files $uri /maintainance.html =502;
}
location = /favicon.ico {
	alias /home/omero/Images/favicon.ico;
}

# weblitz django apps serve media from here
location /omero/static {
    alias /home/omero/OMERO.py/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;
}

}

omero@omero:~$>more /etc/nginx/nginx.conf

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log  /var/log/nginx/access.log  main;

sendfile        on;
#tcp_nopush     on;

keepalive_timeout  65;

#gzip  on;

include /etc/nginx/conf.d/*.conf;

}

And nothing in /etc/nginx/default.d/

I don’t understood why nginx try to open file in /usr/share/nginx/html/webclient/

And finally, I notice that when I get the 404 window error message as :

Url: /omero/webclient/activities/?_=1570631572804
Resolver404: {u’path’: u’omero/webclient/activities/’, u’tried’: [, [ (None:None) ^(?i)webgateway/>], [ (None:None) ^(?i)webadmin/>], [ (None:None) ^(?i)webclient/>], [ (None:None) ^(?i)url/>], [ (None:None) ^(?i)feedback/>], [ (None:None) ^(?i)api/>], , ]}

I can’t connect to my webmin server which is on the same machine ???
Can’t establish a connection to the server at omero.college-de-france.fr:10000.

Check the server status
Check the connection

PS : I have no problem with the OMERO server with omero.insight connection.

Philippe

Hi Philippe,
I’m afraid we can’t see anything obviously wrong with your setup and don’t know what would cause intermittent 404s that you’re seeing.
Did you install OMERO.web separately from the server?
You could do as you suggested and try a new install of just the OMERO.web server, to connect to your existing OMERO.server.
Sorry we couldn’t be more help.
Regards,

Will.

Hi Will,
I did a new fresh installation of OMERO web (OMERO.web is separated from OMERO.server). That didn’t change nothing !!!
However, I notice that in nginx log I got this error when I get the 404 error :
omero@omero:~$>sudo tail /var/log/nginx/error.log
2019/10/14 11:07:00 [error] 2572#0: *20388 open() “/usr/share/nginx/html/static/webgateway/css/reset.css” failed (2: No such file or directory), client: 192.168.188.18, server: omero.college-de-france.fr, request: “GET /static/webgateway/css/reset.css?_5.5.1-ice36-b122 HTTP/1.1”, host: “omero.college-de-france.fr”, referrer: “https://omero.college-de-france.fr/omero/webclient/login/?url=%2Fomero%2Fwebclient%2F
2019/10/14 11:07:00 [error] 2572#0: *20392 open() “/usr/share/nginx/html/static/webgateway/css/ome.body.css” failed (2: No such file or directory), client: 192.168.188.18, server: omero.college-de-france.fr, request: “GET /static/webgateway/css/ome.body.css?_5.5.1-ice36-b122 HTTP/1.1”, host: “omero.college-de-france.fr”, referrer: “https://omero.college-de-france.fr/omero/webclient/login/?url=%2Fomero%2Fwebclient%2F
2019/10/14 11:07:00 [error] 2572#0: *20390 open() “/usr/share/nginx/html/static/webclient/css/dusty.css” failed (2: No such file or directory), client: 192.168.188.18, server: omero.college-de-france.fr, request: “GET /static/webclient/css/dusty.css?_5.5.1-ice36-b122 HTTP/1.1”, host: “omero.college-de-france.fr”, referrer: “https://omero.college-de-france.fr/omero/webclient/login/?url=%2Fomero%2Fwebclient%2F

I seem that nginx try to load css from /usr/share/nginx/html/static/webclient/ instead of /home/omero/OMERO.py/lib/python/omeroweb/static as writed in the nginx_omero.conf

Philippe

Hi,
After OMERO web re-installed separately from OMERO server, starting OMERO web fail :

omero@omero:~$>sudo systemctl status omero-web.service
● omero-web.service - OMERO.web
Loaded: loaded (/etc/systemd/system/omero-web.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since mar. 2019-10-15 17:11:20 CEST; 1s ago
Process: 26924 ExecStop=/home/omero/omerowebvenv/bin/python /home/omero/OMERO.py/bin/omero web stop (code=exited, status=0/SUCCESS)
Process: 26893 ExecStart=/home/omero/omerowebvenv/bin/python /home/omero/OMERO.py/bin/omero web start (code=exited, status=0/SUCCESS)
Main PID: 26917 (code=exited, status=1/FAILURE)

oct. 15 17:11:13 omero.college-de-france.fr python[26893]: 0 static files copied to ‘/home/omero/OMERO.py/lib/python/omeroweb/static’, 604 unmodified, 2 post-processed.
oct. 15 17:11:14 omero.college-de-france.fr python[26893]: Clearing expired sessions. This may take some time… [OK]
oct. 15 17:11:14 omero.college-de-france.fr python[26893]: Starting OMERO.web… [OK]
oct. 15 17:11:14 omero.college-de-france.fr systemd[1]: Can’t open PID file /home/omero/OMERO.py/var/django.pid (yet?) after start: No such file or directory
oct. 15 17:11:14 omero.college-de-france.fr systemd[1]: Started OMERO.web.
oct. 15 17:11:19 omero.college-de-france.fr systemd[1]: omero-web.service: main process exited, code=exited, status=1/FAILURE
oct. 15 17:11:20 omero.college-de-france.fr python[26924]: Stopping OMERO.web… [ERROR] OMERO.web workers (PID 26917) - no such process. Use `ps aux | grep /ho… by hand.
oct. 15 17:11:20 omero.college-de-france.fr python[26924]: Removed stale /home/omero/OMERO.py/var/django.pid
oct. 15 17:11:20 omero.college-de-france.fr systemd[1]: Unit omero-web.service entered failed state.
oct. 15 17:11:20 omero.college-de-france.fr systemd[1]: omero-web.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

omero@omero:~$>OMERO.py/bin/omero web start
Traceback (most recent call last):
File “manage.py”, line 56, in
execute_from_command_line(sys.argv)
File “/usr/lib64/python2.7/site-packages/django/core/management/init.py”, line 354, in execute_from_command_line
utility.execute()
File “/usr/lib64/python2.7/site-packages/django/core/management/init.py”, line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/usr/lib64/python2.7/site-packages/django/core/management/base.py”, line 394, in run_from_argv
self.execute(*args, **cmd_options)
File “/usr/lib64/python2.7/site-packages/django/core/management/base.py”, line 445, in execute
output = self.handle(*args, **options)
File “/usr/lib64/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py”, line 168, in handle
collected = self.collect()
File “/usr/lib64/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py”, line 114, in collect
for original_path, processed_path, processed in processor:
File “/usr/lib/python2.7/site-packages/pipeline/storage.py”, line 20, in post_process
from pipeline.packager import Packager
File “/usr/lib/python2.7/site-packages/pipeline/packager.py”, line 8, in
from pipeline.compilers import Compiler
File “/usr/lib/python2.7/site-packages/pipeline/compilers/init.py”, line 14, in
from pipeline.conf import settings
File “/usr/lib/python2.7/site-packages/pipeline/conf.py”, line 126, in
settings = PipelineSettings(_settings.PIPELINE)
File “/usr/lib64/python2.7/site-packages/django/conf/init.py”, line 49, in getattr
return getattr(self._wrapped, name)
AttributeError: ‘Settings’ object has no attribute ‘PIPELINE’

omero@omero:~$>django-admin.py version
1.8.18

[sudo] Mot de passe de omero :
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: django-pipeline in /usr/lib/python2.7/site-packages (1.6.14)
Requirement already satisfied: futures>=2.1.3; python_version < “3” in /usr/lib/python2.7/site-packages (from django-pipeline) (3.3.0)

Philippe

Hi Phillipe,

You need django-pipeline==1.3.20 which should have been installed with e.g.

/home/omero/omerowebvenv/bin/pip install --upgrade -r /home/omero/OMERO.py/share/web/requirements-py27.txt

as described at https://docs.openmicroscopy.org/omero/5.5.1/sysadmins/unix/install-web/walkthrough/omeroweb-install-centos7-ice3.6.html#installing-omero-web

See:

Regards,

Will

Hi Will,
I installed OMERO.py with the option 1 as described in the doc :

# option 1: in a virtual environment with --system-site-packages on
virtualenv /home/omero/omerowebvenv --system-site-packages
# option 1: in a virtual environment with --system-site-packages on
/home/omero/omerowebvenv/bin/pip install --upgrade -r /home/omero/OMERO.py/share/web/requirements-py27.txt

omero@omero:~>/home/omero/omerowebvenv/bin/pip install --upgrade -r /home/omero/OMERO.py/share/web/requirements-py27.txt DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Requirement already up-to-date: zeroc-ice<3.7,>3.5 in ./omerowebvenv/lib/python2.7/site-packages (from -r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 7)) (3.6.5) Requirement already up-to-date: Django<1.9,>=1.8 in ./omerowebvenv/lib/python2.7/site-packages (from -r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 8)) (1.8.19) Requirement already up-to-date: django-pipeline==1.3.20 in ./omerowebvenv/lib/python2.7/site-packages (from -r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 9)) (1.3.20) Requirement already up-to-date: gunicorn>=19.3 in /usr/lib/python2.7/site-packages (from -r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 10)) (19.9.0) Requirement already up-to-date: omero-marshal==0.6.0 in ./omerowebvenv/lib/python2.7/site-packages (from -r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 12)) (0.6.0) Requirement already up-to-date: django-redis<4.9,>=4.4 in /usr/lib/python2.7/site-packages (from -r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 13)) (4.8.0) Requirement already satisfied, skipping upgrade: futures>=2.1.3 in /usr/lib/python2.7/site-packages (from django-pipeline==1.3.20->-r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 9)) (3.3.0) Requirement already satisfied, skipping upgrade: redis>=2.10.0 in /usr/lib/python2.7/site-packages (from django-redis<4.9,>=4.4->-r /home/omero/OMERO.py/share/web/requirements-py27.txt (line 13)) (3.3.8) WARNING: You are using pip version 19.2.3, however version 19.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. omero@omero:~>sudo systemctl status omero-web.service
● omero-web.service - OMERO.web
Loaded: loaded (/etc/systemd/system/omero-web.service; enabled; vendor preset: disabled)
Active: active (running) since mer. 2019-10-16 09:57:26 CEST; 15s ago
Process: 35829 ExecStop=/home/omero/omerowebvenv/bin/python /home/omero/OMERO.py/bin/omero web stop (code=exited, status=0/SUCCESS)
Process: 35838 ExecStart=/home/omero/omerowebvenv/bin/python /home/omero/OMERO.py/bin/omero web start (code=exited, status=0/SUCCESS)
Main PID: 35863 (gunicorn)
CGroup: /system.slice/omero-web.service
├─35863 /usr/bin/python2 /bin/gunicorn -D -p /home/omero/OMERO.py/var/django.pid --bind 127.0.0.1:4080 --workers 5 --threads 1 --timeout 60 --max-requests 0 omero…
├─35868 /usr/bin/python2 /bin/gunicorn -D -p /home/omero/OMERO.py/var/django.pid --bind 127.0.0.1:4080 --workers 5 --threads 1 --timeout 60 --max-requests 0 omero…
├─35871 /usr/bin/python2 /bin/gunicorn -D -p /home/omero/OMERO.py/var/django.pid --bind 127.0.0.1:4080 --workers 5 --threads 1 --timeout 60 --max-requests 0 omero…
├─35874 /usr/bin/python2 /bin/gunicorn -D -p /home/omero/OMERO.py/var/django.pid --bind 127.0.0.1:4080 --workers 5 --threads 1 --timeout 60 --max-requests 0 omero…
├─35875 /usr/bin/python2 /bin/gunicorn -D -p /home/omero/OMERO.py/var/django.pid --bind 127.0.0.1:4080 --workers 5 --threads 1 --timeout 60 --max-requests 0 omero…
└─35878 /usr/bin/python2 /bin/gunicorn -D -p /home/omero/OMERO.py/var/django.pid --bind 127.0.0.1:4080 --workers 5 --threads 1 --timeout 60 --max-requests 0 omero…

oct. 16 09:57:23 omero.college-de-france.fr systemd[1]: Starting OMERO.web…
oct. 16 09:57:25 omero.college-de-france.fr python[35838]: Post-processed ‘omeroweb.viewer.min.css’ as ‘omeroweb.viewer.min.css’
oct. 16 09:57:25 omero.college-de-france.fr python[35838]: Post-processed ‘omeroweb.viewer.min.js’ as ‘omeroweb.viewer.min.js’
oct. 16 09:57:25 omero.college-de-france.fr python[35838]: 0 static files copied to ‘/home/omero/OMERO.py/lib/python/omeroweb/static’, 604 unmodified, 2 post-processed.
oct. 16 09:57:26 omero.college-de-france.fr python[35838]: Clearing expired sessions. This may take some time… [OK]
oct. 16 09:57:26 omero.college-de-france.fr python[35838]: Starting OMERO.web… [OK]
oct. 16 09:57:26 omero.college-de-france.fr systemd[1]: Can’t open PID file /home/omero/OMERO.py/var/django.pid (yet?) after start: No such file or directory
oct. 16 09:57:26 omero.college-de-france.fr systemd[1]: Started OMERO.web.

The web server seems to be correctly started, however I have now Internal server error !!!
OMERO server is working , no problem to connect by OMERO.insight.
nginx is working too (I can access to webmin server)

Just one question, what is the difference between running OMERO.py commands from omerowebvenv and directly from the shell as :

omero@omero:~$>OMERO.py/bin/omero web diagnostics

================================================================================
OMERO Diagnostics (web) 5.5.1-ice36-b122

OMERO.web status… [RUNNING] (PID 35863)
Django version: 1.8.18

Log dir: /home/omero/OMERO.py/var/log exists
Log file : OMEROweb.log 7.0 KB errors=0 warnings=44
omero@omero:~>. /home/omero/omerowebvenv/bin/activate (omerowebvenv) omero@omero:~>/home/omero/OMERO.py/bin/omero web diagnostics

================================================================================
OMERO Diagnostics (web) 5.5.1-ice36-b122

OMERO.web status… [RUNNING] (PID 35863)
Django version: 1.8.19

Log dir: /home/omero/OMERO.py/var/log exists
Log file : OMEROweb.log 7.0 KB errors=0 warnings=44

Philippe

Hi Philippe,

You say “I have now Internal server error” but you haven’t shown what that error was.
Is everything running OK now?

The only difference is the python environment you’re using.
If you type

$ which python

this will show you which python you’re using (and each python environment will have different python packages installed).
In omerowebvenv you’ll have all the packages you need to run OMERO.web, so you need to be in this environment when you install dependencies and when you run OMERO.web server.

Will.

Hi Will,
The Internal Server Error is the message in the web page when I try to connect to the server web.

omero@omero:~$>which python
/usr/bin/python

When I start the OMERO.web server I use the command :
systemctl start omero-web.service
with the omero-web.service as :
omero@omero:~$>more /etc/systemd/system/omero-web.service
[Unit]
Description=OMERO.web

Not mandatory, Nginx may be running on a different server

Requires=nginx.service
After=network.service

[Service]
User=omero
Type=forking
PIDFile=/home/omero/OMERO.py/var/django.pid
Restart=no
RestartSec=10
Environment=“PATH=/home/omero/omerowebvenv/bin:/bin:/usr/bin”
Environment=“WEBBINDIR=/home/omero/OMERO.py/bin”
ExecStart=/home/omero/omerowebvenv/bin/python /home/omero/OMERO.py/bin/omero web start
ExecStop=/home/omero/omerowebvenv/bin/python /home/omero/OMERO.py/bin/omero web stop

[Install]
WantedBy=multi-user.target

So it seems that I start correctly the web server !

Philippe