Page 3 of 5

Re: Bad Gateway

PostPosted: Fri Dec 12, 2014 12:28 pm
by phm
atarkowska wrote:I had another thoguht, If you managed to start webserver I think your issues with nginx has nothing to to with OMERO at all. Permission denied must come from some changes in nginx configurations when you installed php-fpm. I would google for that

Ola


You'r right Ola, I did google about php-fpm and nginx, however all proposed solutions didn't change my problem. And I have the hrm conf using fastcgi_pass on 127.0.0.1:9000 which works ?????


Philippe

Re: Bad Gateway

PostPosted: Mon Dec 15, 2014 9:43 am
by manics
Hi Philippe

I'm afraid none of us have any experience with php-fpm. The best I can suggest is to go back to a completely clean OMERO/Nginx install: uninstall Nginx and any related packages, remove all Nginx configuration files (so there should be nothing under /etc/nginx/), then re-install Nginx and regenerate your OMERO.web configuration file.

If OMERO.web works then create a backup and attempt to get your other web services (hrm, php-fpm) working. If you can't then perhaps ask on the PHP-FPM mailing list?

Best wishes

Simon

Re: Bad Gateway

PostPosted: Mon Dec 15, 2014 3:49 pm
by phm
manics wrote:Hi Philippe

I'm afraid none of us have any experience with php-fpm. The best I can suggest is to go back to a completely clean OMERO/Nginx install: uninstall Nginx and any related packages, remove all Nginx configuration files (so there should be nothing under /etc/nginx/), then re-install Nginx and regenerate your OMERO.web configuration file.

If OMERO.web works then create a backup and attempt to get your other web services (hrm, php-fpm) working. If you can't then perhaps ask on the PHP-FPM mailing list?

Best wishes

Simon

Hi Simon,

Finally I removed nginx and install apache on the server. But now I have Page not found when I try to connect to the omero page, and I have the following error in ssl_error_log :
[Mon Dec 15 16:28:40 2014] [error] [client 192.168.188.18] File does not exist: /opt/OMERO.server/var/omero.fcgi

Here my http conf files

Philippe

Re: Bad Gateway

PostPosted: Mon Dec 15, 2014 4:06 pm
by manics
Hi Philippe

