[ome-users] Nginx 502 Bad Gateway

Harri Jäälinoja harri.jaalinoja at helsinki.fi
Tue Mar 20 15:30:18 GMT 2012


Hi Carlos,

[root at lmu-omero2 nginx]# grep 4080 nginx.conf
             #fastcgi_pass 0.0.0.0:4080;
             fastcgi_pass 127.0.0.1:4080;
[root at lmu-omero2 nginx]# netstat -ntlp|grep 80
tcp        0      0 0.0.0.0:80                  0.0.0.0:* 
     LISTEN      28053/nginx
tcp        0      0 0.0.0.0:4080                0.0.0.0:* 
     LISTEN      31592/python

I modified nginx.conf and restarted, but I still get the same error 
messages. But this is now run as root, where Chris said the config might 
need some other tweaking as well. If you know other things to modify, 
please let me know. In the mean time let's see if I manage to allow 
access to port 8000 to test a separate nginx instance...

Regards,
Harri

On 20/03/12 17:06, C Neves wrote:
> Hello Harri,
>
> Taking a closer look at this thread it seems that the nginx.conf you are
> using has:
>
> fastcgi_pass 0.0.0.0:4080
>
> Which looks wrong to me. Listening on 0.0.0.0 is fine (all interfaces)
> but this is where the nginx fastcgi handler will be connecting to. Can
> you change that to 127.0.0.1 and retry?
>
> Regards,
> Carlos
>
> On 2012/3/20 3:02 , Harri Jäälinoja wrote:
>> Hi Chris,
>>
>>> How did you start nginx?  As the omero user or as root?
>>> If you are going to run nginx on port 80 it will need to be started
>>> as root in order to bind to lower port numbers.
>>>
>> I started it as root, via "service nginx start".
>>
>>
>>>> OMERO.web status... [NOT STARTED]
>>>>
>>>>
>>>> So OMERO.web is not starting, even though there is no error:
>>>>
>>>> [omero at lmu-omero2 ~]$ omero web start
>>>> Starting OMERO.web... Removed stale
>>>> /opt/OMERO/OMERO.server-Beta-4.3.3/var/django.pid
>>>> [OK]
>>>
>>> is anything listening to port 4080?
>>>
>>> # netstat -ntlp |grep 4080
>>>
>>
>> Yes:
>> [omero at lmu-omero2 ~]$ netstat -ntlp |grep 4080
>> (Not all processes could be identified, non-owned process info
>>   will not be shown, you would have to be root to see it all.)
>> tcp        0      0 0.0.0.0:4080                0.0.0.0:*
>> LISTEN      31592/python
>>
>>
>>
>>>
>>> I'm assuming nothing of interest in $OMERO_HOME/var/log/OMEROweb*?
>>>
>>
>> No, just "Application Starting...".
>>
>>> Are you running under selinux by chance?
>>>
>>> # sestatus
>>>
>>
>> No.
>> [root at lmu-omero2 nginx]# sestatus
>> SELinux status:                 disabled
>>
>>
>>>>>
>>>>> [omero at lmu-omero2 ~]$ omero web config nginx
>>>
>>> This generated config is more designed around running a separate
>>> nginx instance as a non-priviledged user on a different port.
>>>
>>> That config would need to be tweaked a little to run as a root instance.
>>>
>>
>> Ok. I noticed now also the example in "omero web -h", that looks like
>> a separate instance.
>>
>>> As far as avoiding compiling fastcgi, if you add the rpmforge
>>> repositories
>>> (http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
>>> those are centos instructions but are true for RHEL as well) it has
>>> fastcgi packages.
>>>
>>
>> Ok, I can try this as well, see which one the other admins like better.
>>
>>
>>> But nginx's configuration is secondary to why omero web doesn't seem
>>> to be starting correctly.
>>>
>>
>> But the process that is listening at port 4080 should be omero web,
>> right? What does "omero web status" check, maybe it's just the check
>> that is going wrong?
>>
>> Thanks,
>> Harri
>>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


-- 
__________________________________________________
Harri Jäälinoja
Light Microscopy Unit
Institute of Biotechnology, University of Helsinki
http://www.biocenter.helsinki.fi/bi/lmu/
+358 9 191 59370 fax +358 9 191 59366




More information about the ome-users mailing list