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
atarkowska wrote:Philippe, Do you have nginx available for you? it does not need to be on the same box.
Ola
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
/etc/init.d/nginx start
Démarrage de nginx : [ OK ]
omero config set omero.web.application_server wsgi-tcp
omero web config nginx > 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;
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;
}
}
Page Web inaccessible
ERR_CONNECTION_REFUSED
ps aux | grep gunicorn
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.
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 ofand attach nginx logs and OMEROweb.log, please?
- Code: Select all
ps aux | grep gunicorn
Ola
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
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
curl -IL http://hostname
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
/etc/init.d/nginx restart
Arrêt de nginx : [ OK ]
Démarrage de nginx : [ OK ]
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
curl -IL http://omero.college-de-france.fr/omero
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
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"}]]
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
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"
ls /etc/nginx/html
ls: impossible d'accéder à /etc/nginx/html: Aucun fichier ou dossier de ce type
Return to Installation and Deployment
Users browsing this forum: No registered users and 1 guest