Could you try the following:
  • comment out all lines in fastcgi.conf beginning with 'FastCgi' (unfortunately they conflict with one of the settings in omero.conf, https://www.openmicroscopy.org/site/sup ... figuration)
  • Check that /opt/OMERO.server/var/ and all parent directories are world-readable/executable

Re: Bad Gateway

PostPosted: Mon Dec 15, 2014 4:20 pm
by phm
manics wrote:Hi Philippe

Could you try the following:
  • comment out all lines in fastcgi.conf beginning with 'FastCgi' (unfortunately they conflict with one of the settings in omero.conf, https://www.openmicroscopy.org/site/sup ... figuration)
  • Check that /opt/OMERO.server/var/ and all parent directories are world-readable/executable


Hi Manics,

Thanks a lot is It working now...

Philippe

Re: Bad Gateway

PostPosted: Tue Dec 30, 2014 10:00 pm
by xkunes
Hello,
I have the same problem ... almost.

I have pure installation according the "OMERO.server Linux walkthrough"
CentOS 6.6., Omero 5.0.6, NGINX, and
If I run the nginx by command:
Code: Select all
service nginx start

than I get the error 502 Bad Gateway.

If I run the nginx just as
Code: Select all
nginx
, than it is working.

I thing that it is a permission problem, but I am not able to find it. (I am using the default fastcgi-tcp configuration)

Could you help me?

Re: Bad Gateway

PostPosted: Mon Jan 05, 2015 2:40 pm
by atarkowska
Hi,

To be able to identify what is exactly the problem, could you:
- send your omero nginx conf,
- send what is in the nginx logfile when you access the URL
- send output of your bin/omero config get

Ola

Re: Bad Gateway

PostPosted: Mon Jan 05, 2015 3:11 pm
by xkunes
Yes I can,
- just the standard installation and nginx is trying to open maintenance.html (but it should not to do that.)
(IPs, names, pass was manually changed.)

Michal

nginx conf:

Code: Select all
   server {
        listen       80;
        server_name  $hostname;
        # weblitz django apps serve media from here
        location /static {
            alias /home/omero/OMERO.server/lib/python/omeroweb/static;
        }

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

            fastcgi_pass 0.0.0.0:4080;
       # fastcgi_pass unix:/home/omero/OMERO.server/var/django_fcgi.sock;

            fastcgi_param PATH_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 /home/omero/OMERO.server/var;
        }

    }


nginx errolog:
Code: Select all
2015/01/05 16:00:45 [crit] 23983#0: *1 stat() "/home/omero/OMERO.server/var/maintenance.html" failed (13: Permission denied), client: 111.222.333.111, server: xxx.xxx.xxx.cz, request: "GET / HTTP/1.1", host: "xxx.xxx.xxx.cz"
2015/01/05 16:00:45 [crit] 23983#0: *1 connect() to 0.0.0.0:4080 failed (13: Permission denied) while connecting to upstream, client: 111.222.333.111, server: xxx.xxx.xxx.cz, request: "GET / HTTP/1.1", upstream: "fastcgi://0.0.0.0:4080", host: "xxx.xxx.xxx.cz"
2015/01/05 16:00:45 [crit] 23983#0: *1 stat() "/home/omero/OMERO.server/var/maintenance.html" failed (13: Permission denied), client: 111.222.333.111, server: xxx.xxx.xxx.cz, request: "GET /favicon.ico HTTP/1.1", host: "xxx.xxx.xxx.cz"
2015/01/05 16:00:45 [crit] 23983#0: *1 connect() to 0.0.0.0:4080 failed (13: Permission denied) while connecting to upstream, client: 111.222.333.111, server: xxx.xxx.xxx.cz, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://0.0.0.0:4080", host: "xxx.xxx.xxx.cz"


nginx access log:
Code: Select all
111.222.333.111 - - [05/Jan/2015:16:00:45 +0100] "GET / HTTP/1.1" 502 172 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0" "-"
111.222.333.111 - - [05/Jan/2015:16:00:45 +0100] "GET /favicon.ico HTTP/1.1" 502 172 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0" "-"



OMERO config get:
Code: Select all
omero.data.dir=/OMERO
omero.db.name=omero_database
omero.db.pass=xxxxxxxxx
omero.db.user=db_user

Re: Bad Gateway

PostPosted: Mon Jan 05, 2015 3:20 pm
by manics
Hi Michal

Could you double check the permissions on your directories:
Code: Select all
ls -ld /home/omero /home/omero/OMERO.server

Re: Bad Gateway

PostPosted: Mon Jan 05, 2015 3:49 pm
by xkunes
result:

Code: Select all
drwx--x--x. 5 omero omero 4096 Jan  5 16:03 /home/omero
lrwxrwxrwx. 1 omero omero   28 Dec 31 15:45 /home/omero/OMERO.server -> OMERO.server-5.0.6-ice35-b53


and:
Code: Select all
drwxr-xr-x. 9 omero omero 4096 Jan  5 16:03 /home/omero/OMERO.server-5.0.6-ice35-b53


the content of the OMERO.server is:
Code: Select all
drwxr-xr-x. 9 omero omero   4096 Jan  5 16:03 .
drwx--x--x. 5 omero omero   4096 Jan  5 16:03 ..
drwxr-xr-x. 2 omero omero   4096 Nov 10 19:19 bin
drwxr-xr-x. 4 omero omero   4096 Nov 10 19:19 etc
drwxr-xr-x. 3 omero omero   4096 Nov 10 19:19 include
drwxr-xr-x. 8 omero omero   4096 Nov 10 19:22 lib
drwxr-xr-x. 2 omero omero   4096 Nov 10 19:19 licenses
drwxr-xr-x. 4 omero omero   4096 Nov 10 19:19 sql
drwxrwxr-x. 5 omero omero   4096 Dec 31 16:35 var
-rw-rw-r--. 1 omero omero 295820 Dec 31 15:45 db.sql
-rw-r--r--. 1 omero omero  19961 Nov 10 19:19 history.txt
-rw-r--r--. 1 omero omero  17987 Nov 10 19:19 LICENSE.txt
-rw-rw-r--. 1 omero omero   1333 Dec 31 15:46 nginx.conf.tmp