We're Hiring!

omero web start but

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.

omero web start but

Postby phm » Tue Aug 26, 2014 4:29 pm

Hi,
I have Omero running on CentOS 6.5, and omero web using Nginx fastcgi-tcp. And when I trie to connect to the web server (https://localhost/omero/) I get this screen :


Go back to: Webadmin, Webclient or Logout
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.
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: omero web start but

Postby kennethgillen » Tue Aug 26, 2014 4:37 pm

phm wrote:when I trie to connect to the web server (https://localhost/omero/)

Hi,

Have you created an https config section for nginx? Does it work if you try http://localhost/omero/, without the 's'?

Thanks,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: omero web start but

Postby phm » Wed Aug 27, 2014 9:35 am

kennethgillen wrote:
phm wrote:when I trie to connect to the web server (https://localhost/omero/)

Hi,

Have you created an https config section for nginx? Does it work if you try http://localhost/omero/, without the 's'?

Thanks,

Kenny


Hi Kenny,

on the port 80 I get page not found

This is my nginx.conf file :

#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki - http://wiki.nginx.org/Main
# * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################

#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
# http://wiki.nginx.org/NginxHttpMainModule
#
#----------------------------------------------------------------------

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;


#----------------------------------------------------------------------
# Events Module
#
# http://wiki.nginx.org/NginxHttpEventsModule
#
#----------------------------------------------------------------------

events {
worker_connections 1024;
}


#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.nginx.org/NginxHttpCoreModule
#
#----------------------------------------------------------------------

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 0;
keepalive_timeout 65;

#gzip on;

#
# The default server.
# To protect OMERO passwords, redirect all HTTP connections to use HTTPS.
#
server {
listen [::]:80;
return 301 https://$host$request_uri;
}

# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;


#
# Another server, for reporting OMERO status.
#
server {
listen 8000;
server_name _;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

}
}

and my /etc/nginx/conf.d/omero-web.conf :

server {
listen 80;
server_name $hostname;

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

location /omero {
if (-f /opt/OMERO.server/var/maintenance.html) {
error_page 503 /maintenance.html;
return 503;
}

fastcgi_pass 0.0.0.0:4080;

fastcgi_split_path_info ^(/omero)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_INFO $fastcgi_script_name;


fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_PORT $server_port;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors on;
fastcgi_read_timeout 60;
# Uncomment if nginx SSL module is enabled or you are using nginx 1.1.11 or later
# -- See: #10273, http://nginx.org/en/CHANGES
fastcgi_param HTTPS $https;
}

location /maintenance.html {
root /opt/OMERO.server/var;
}

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

Re: omero web start but

Postby manics » Wed Aug 27, 2014 10:31 am

Code: Select all
server {
listen [::]:80;
return 301 https://$host$request_uri;
}

Could you try disabling the https redirect and see if it works? If not is there anything in your nginx logs (/var/log/nginx)? What was the exact command you used to generate your omero-web.conf file?

Thanks

Simon
User avatar
manics
Team Member
 
Posts: 261
Joined: Mon Oct 08, 2012 11:01 am
Location: Dundee

Re: omero web start but

Postby phm » Wed Aug 27, 2014 12:04 pm

manics wrote:
Code: Select all
server {
listen [::]:80;
return 301 https://$host$request_uri;
}

Could you try disabling the https redirect and see if it works? If not is there anything in your nginx logs (/var/log/nginx)? What was the exact command you used to generate your omero-web.conf file?

Thanks

Simon

Hi Simon,
If I comment the https redirection the http connexion works. Thanks
The command to generate the omero-web.conf is (as in the documentation) :
bin/omero web config nginx --system > omero-web.conf

Thanks

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

Re: omero web start but

Postby manics » Wed Aug 27, 2014 12:35 pm

I've just taken a closer look at your omero-web.conf, nginx is only listening on port 80. Does https work for you if you configure nginx to listen on https port 443 (either in addition to or instead of http port 80)?
Code: Select all
    listen              443 ssl;


Simon
User avatar
manics
Team Member
 
Posts: 261
Joined: Mon Oct 08, 2012 11:01 am
Location: Dundee

Re: omero web start but

Postby phm » Wed Aug 27, 2014 1:01 pm

manics wrote:I've just taken a closer look at your omero-web.conf, nginx is only listening on port 80. Does https work for you if you configure nginx to listen on https port 443 (either in addition to or instead of http port 80)?
Code: Select all
    listen              443 ssl;


Simon

Hi Simon,

If I enable only https I could'nt connect to the server either with 80 and 443. for https I get ssl_error_rx_record_too_long

Thanks

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

Re: omero web start but

Postby kennethgillen » Wed Aug 27, 2014 1:14 pm

Hi,

I'd recommend removing any customisation you've made to the central system nginx configuration file /etc/nginx/nginx.conf, since you have the line "include /etc/nginx/conf.d/*.conf;" - meaning you can leave this file at the defaults, and place OMERO's nginx config in /etc/nginx/conf.d/

e.g.
Code: Select all
bin/omero web config nginx --system >> /etc/nginx/conf.d/omero.conf

Hopefully that will get us to a working state.

Then introduce SSL once you have the working OMERO.web.

Best,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: omero web start but

Postby phm » Wed Aug 27, 2014 1:57 pm

kennethgillen wrote:Hi,

I'd recommend removing any customisation you've made to the central system nginx configuration file /etc/nginx/nginx.conf, since you have the line "include /etc/nginx/conf.d/*.conf;" - meaning you can leave this file at the defaults, and place OMERO's nginx config in /etc/nginx/conf.d/

e.g.
Code: Select all
bin/omero web config nginx --system >> /etc/nginx/conf.d/omero.conf

Hopefully that will get us to a working state.

Then introduce SSL once you have the working OMERO.web.

Best,

Kenny


Hi Kenny,

I did all these things and now nothing works. No http or https connexions, however http://localhost works I get the nginx page

my nginx.conf file :
#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki - http://wiki.nginx.org/Main
# * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################

#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
# http://wiki.nginx.org/NginxHttpMainModule
#
#----------------------------------------------------------------------

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;


#----------------------------------------------------------------------
# Events Module
#
# http://wiki.nginx.org/NginxHttpEventsModule
#
#----------------------------------------------------------------------

events {
worker_connections 1024;
}


#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.nginx.org/NginxHttpCoreModule
#
#----------------------------------------------------------------------

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 0;
keepalive_timeout 65;

#gzip on;


# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
}

and omero.conf after omero web nginx --system >> /etc/conf.d/omero.conf


Thanks

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

Re: omero web start but

Postby kennethgillen » Wed Aug 27, 2014 4:00 pm

Worked through issues with Philippe:

Summary:

Reinstalled Nginx
Moved /etc/nginx/conf.d/default.conf to default.conf.orig
Asked OMERO to create an nginx config, and placed in a separate file in the nginx config dir
Code: Select all
bin/omero web config nginx --system >> /etc/nginx/conf.d/omero.conf

Edited omero.conf from listening on port :8080 to port :80
Restarted nginx
Code: Select all
service nginx restart


OMERO.web interface was now working at http://localhost

All the best,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Next

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest